AI API errors · Anthropic, OpenAI, Gemini · checked Oct 24, 2026
AI API errors: retry it, or fix it?
Paste the error your app threw. You get what it means, whether retrying will help, and the fix, for Claude, OpenAI and Gemini.
The cheat sheet
| Status | Anthropic | OpenAI | Gemini | Retry? |
|---|---|---|---|---|
| 429 | rate_limit_error | rate limit, slow_down | RESOURCE_EXHAUSTED | Yes, with backoff. Except quota/billing 429s (OpenAI insufficient_quota, a monthly spend cap). |
| 500 | api_error | server error | INTERNAL | Yes |
| 503 / 529 | 529 overloaded_error | 503 server_is_overloaded | 503 UNAVAILABLE | Yes, then fall back to another model |
| 504 | timeout_error | - | DEADLINE_EXCEEDED | Yes; stream long outputs |
| 400 | invalid_request_error | invalid_request_error | INVALID_ARGUMENT | No: fix the request |
| 401 / 403 | authentication / permission | invalid key, IP, country | PERMISSION_DENIED | No: fix the key or access |
| 402 | billing_error | (429 insufficient_quota) | payment_required | No: fix billing |
Rule of thumb: 429 and 5xx are worth retrying with exponential backoff and jitter (honor retry-after). 4xx other than 429 never fix themselves, and neither do quota or spend-limit 429s.
Anthropic (Claude)
- 529overloaded_error: Overloadedretry
- 429rate_limit_errorretry
- 400invalid_request_errorfix
- 400invalid_request_error: This model does not support assistant message prefill. The conversation must endfix
- 400invalid_request_error: "thinking.type.enabled" is not supported for this model. Use "thinking.type.adapfix
- 400invalid_request_error: "thinking.type.disabled" is not supported for this model. Use "thinking.type.adafix
- 400invalid_request_error: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot fix
- 400invalid_request_error: tool_choice: type "tool" and "any" are not supported for this model.fix
- 401authentication_errorfix
- 402billing_errorfix
- 403permission_errorfix
- 404not_found_error: The requested resource could not be found.fix
- 413request_too_largefix
- 500api_errorretry
- 504timeout_errorretry
OpenAI
- 429rate_limit_error: Rate limit reached for requestsretry
- 429slow_down: Slow downretry
- 429insufficient_quota: You exceeded your current quota, please check your plan and billing details.fix
- 401invalid_api_key: Incorrect API key providedfix
- 401invalid_authentication: Invalid Authenticationfix
- 401ip_not_authorized: IP not authorizedfix
- 401You must be a member of an organization to use the APIfix
- 403unsupported_country_region_territory: Country, region, or territory not supportedfix
- 500server_error: The server had an error while processing your requestretry
- 503server_is_overloadedretry
- 400invalid_request_errorfix
Google Gemini API
- 429RESOURCE_EXHAUSTEDretry
- 503UNAVAILABLE: The model is overloaded. Please try again later.retry
- 400INVALID_ARGUMENTfix
- 400FAILED_PRECONDITIONfix
- 402payment_requiredfix
- 403PERMISSION_DENIED: Your project has been denied accessfix
- 403PERMISSION_DENIED: Your API key was reported as leaked. Please use another API key.fix
- 404NOT_FOUNDfix
- 500INTERNALretry
- 504DEADLINE_EXCEEDEDretry
- -RECITATIONfix
- -SAFETYfix
Up next
Pick a fallback modelAI model pricesRead it next →Also worth your time
Did this answer your question?
Up next
Get 3 picks for your job, volume and budgetPick an AI model for your jobLLM API pricing for 71 models per 1M tokens, checked at the source. Pick for me: your job, volume and budget give 3 models with the monthly cost. Filters, CSV.Read it next →