invalid_request_error
: There was an issue with the format or content of your request. We may also use this error type for other 4XX status codes not listed below.
authentication_error
: There’s an issue with your API key.
permission_error
: Your API key does not have permission to use the specified resource.
not_found_error
: The requested resource was not found.
request_too_large
: Request exceeds the maximum allowed number of bytes. The maximum request size is 32 MB for standard API endpoints.
rate_limit_error
: Your account has hit a rate limit.
api_error
: An unexpected error has occurred internal to Anthropic’s systems.
overloaded_error
: Anthropic’s API is temporarily overloaded.
Endpoint Type | Maximum Request Size |
---|---|
Messages API | 32 MB |
Token Counting API | 32 MB |
Batch API | 256 MB |
Files API | 500 MB |
request_too_large
error. The error is returned from Cloudflare before the request reaches Anthropic’s API servers.
error
object that always includes a type
and message
value. For example:
type
values will grow over time.
request-id
header. This header contains a value such as req_018EeWyXxfu5pfWkrYcMdjWG
. When contacting support about a specific request, please include this ID to help us quickly resolve your issue.
Our official SDKs provide this value as a property on top-level response objects, containing the value of the request-id
header:
max_tokens
values without using our streaming Messages API
or Message Batches API: