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 AuthenticationError 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 BillingError 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 EnforcedSpendLimitReachedErrorDetails struct { ErrorCode }
type ErrorDetailsUnion interface{…}
type ErrorObjectUnion interface{…}
type ErrorResponse struct { Type: "error"; Error; RequestID }
type ErrorType string
type GatewayTimeoutError 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 InvalidRequestError 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 NotFoundError 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 OverloadedError 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 PermissionError 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 RateLimitError 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 }
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 came from a Claude sandbox with restricted network access, which is not allowed to make this change. 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 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.