Claude Error Handbook

Instant reference for every Anthropic API error code and Claude Code error message. Stop guessing — find the fix in seconds.

Anthropic API Errors (HTTP Status Codes)
HTTP 529 overloaded_error

Claude's servers are temporarily at capacity. Retry with exponential backoff after 30–60 seconds.

HTTP 429 rate_limit_error

You've exceeded your requests-per-minute or tokens-per-minute limit. Implement backoff and throttling.

HTTP 401 authentication_error

Invalid or missing API key. Verify your ANTHROPIC_API_KEY is set and starts with sk-ant-.

HTTP 403 permission_error

Your account doesn't have access to this model or feature. Check your plan and model availability.

HTTP 400 invalid_request_error

Malformed request — invalid parameters, wrong types, or missing required fields. Check the API schema.

HTTP 404 not_found_error

Resource not found — often a deprecated model string or wrong API endpoint. Use a current model ID.

HTTP 413 request_too_large

Request payload exceeds 10 MB. Compress images, reduce base64 payloads, or chunk your content.

HTTP 500 api_error

Internal Anthropic server error. Retry after a short delay; check status.anthropic.com for outages.

400 / context context_length_exceeded

Conversation exceeds the model's 200k context window. Summarize history or truncate older messages.

HTTP 402 billing_error

Free-tier credits exhausted or no payment method on file. Add a card at console.anthropic.com/settings/billing.

HTTP 404 model_not_found

Model ID is deprecated or misspelled. Replace claude-2, claude-instant with a current versioned ID.

Safety content_policy_violation

Request triggered Anthropic's safety classifier. Add use-case context in your system prompt to fix false positives.

Timeout timeout_error

Request exceeded the configured timeout. Use streaming for long responses or increase the SDK timeout setting.

Claude Code & SDK Errors
Quick Reference

All Error Codes at a Glance

Error Type HTTP Cause Fix
overloaded_error 529 Server at capacity Retry + backoff
rate_limit_error 429 Too many requests Throttle / backoff
authentication_error 401 Invalid API key Check key format
permission_error 403 Plan/model access Upgrade plan
invalid_request_error 400 Malformed request Validate schema
not_found_error 404 Wrong model/endpoint Use current model ID
request_too_large 413 Payload > 10 MB Compress / chunk
api_error 500 Anthropic internal Retry later
context_length_exceeded 400 >200k tokens Summarize history
tool_use_failed SDK Bad tool result Fix schema