Claude API 529 overloaded error: the fix

A 529 overloaded error is Anthropic capacity, not your key. What the gateway returns instead, how it differs from 402 and 429, and a retry that backs off.

Checked 2026-11-22

·All fixes·Models

A 529 overloaded error from Claude means Anthropic's upstream capacity is temporarily full, so the request will usually succeed on a retry with exponential backoff; at https://api.uplinkswitch.com/v1 the gateway automatically retries eligible requests on another route and fails over to alternative hosts when available. Nothing about your key, balance or request body caused it. Anthropic's own error reference lists 529 as overloaded_error, "the API is temporarily overloaded", and warns it can happen when traffic is high across all users. The rest of this page covers what you receive through the gateway instead of a raw 529, how to tell it from a 402 or a 429, and a retry pattern that does not hammer a busy model.

What a direct 529 looks like

Per Anthropic's errors reference, every error is JSON with the same envelope: a top-level type of error, an error object holding a type and a message, and a request_id. The reference lists 529 as overloaded_error and 500 as api_error, an unexpected error inside Anthropic's systems, but prints no full 529 body, so treat the inner message as free text rather than a string to match. The one overload body Anthropic does print is in its streaming reference, where the error arrives as an event after a 200 has already started:

text
event: error
data: {"type": "error", "error": {"type": "overloaded_error", "message": "Overloaded"}}

What you get through the gateway

The gateway never forwards a 529 status. When one route of a model answers overloaded, the request moves to the next route of that model, and then down any fallback list you sent, before a single byte has reached you. When no route is left that can answer, the refusal is HTTP 503 with the code upstream_unavailable. On the Messages endpoint it arrives in Anthropic's shape, whose type field reads overloaded_error:

json
{
  "type": "error",
  "error": {
    "type": "overloaded_error",
    "message": "The model is not answering right now. (upstream_unavailable)"
  },
  "request_id": "<request id>"
}

The response carries a retry-after header, and nothing is charged for it. If instead the last route tried answered with a server error of its own, an upstream 529 included, the refusal is a 502 whose type is api_error and whose code is upstream_error, also with retry-after and also free. Handle the two alike: both mean every route failed this time. The code in parentheses is the stable part to match on; the sentence before it may be reworded.

529 is not 402 and not 429

The three look alike in a log line and need opposite responses.

StatusError typeCode in the messageWhat it meansWill a retry help?
503 (529 direct)overloaded_errorupstream_unavailableEvery route of the model is busyYes, after retry-after
502api_errorupstream_errorThe last route tried failed with a server errorYes, after retry-after
429rate_limit_errorrate_limited or upstream_rate_limitedYour key's own limit, or one busy routeYes, after retry-after
402billing_errorinsufficient_balance or a limit codeThe balance or a key limit is spentNo, top up or raise the limit

A 402 retried in a loop stays a 402 until the balance changes, so never put it in the same retry branch as an overload.

Let the SDK retry first

Per the SDK's documentation, the Anthropic client already retries connection errors, 408, 409, 429 and every 5xx twice by default, with a short exponential backoff that honours retry-after. For a model under sustained load, raising that count is often the whole fix:

python
import anthropic

client = anthropic.Anthropic(
    api_key="sk-uplink-live-...",
    base_url="https://api.uplinkswitch.com/v1",
    max_retries=5,
)

On this gateway you can also hand the next choice to the server. A models list in the request body names up to five ids to try in order once every route of the first has failed, and the SDK sends it through extra_body:

python
msg = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=512,
    messages=[{"role": "user", "content": "Summarise this ticket in two lines."}],
    extra_body={"models": ["deepseek-v4.1-flash"]},
)
print(msg.model)  # the id that actually answered, and the one billed

On the 2026-11-23 catalog claude-sonnet-5-5 read ok and deepseek-v4.1-flash read ok; pick a fallback that also reads ok.

A manual retry, when you own the loop

If retries live in your own job runner, wait for the server's retry-after when it is present, and otherwise grow the wait each attempt. Stop after a fixed number of tries:

python
import time
import anthropic

client = anthropic.Anthropic(
    api_key="sk-uplink-live-...",
    base_url="https://api.uplinkswitch.com/v1",
    max_retries=0,  # this loop does the retrying
)

def create_with_backoff(**kwargs):
    for attempt in range(5):
        try:
            return client.messages.create(**kwargs)
        except anthropic.InternalServerError as e:  # every status of 500 and above
            wait = e.response.headers.get("retry-after")
            time.sleep(float(wait) if wait else 2 ** attempt)
    return client.messages.create(**kwargs)

Catching InternalServerError alone leaves 402 and 400 errors to surface at once, which is what you want. Failover happens only before the first byte, so a stream already sending tokens cannot switch routes under you. Per Anthropic's streaming docs, a failure after that point arrives as an error event inside the 200; discard the partial text and retry the whole request. The LLM failover post explains where else that logic can live.

Questions and answers

Anthropic's. Its error reference describes 529 overloaded_error as temporary overload of the API, which can happen under high traffic across all users. Your key, balance and request are fine. Through this gateway you see a 503 upstream_unavailable, typed overloaded_error in Anthropic's format, or a 502 api_error when the last route tried failed outright, only after every route of the model was tried, and neither refusal is charged.

Yes, before you see anything. An overloaded route sends the request on to the model's next route, then to each id in a models fallback list if you sent one, all before the first byte reaches you. You receive the 503 or the 502 only when all of them failed. Your SDK's own retries then run on top of that.

Read the retry-after header on the 503 or 502 and wait that many seconds. When no header is present, back off exponentially, doubling the wait each attempt, and give up after a handful of tries. Retrying instantly in a tight loop only adds load to a model that is already full.
Join on Telegram
Help