Read the error type, not just the status code. Both vendors use 429 for conditions that waiting cannot fix, such as OpenAI’s credit_balance_exhausted and Anthropic’s tier spend cap. OpenAI’s pages say to wait and retry for temporary rate limits and server-side failures, and Anthropic’s say so for a 429 with retry-after and for a 500. Neither says to retry a balance or limit you have to change.
Key takeaways
Key takeaways
- Retry on the error type or code, not the number. On Claude the type is the same for an ordinary rate limit and a spend cap, so check
error.details.error_codeforenforced_spend_limit_reachedor the missingretry-afterheader. OpenAI’s error-codes page lists six 429 entries, and only two (a rate limit andslow_down) come with a wait-and-retry instruction. It says retrying billing, spend or quota errors “won’t restore API access”.- Anthropic’s 429 can also last until the month ends. The tier spend-cap 429 has no
retry-afterheader and fails until access resumes. A spend limit you set yourself returns 400 (Claude Code workspace limits can return 429).- Overload has different numbers. Anthropic returns 529
overloaded_error; OpenAI returns 503server_is_overloaded. OpenAI says to followRetry-Afterand retry. Anthropic’s errors page gives no retry instruction for 529, though it lists 5xx among failures its SDKs retry.- Both SDKs already retry. Anthropic documents two retries by default, and OpenAI’s Python README says the same. OpenAI’s rate-limits guide says to account for them in your own limits.
- Status feeds rarely tell you the code. 21 of 112 OpenAI incidents list an APIs-group component (median 147 minutes open) and 34 of 50 Anthropic incidents list the Claude API (median 75.5); the windows differ, so this is not a comparison. One title names an error-code string, and none of the text we searched contains an HTTP status such as 429 or 529.
Published October 18, 2026. On that date we read Anthropic’s errors, rate-limits, streaming and Python SDK pages, and OpenAI’s error-codes, rate-limits and streaming guides and Python README. Incident counts come from status-feed copies saved October 10, 2026. We tested nothing ourselves: this article reports what the documents say.
How each vendor documents API error codes
Anthropic’s errors page lists HTTP statuses, each with a type string. Every error body carries an error object with a type and message, plus a request_id. The page says the type values may grow and advises catching typed SDK exceptions rather than string-matching messages.
OpenAI’s error-codes guide is a table keyed on status and message, with a code or type on only some entries. For billing errors it says to inspect error.code, because the broader error.type can still be insufficient_quota. For both vendors’ API error codes, the deciding detail sits in the body.
Claude API errors and what the pages say to do
Retrieved October 18, 2026 from the errors page and rate-limits page. “None stated” means no retry instruction for that code.
| Status | Type string | Documented meaning | Documented retry guidance | Source |
|---|---|---|---|---|
| 400 | invalid_request_error | Format or content problem; also returned when usage reaches a spend limit you set | None stated; raise or remove a spend limit to restore access | Errors, Rate limits |
| 401, 403, 404 | authentication_error, permission_error, not_found_error | Key problem (malformed, revoked, expired); key lacks permission; resource not found | None stated; fix the key, access settings or path | Errors |
| 402 | billing_error | Billing or payment information problem | None stated; check payment details in the Console | Errors |
| 409 | conflict_error | Request conflicts with the resource’s current state | Resolve the conflict, then retry | Errors |
| 413 | request_too_large | Request exceeds the byte limit for the endpoint | None stated; see the per-endpoint size limits | Errors |
| 429 | rate_limit_error | Rate limit, acceleration limit after a sharp rise in usage, tier monthly spend cap, or Claude Code workspace spend limit | Wait the retry-after seconds when present; the spend-cap 429 has no header and keeps failing until access resumes | Errors, Rate limits |
| 500 | api_error | Unexpected error inside Anthropic’s systems | Retry with exponential backoff; if it persists, contact support with the request ID | Errors |
| 504 | timeout_error | Request timed out while processing | None stated; consider streaming for long requests | Errors |
| 529 | overloaded_error | API temporarily overloaded, which can happen with high traffic across all users | None stated; see our 529 explainer | Errors |
OpenAI API errors and what the pages say to do
Retrieved October 18, 2026 from the error-codes guide, rate-limits guide.
| Status | Code or type | Documented meaning | Documented retry guidance | Source |
|---|---|---|---|---|
| 400 | invalid_request_error (param service_tier) | Service tier not allowed for the project | None stated; change the tier or setting | Error codes |
| 401, 403 | none shown | Four 401 entries (credentials, membership, IP allowlist); 403 for an unsupported region | None stated; fix the credential, membership or allowlist | Error codes |
| 429 | credit_balance_exhausted | Organization has no prepaid credits left | Retrying will not restore access; add credits | Error codes |
| 429 | none shown (“Rate limit reached for requests”) | Requests or tokens arriving too fast | Wait at least Retry-After; if absent, exponential backoff with jitter and a retry limit | Error codes, Rate limits |
| 429 | slow_down (rate_limit_error) | Request rate rose too quickly, even within your per-minute limits | Follow Retry-After, reduce the rate, then raise it gradually | Rate limits |
| 429 | organization_spend_limit_exceeded, project_spend_limit_exceeded | Enforced monthly spend limit reached | Retrying will not help; raise or remove the limit, or wait for the monthly reset | Error codes |
| 429 | organization_usage_limit_exceeded | OpenAI-assigned monthly usage limit reached | Retrying will not help; request a higher approved limit or contact support | Error codes |
| 500 | none shown | Issue on OpenAI’s servers | Retry after a brief wait; check the status page; contact support if it persists | Error codes |
| 503 | server_is_overloaded (service_unavailable_error) | The requested model is temporarily overloaded | Follow Retry-After when present, then retry; otherwise lengthen the delay | Error codes |
In Python, RateLimitError covers 429 and InternalServerError covers 503, so the guide says to handle both and inspect error.code if you previously caught only one.
Same situation, different code
| Situation | Claude API | OpenAI API |
|---|---|---|
| Spend limit you set | 400 invalid_request_error (Claude Code workspace limits can return 429) | 429 organization_spend_limit_exceeded or project_spend_limit_exceeded |
| Monthly cap set by the vendor (closest pairing; neither page equates them) | 429 rate_limit_error, no retry-after | 429 organization_usage_limit_exceeded |
| Billing (closest pairing; neither page equates them) | 402 billing_error (payment-information problem; empty-balance behaviour not on the pages we read) | 429 credit_balance_exhausted for an empty prepaid balance |
| Traffic rising too fast | 429 from acceleration limits | 429 slow_down |
| Provider-side overload | 529 overloaded_error | 503 server_is_overloaded |
| Long request times out | 504 timeout_error | No 504 entry on the error-codes page; APITimeoutError in Python |
| Request too large | 413 request_too_large | No 413 entry on the error-codes page |
Three traps follow. A handler that retries every 429 will keep failing on a balance or spend limit (our inference for OpenAI; for Anthropic’s spend-cap 429, the rate-limits page says even the SDK’s automatic retries fail until access resumes). A handler that treats every 400 as a bad request will misread Anthropic’s spend-limit response (our inference, not a statement on either page). And OpenAI’s rate-limits guide says some rapid-traffic responses moved from 503 to 429, and its error-codes page says video overload moved from 429 to 503, so keep the earlier codes in your handlers.
What the SDKs retry for you
Anthropic’s errors page says its SDKs retry transient failures (connection errors, rate limits, 5xx) with exponential backoff, twice by default, honoring retry-after. The Python SDK page adds 408 and 409.
OpenAI’s rate-limits guide says its SDKs retry eligible 429 and 503 responses, and that handling of long Retry-After delays varies by version. The Python README gives the count: 2 by default, for connection errors, 408, 409, 429 and 5xx, when the body can be safely resent. OpenAI’s rate-limits guide says to account for them in your own limits.
Errors that arrive after a 200
When you stream, the status line is already sent. Anthropic’s errors page says an error can occur after a 200, when standard error handling does not apply. Its streaming page shows an event: error carrying an overloaded_error, which it says would normally be a 529 in a non-streaming call. For Claude 4.6 and later it describes recovery by saving the partial response and sending a user message asking the model to continue; tool-use and thinking blocks cannot be partly recovered.
OpenAI’s rate-limits guide says the slow_down and server_is_overloaded HTTP errors apply before a stream starts; later errors can arrive as a stream event, and it says not to replay a request automatically after consuming output. The streaming guide lists error among the events to listen for. Neither page gives a retry schedule for a mid-stream error, so check for an error event as well as the HTTP status.
What our incident data can and cannot say
Method. OpenAI: our saved copy of status.openai.com, 112 incidents that started between July 12 and October 9, 2026 (UTC). An incident counts when it lists any component of the status page’s APIs group (13 components, among them Chat Completions, Responses, Images, Batch, Realtime, Files and Login for APIs). Anthropic: our saved copy of status.claude.com, 50 incidents and 162 updates that started between July 27 and October 7, 2026, counted when an update lists the Claude API component at a non-operational status. Minutes open run from the start to the first resolved update: the status-page window, not user impact.
Result. 21 of 112 OpenAI incidents (19%) list an APIs-group component, with a median 147 minutes open, against 115 for the 111 resolved incidents in the whole feed. Without the Login component the count is 18 and the median 156. For Anthropic, 34 of 50 incidents (68%) list the Claude API, median 75.5 minutes, against 63 for the 49 resolved incidents in the whole feed. We do not compare the vendors. The windows differ, Anthropic lists five components while OpenAI lists 37, and 26 of Anthropic’s 34 list exactly claude.ai, the Claude API, Claude Cowork and Claude Code together, so the 68% partly reflects how the page groups products.
What it cannot show. None of the 112 OpenAI titles contains 429, 500, 503 or “rate limit”, and none of the 162 Anthropic updates contains 429, 500, 503, 529 or “overloaded”. Only one OpenAI title names an error-code string, a Chat Completions incident naming invalid_prompt (July 29), and none names an HTTP status. A July 17 Codex title mentions “Server-Overload Errors”, and an Anthropic update on September 10 mentions request timeouts on the Claude API. We searched OpenAI titles only, not its updates. A posted incident does not tell you which code you received. Fuller analyses: our reliability study and the Claude status history.
What we could not verify
- Whether OpenAI’s SDKs skip retries on billing or quota 429s. The README lists 429 among retried statuses, while the error-codes page says retrying such errors does not help. No page we read says which applies, and we did not rely on OpenAI’s Help Center article on 429 errors.
- Anthropic’s retry advice for 529 and 504. The errors page gives none; it does for 500 and 409, and the rate-limits page does for 429 with
retry-after. - Retry counts outside Python, and cloud-provider variants. We read the Python README and Python SDK page, and the direct APIs, not Amazon Bedrock, Google Cloud or Azure.
- Limits and reliability. We state no numeric limits, which vary by tier and model, and make no claim about which API fails less.
Wording and codes come from the pages as they stood on October 18, 2026 and may change. Related: Claude Code messages, Codex errors and our five-step decision guide.
Frequently asked questions
Only if it is a temporary rate limit or slow_down. OpenAI says to wait at least the Retry-After time, or else use exponential backoff with jitter and a retry limit. For credit_balance_exhausted and the spend- and usage-limit codes, retrying will not restore access.
Both are documented as temporary overload. Anthropic’s errors page gives no retry instruction for 529, though it lists 5xx among failures its SDKs retry. OpenAI says to follow Retry-After on a 503 server_is_overloaded, then retry. See our 529 explainer.
Twice by default in the Anthropic SDK, according to its errors page, and in OpenAI’s Python library, according to its README. Both let you change the number.
Yes, when streaming. Anthropic’s errors page says an error can arrive after a 200, and its streaming page shows an error event. OpenAI’s guides say an error after a stream starts can arrive as a stream event, and not to replay the request automatically after consuming output.
