Shared
Models
APIErrorObject object{ type: "api_error", message }
type: "api_error"The 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.
AuthenticationError object{ type: "authentication_error", message }
type: "authentication_error"The 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.
BillingError object{ type: "billing_error", message }
type: "billing_error"The 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.
ClaudeCodeKeyCreatorNotMemberErrorDetails object{ error_code }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 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.
ClaudeCodeVersionTooOldErrorDetails object{ error_code }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 request comes from a Claude Code version older than the minimum that the requested model or the organization requires. Update Claude Code, then retry.
CMEKContextUnavailableErrorDetails object{ error_code }The workspace's encryption settings could not be read, so the request was refused. Retry in a few minutes.
The workspace's encryption settings could not be read, so the request was refused. Retry in a few minutes.
CMEKKeyDisabledErrorDetails object{ error_code }The workspace's customer-managed encryption key is disabled or revoked. Re-enable the key, then retry.
The workspace's customer-managed encryption key is disabled or revoked. Re-enable the key, then retry.
CMEKKeyNetworkBlockedErrorDetails object{ error_code }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.
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.
CMEKKeyUnreachableErrorDetails object{ error_code }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.
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.
EnforcedSpendLimitReachedErrorDetails object{ error_code }The organization has crossed the monthly API usage threshold of its API tier.
The organization has crossed the monthly API usage threshold of its API tier.
ErrorDetails = AvailableToolsLimitExceededErrorDetails or ClaudeCodeKeyCreatorNotMemberErrorDetails or ClaudeCodeVersionTooOldErrorDetails or 81 more
ErrorObject = InvalidRequestError or AuthenticationError or BillingError or 6 more
ErrorResponse object{ type: "error", error, request_id }
ErrorType = "invalid_request_error" or "authentication_error" or "billing_error" or 9 more
GatewayTimeoutError object{ type: "timeout_error", message }
type: "timeout_error"The 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.
InvalidRequestError object{ type: "invalid_request_error", message }
type: "invalid_request_error"The 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.
NotFoundError object{ type: "not_found_error", message }
type: "not_found_error"The 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.
OrganizationOnHoldErrorDetails object{ error_code, appeal_url }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.
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.
OrganizationTypeNotSupportedErrorDetails object{ error_code }The endpoint does not support the organization's type. Each endpoint's description says which organization types it supports.
The endpoint does not support the organization's type. Each endpoint's description says which organization types it supports.
OverloadedError object{ type: "overloaded_error", message }
type: "overloaded_error"The 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.
ParentOrganizationRequiredErrorDetails object{ error_code }The endpoint serves only organizations that belong to a parent organization, and this organization belongs to none.
The endpoint serves only organizations that belong to a parent organization, and this organization belongs to none.
PermissionError object{ type: "permission_error", message }
type: "permission_error"The 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.
RampLimitExceededErrorDetails object{ error_code }The request would exceed a ramp limit, which caps how fast usage can grow. Retry after the time in the retry-after header.
The request would exceed a ramp limit, which caps how fast usage can grow. Retry after the time in the retry-after header.
RateLimitError object{ type: "rate_limit_error", message }
type: "rate_limit_error"The 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.
RequestBodyEncodingInvalidErrorDetails object{ error_code }The request body is not valid for its Content-Encoding.
The request body is not valid for its Content-Encoding.
RequestBodyEncodingUnsupportedErrorDetails object{ error_code }The request's Content-Encoding is not supported.
The request's Content-Encoding is not supported.
RequestBodyTooLargeAfterDecodingErrorDetails object{ error_code }The compressed request body exceeds the request size limit once decoded.
The compressed request body exceeds the request size limit once decoded.
SandboxEgressRestrictedErrorDetails object{ error_code }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 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.