Claude Platform Docs

支出限制

設定支出限制
BetaSpendLimit beta().organization().spendLimits().set(params, requestOptions = RequestOptions.none())
POST/v1/organizations/spend_limits

設定支出限制。

取得支出限制
BetaSpendLimit beta().organization().spendLimits().retrieve(params = SpendLimitRetrieveParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/spend_limits/{spend_limit_id}

依 ID 擷取支出限制。

刪除支出限制
SpendLimitDeleteResponse beta().organization().spendLimits().delete(params = SpendLimitDeleteParams.none(), requestOptions = RequestOptions.none())
DELETE/v1/organizations/spend_limits/{spend_limit_id}

刪除支出限制。

列出支出限制
SpendLimitListPage beta().organization().spendLimits().list(params = SpendLimitListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/spend_limits

列出組織的支出限制。

Models
class BetaSpendLimit { type = "spend_limit"; id; amount; /* 6 more */ }

A configured spend limit: a cap on metered spend for one scope and period.

class BetaSpendLimitOrganizationScope { type = "organization"; }
JsonValue type = "organization"
class BetaSpendLimitOrganizationServiceScope { type = "organization_service"; service; }
JsonValue type = "organization_service"
String service
enum BetaSpendLimitPeriod
DAILY("daily")
MONTHLY("monthly")
WEEKLY("weekly")
class BetaSpendLimitRbacGroupScope { type = "rbac_group"; rbacGroupId; }
JsonValue type = "rbac_group"
String rbacGroupId
class BetaSpendLimitScopedApiKeyActor { type = "scoped_api_key_actor"; scopedApiKeyId; }

A scoped Admin API key acting on behalf of the organization.

JsonValue type = "scoped_api_key_actor"
String scopedApiKeyId
class BetaSpendLimitSeatTierScope { type = "seat_tier"; seatTier; }
JsonValue type = "seat_tier"
String seatTier
class BetaSpendLimitUsageTierScope { type = "usage_tier"; }

Scope of the monthly spend cap Anthropic sets for a Claude Console organization from its usage tier, or a higher cap Anthropic granted the organization. Read-only; its created_at and updated_at are the organization's creation time, so amount can change while updated_at stays the same.

JsonValue type = "usage_tier"

Scope type. Always usage_tier for this scope.

class BetaSpendLimitUserActor { type = "user_actor"; deleted; emailAddress; /* 2 more */ }

A user within the organization. name and email_address are null when the underlying account is unavailable or has been deleted; deleted is true only for deleted accounts.

JsonValue type = "user_actor"

Actor type. Always user_actor.

boolean deleted

True only when the underlying account has been deleted.

Optional<String> emailAddress

The user's email address. Null when the account is unavailable or has been deleted.

Optional<String> name

The user's current display name. Null when the account is unavailable, has been deleted, or has no name set.

String userId

Tagged ID of the user.

class BetaSpendLimitUserScope { type = "user"; userId; }

Scope selecting a single member of the organization.

JsonValue type = "user"

Scope type. Always user for this scope.

String userId

Tagged ID of the member the spend limit applies to.

class BetaSpendLimitWorkspaceScope { type = "workspace"; workspaceId; }

Scope selecting one workspace of a Claude Console organization.

JsonValue type = "workspace"

Scope type. Always workspace for this scope.

String workspaceId

Tagged ID of the workspace the spend limit applies to.

class BetaSpendSummary { actor; amount; currency; /* 5 more */ }

Per-member effective-limit report row (GET /spend_limits/effective).

支出限制有效

列出有效支出限制
EffectiveListPage beta().organization().spendLimits().effective().list(params = EffectiveListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/spend_limits/effective

列出每位成員的有效支出限制及本期至今的支出。

支出限制提高請求

列出支出限制提高請求
IncreaseRequestListPage beta().organization().spendLimits().increaseRequests().list(params = IncreaseRequestListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/spend_limit_increase_requests

列出支出限制提高請求,最新的在前。

取得支出限制提高請求
BetaSpendLimitIncreaseRequest beta().organization().spendLimits().increaseRequests().retrieve(params = IncreaseRequestRetrieveParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}

擷取支出限制提高請求。

核准支出限制提高請求
IncreaseRequestApproveResponse beta().organization().spendLimits().increaseRequests().approve(params, requestOptions = RequestOptions.none())
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/approve

核准待處理的支出限制提高請求。

拒絕支出限制提高請求
BetaSpendLimitIncreaseRequest beta().organization().spendLimits().increaseRequests().deny(params = IncreaseRequestDenyParams.none(), requestOptions = RequestOptions.none())
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/deny

拒絕待處理的支出限制提高請求。