anthropic
Anthropic API Error Codes
Error types returned by the Anthropic Claude API, covering authentication, permissions, rate limiting, request validation, and service availability.
8 codes
references platform.claude.com/docs/en/api/errors
· All codes 8 codes
- api_error API Error An unexpected error occurred within Anthropic's systems. This is retryable; if it persists, check status.anthropic.com for ongoing incidents.
- authentication_error Authentication Error The API key or authentication token is invalid, missing, or malformed. Check that the x-api-key header (or Authorization: Bearer header for OAuth tokens) is set correctly.
- invalid_request_error Invalid Request Error The request format or parameters are invalid, for example malformed JSON, a missing required field such as model, max_tokens, or messages, or messages that do not alternate between user and assistant roles.
- not_found_error Not Found Error The requested resource was not found, typically caused by a typo or deprecated value in the model ID, or an invalid API endpoint path.
- overloaded_error Overloaded Error Anthropic's API is temporarily overloaded due to high demand. Retry with exponential backoff, spread requests over time, or try a different model.
- permission_error Permission Error The API key does not have permission to use the requested resource, for example a model the organization has not been granted access to, or a beta feature requiring separate access.
- rate_limit_error Rate Limit Error The account has exceeded the allowed request or token rate limits (per minute or per day). Check the retry-after and x-ratelimit-* response headers and retry with exponential backoff.
- request_too_large Request Too Large The request exceeds the maximum allowed size, due to the overall request body, the number of input tokens, or attached image data. Reduce the size of the request and try again.