Illustration of a hash symbol with a warning triangle, representing API error codes

OpenAI vs Claude API Error Codes: Which Errors to Retry and Which to Fix

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

  1. 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_code for enforced_spend_limit_reached or the missing retry-after header. OpenAI’s error-codes page lists six 429 entries, and only two (a rate limit and slow_down) come with a wait-and-retry instruction. It says retrying billing, spend or quota errors “won’t restore API access”.
  2. Anthropic’s 429 can also last until the month ends. The tier spend-cap 429 has no retry-after header and fails until access resumes. A spend limit you set yourself returns 400 (Claude Code workspace limits can return 429).
  3. Overload has different numbers. Anthropic returns 529 overloaded_error; OpenAI returns 503 server_is_overloaded. OpenAI says to follow Retry-After and retry. Anthropic’s errors page gives no retry instruction for 529, though it lists 5xx among failures its SDKs retry.
  4. 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.
  5. 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.

Read the error type, then chooseFour boxes: wait and retry for temporary rate limits, slow_down, 500 and 503; fix the request for 400, 413, 404 and 409; fix the key for 401 and 403; fix billing or limits for credit, spend cap and usage cap errors, where retrying will not help.Read the error type, then chooseFour actions the vendors' documents point to1Wait and retryTemporaryRate limit,slow_down, 500, 5032Fix the requestYour input400, 413, 4043Fix the keyYour access401, 4034Fix billing orlimitsRetry will not helpCredits, spend caps,usage capsournationonline.com
What to do depending on the error type, per each vendor’s documentation.

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.

StatusType stringDocumented meaningDocumented retry guidanceSource
400invalid_request_errorFormat or content problem; also returned when usage reaches a spend limit you setNone stated; raise or remove a spend limit to restore accessErrors, Rate limits
401, 403, 404authentication_error, permission_error, not_found_errorKey problem (malformed, revoked, expired); key lacks permission; resource not foundNone stated; fix the key, access settings or pathErrors
402billing_errorBilling or payment information problemNone stated; check payment details in the ConsoleErrors
409conflict_errorRequest conflicts with the resource’s current stateResolve the conflict, then retryErrors
413request_too_largeRequest exceeds the byte limit for the endpointNone stated; see the per-endpoint size limitsErrors
429rate_limit_errorRate limit, acceleration limit after a sharp rise in usage, tier monthly spend cap, or Claude Code workspace spend limitWait the retry-after seconds when present; the spend-cap 429 has no header and keeps failing until access resumesErrors, Rate limits
500api_errorUnexpected error inside Anthropic’s systemsRetry with exponential backoff; if it persists, contact support with the request IDErrors
504timeout_errorRequest timed out while processingNone stated; consider streaming for long requestsErrors
529overloaded_errorAPI temporarily overloaded, which can happen with high traffic across all usersNone stated; see our 529 explainerErrors

OpenAI API errors and what the pages say to do

Retrieved October 18, 2026 from the error-codes guide, rate-limits guide.

StatusCode or typeDocumented meaningDocumented retry guidanceSource
400invalid_request_error (param service_tier)Service tier not allowed for the projectNone stated; change the tier or settingError codes
401, 403none shownFour 401 entries (credentials, membership, IP allowlist); 403 for an unsupported regionNone stated; fix the credential, membership or allowlistError codes
429credit_balance_exhaustedOrganization has no prepaid credits leftRetrying will not restore access; add creditsError codes
429none shown (“Rate limit reached for requests”)Requests or tokens arriving too fastWait at least Retry-After; if absent, exponential backoff with jitter and a retry limitError codes, Rate limits
429slow_down (rate_limit_error)Request rate rose too quickly, even within your per-minute limitsFollow Retry-After, reduce the rate, then raise it graduallyRate limits
429organization_spend_limit_exceeded, project_spend_limit_exceededEnforced monthly spend limit reachedRetrying will not help; raise or remove the limit, or wait for the monthly resetError codes
429organization_usage_limit_exceededOpenAI-assigned monthly usage limit reachedRetrying will not help; request a higher approved limit or contact supportError codes
500none shownIssue on OpenAI’s serversRetry after a brief wait; check the status page; contact support if it persistsError codes
503server_is_overloaded (service_unavailable_error)The requested model is temporarily overloadedFollow Retry-After when present, then retry; otherwise lengthen the delayError 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

SituationClaude APIOpenAI API
Spend limit you set400 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-after429 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 fast429 from acceleration limits429 slow_down
Provider-side overload529 overloaded_error503 server_is_overloaded
Long request times out504 timeout_errorNo 504 entry on the error-codes page; APITimeoutError in Python
Request too large413 request_too_largeNo 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

Should I retry a 429 from the OpenAI API?

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.

What is the difference between Claude’s 529 and OpenAI’s 503?

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.

How many times do the SDKs retry?

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.

Can I get an error after a 200 response?

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.

Editorial Team

Independent analysis of how reliable ChatGPT, Claude and other AI tools are, built from public status pages, providers' own incident write-ups and datasets we publish. How we work, how AI is used and how to report a correction: https://ournationonline.com/editorial-standards/