Shared
Models
type APIErrorObject struct { Type: "api_error"; Message }
Type APIErrorThe broad category of the error.
The broad category of the error.
Message stringA human-readable explanation of the error. Its wording can change, so don't match on it.
A human-readable explanation of the error. Its wording can change, so don't match on it.
type AuthenticationErrorObject struct { Type: "authentication_error"; Message }
Type AuthenticationErrorThe broad category of the error.
The broad category of the error.
Message stringA human-readable explanation of the error. Its wording can change, so don't match on it.
A human-readable explanation of the error. Its wording can change, so don't match on it.
type BillingErrorObject struct { Type: "billing_error"; Message }
Type BillingErrorThe broad category of the error.
The broad category of the error.
Message stringA human-readable explanation of the error. Its wording can change, so don't match on it.
A human-readable explanation of the error. Its wording can change, so don't match on it.
type ClaudeCodeKeyCreatorNotMemberErrorDetails struct { ErrorCode }
type ClaudeCodeVersionTooOldErrorDetails struct { ErrorCode }
type CMEKContextUnavailableErrorDetails struct { ErrorCode }
type CMEKKeyDisabledErrorDetails struct { ErrorCode }
type CMEKKeyNetworkBlockedErrorDetails struct { ErrorCode }
type CMEKKeyUnreachableErrorDetails struct { ErrorCode }
type ContractSpendLimitReachedErrorDetails struct { ErrorCode }
type EnforcedSpendLimitReachedErrorDetails struct { ErrorCode }
type ErrorDetailsUnion interface{…}
type ErrorObjectUnion interface{…}
type ErrorResponse struct { Type: "error"; Error; RequestID }
type ErrorType string
type GatewayTimeoutErrorObject struct { Type: "timeout_error"; Message }
Type TimeoutErrorThe broad category of the error.
The broad category of the error.
Message stringA human-readable explanation of the error. Its wording can change, so don't match on it.
A human-readable explanation of the error. Its wording can change, so don't match on it.
type InvalidRequestErrorObject struct { Type: "invalid_request_error"; Message }
Type InvalidRequestErrorThe broad category of the error.
The broad category of the error.
Message stringA human-readable explanation of the error. Its wording can change, so don't match on it.
A human-readable explanation of the error. Its wording can change, so don't match on it.
type LinkedOrganizationBillingUnavailableErrorDetails struct { ErrorCode }
type LinkedOrganizationSpendLimitReachedErrorDetails struct { ErrorCode }
type NotFoundErrorObject struct { Type: "not_found_error"; Message }
Type NotFoundErrorThe broad category of the error.
The broad category of the error.
Message stringA human-readable explanation of the error. Its wording can change, so don't match on it.
A human-readable explanation of the error. Its wording can change, so don't match on it.
type OrganizationOnHoldErrorDetails struct { ErrorCode; AppealURL }
type OrganizationTypeNotSupportedErrorDetails struct { ErrorCode }
type OverloadedErrorObject struct { Type: "overloaded_error"; Message }
Type OverloadedErrorThe broad category of the error.
The broad category of the error.
Message stringA human-readable explanation of the error. Its wording can change, so don't match on it.
A human-readable explanation of the error. Its wording can change, so don't match on it.
type ParentOrganizationRequiredErrorDetails struct { ErrorCode }
type PermissionErrorObject struct { Type: "permission_error"; Message }
Type PermissionErrorThe broad category of the error.
The broad category of the error.
Message stringA human-readable explanation of the error. Its wording can change, so don't match on it.
A human-readable explanation of the error. Its wording can change, so don't match on it.
type RampLimitExceededErrorDetails struct { ErrorCode }
type RateLimitErrorObject struct { Type: "rate_limit_error"; Message }
Type RateLimitErrorThe broad category of the error.
The broad category of the error.
Message stringA human-readable explanation of the error. Its wording can change, so don't match on it.
A human-readable explanation of the error. Its wording can change, so don't match on it.
type RequestBodyEncodingInvalidErrorDetails struct { ErrorCode }
type RequestBodyEncodingUnsupportedErrorDetails struct { ErrorCode }
type RequestBodyTooLargeAfterDecodingErrorDetails struct { ErrorCode }
type SandboxEgressRestrictedErrorDetails struct { ErrorCode }
type StorageNotReadyErrorDetails struct { ErrorCode }
type WorkspaceHumanReviewDisabledErrorDetails struct { ErrorCode }
Errors
The API key belongs to the Claude Code workspace, and the user who created it is no longer a member of the organization or of that workspace.
The request comes from a Claude Code version older than the minimum that the requested model or the organization requires. Update Claude Code, then retry.
The workspace's customer-managed encryption key is disabled or revoked. Re-enable the key, then retry.
The key management service's network access controls blocked the request to the workspace's customer-managed encryption key. The key itself may be healthy.
Anthropic has disabled the organization for trust and safety reasons. An organization disabled for any other reason, such as billing, does not get this code. appeal_url, when present, is where the organization can appeal.
The endpoint does not support the organization's type. Each endpoint's description says which organization types it supports.
The endpoint serves only organizations that belong to a parent organization, and this organization belongs to none.
The request body is not valid for its Content-Encoding.
The request's Content-Encoding is not supported.
The request's Workspace has Human Review turned off, and this operation is not available there. Use a Workspace with Human Review on.
Anthropic cannot currently bill the organization linked to the request's user profile, for a reason that lies with that organization's own account. The response does not say what the reason is.
The organization linked to the request's user profile has reached a spend limit that it set, or lacks credit for the request. The response does not say which applies.
The request came from a Claude sandbox with restricted network access, which is not allowed to make this request. Send it from outside the sandbox, or from a sandbox with unrestricted network access.
The compressed request body exceeds the request size limit once decoded.
The organization has reached the spend limit of its contract.
The organization has crossed the monthly API usage threshold of its API tier.
The request would exceed a ramp limit, which caps how fast usage can grow. Retry after the time in the retry-after header.
The workspace's encryption settings could not be read, so the request was refused. Retry in a few minutes.
The workspace's customer-managed encryption key could not be reached. Retry the request; if this continues, check that the key is available in your key management service, or contact Anthropic support.
This workspace isn't ready yet: it's still being connected to its storage. Try again in a few minutes.