Elenca limiti di spesa
GET/v1/organizations/spend_limits
Elenca i limiti di spesa dell'organizzazione.
I limiti sono raggruppati per tipo di ambito, nell'ordine organization, seat_tier, rbac_group, organization_service, user; all'interno di un tipo seguono un ordine fisso che non corrisponde all'ordine di creazione. Supportato solo per le organizzazioni Claude Enterprise, non per le organizzazioni Claude Console.
Parameters
Returns
Elenca limiti di spesa
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
page, err := client.Beta.Organization.SpendLimits.List(context.TODO(), anthropic.BetaOrganizationSpendLimitListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}Response 200
{
"data": [
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"is_enabled": true,
"period": "daily",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"is_enabled": true,
"period": "daily",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"next_page": "next_page"
}