Claude stops answering, your script throws 529 overloaded_error, or Claude Code tells you that you have hit a limit. These problems look similar but have very different causes, and the fix for one can make another worse. Retrying a rate limit error too fast just burns more of your limit, and retrying a spend cap error never works at all.
In this guide I go through every error the Claude API returns, using Anthropic’s official error and rate limit documentation (checked November 5, 2026), and explain what each one means and exactly what to do. I also cover the messages you see in the Claude app and Claude Code.
- First check status.claude.com. If there is an incident, wait. Nothing on your side will fix it.
- 529 overloaded_error: Anthropic’s API is busy for everyone. Retry with exponential backoff, or fall back to another model.
- 429 rate_limit_error: you exceeded requests or tokens per minute. Wait for the
retry-afterheader, cache your prompts, and spread traffic out. - 429 with
enforced_spend_limit_reached: your monthly tier spend cap is used up. Retries will not work until the 1st of next month or a tier upgrade. - 400 “You have reached your specified API usage limits”: the spend limit you set. Raise it in the Console billing page.
- Claude app “usage limit reached”: your 5-hour or weekly plan limit. Wait for the reset, switch to a smaller model, or turn on usage credits.
Step 1: Is Claude Down or Is It You?
Before changing any code, open Anthropic’s status page at status.claude.com. It tracks each part of the service separately: claude.ai, the Claude Console (platform.claude.com), the Claude API (api.anthropic.com), Claude Code, Claude Cowork and Claude for Government. You can subscribe to alerts by email, SMS, Slack, Microsoft Teams, webhook or RSS.
- Red or yellow on the API or Claude Code: it is an incident. Wait, or switch to a backup model or provider.
- Everything green but you still get errors: read the exact error type in the response. It almost always tells you what is wrong.
Every error response is JSON with a top-level error object holding a type and a message, plus a request_id. Keep that ID. Anthropic support needs it, and the Python and TypeScript SDKs expose it as _request_id on responses.
Every Claude API Error Code at a Glance
| HTTP code | Error type | What it means | Retry? |
|---|---|---|---|
| 400 | invalid_request_error |
Bad request format or content, or you hit a spend limit you set | No, fix the request |
| 401 | authentication_error |
API key malformed, revoked or expired | No |
| 402 | billing_error |
Problem with billing or payment details | No |
| 403 | permission_error |
Key lacks permission for this resource | No |
| 404 | not_found_error |
Wrong endpoint path or resource ID | No |
| 409 | conflict_error |
Resource changed at the same time | Yes, after resolving |
| 413 | request_too_large |
Request bigger than the size limit | No, make it smaller |
| 429 | rate_limit_error |
Rate limit, acceleration limit or spend cap | Yes, except spend cap |
| 500 | api_error |
Unexpected internal error | Yes, with backoff |
| 504 | timeout_error |
Request timed out | Yes, use streaming |
| 529 | overloaded_error |
API temporarily overloaded | Yes, with backoff |
529 overloaded_error
This is the classic “Claude is overloaded” error. Anthropic’s docs describe it simply: the API is temporarily overloaded, and it can happen when the API experiences high traffic across all users. It is not about your account or your limits.
How to fix it:
- Retry with exponential backoff. Wait 1 second, then 2, 4, 8 and so on, with a little random jitter. The official SDKs already retry twice by default; raise
max_retriesif 529s are common for you. - Fall back to another model. If Opus 5.5 is overloaded, Sonnet 5.5 often still answers. Build a fallback list into your app.
- Move non-urgent work to the Batch API. Batches are queued and processed when capacity allows, so they avoid 529s and cost 50% less (see my Claude API pricing guide).
- Check the status page if 529s last more than a few minutes.
Do not retry in a tight loop. Hammering an overloaded API slows recovery for everyone and can push your own organisation into rate limits.
429 rate_limit_error
A 429 means your organisation sent more than its tier allows. The Messages API measures three limits per model class: requests per minute (RPM), input tokens per minute (ITPM) and output tokens per minute (OTPM). Exceed any one and you get a 429. Anthropic uses a token bucket, so capacity refills continuously rather than resetting on the minute, and a limit of 60 RPM may be enforced as 1 request per second, which means short bursts can trigger it even when your average is fine.
There is a second cause many people miss: acceleration limits. If your usage jumps sharply, you can get 429s even below your normal limits. Anthropic’s advice is to ramp traffic up gradually and keep usage patterns consistent.
How to fix it:
- Respect the
retry-afterheader. It gives the number of seconds to wait. Earlier retries will fail. - Read the rate limit headers on every response:
anthropic-ratelimit-requests-remaining,anthropic-ratelimit-input-tokens-remaining,anthropic-ratelimit-output-tokens-remainingand their-resettimes. Slow down before you hit zero. - Use prompt caching. For most Claude models only uncached input tokens count toward ITPM. Caching a long system prompt can multiply how much traffic fits in your limit.
- Lower
max_tokensto what you actually need, and queue requests instead of firing them all at once. - Check your tier at platform.claude.com/usage/limits. Tiers rise automatically with usage history, and you can request higher limits. New organisations may start in an Evaluation tier with lower limits.
Fast mode on Opus 5.5 has its own rate limits, separate from standard Opus limits.
429 Spend Cap and 400 Spend Limit Errors
These two look like rate limits but are about money, and retrying never helps.
429 with enforced_spend_limit_reached
Each usage tier has a monthly spend cap: $500 on Start, $1,000 on Build and $200,000 on Scale. Once you reach it, usage pauses until 00:00 UTC on the first day of the next month. The response is a 429 rate_limit_error with the message “You have reached your API usage limits” and error.details.error_code set to enforced_spend_limit_reached. Importantly, it has no retry-after header, and even the SDK’s automatic retries keep failing. The only fixes are waiting for the new month or moving to a higher tier.
400 “You have reached your specified API usage limits”
This one is your own spend limit, set in the Console under Billing > Spend limits. It comes back as a 400 invalid_request_error, or “specified workspace API usage limits” for a workspace limit. Raise the limit with Adjust limit (it cannot go above your tier’s cap) and requests work again straight away.
500 api_error and 504 timeout_error
500 api_error is an unexpected internal error on Anthropic’s side. Retry with exponential backoff, and if it continues, contact support with the request ID.
504 timeout_error means the request took too long. The API also returns timeout_error with other status codes, for example a 500 when a request reaches the server’s time limit before the response starts. The fix for long generations is to use streaming, which keeps the connection active as tokens arrive, or to send long jobs through the Batch API and poll for results. Some networks also drop idle connections, which is another reason streaming is safer for long outputs. Note that with streaming, an error can arrive as an event after a 200 response, so handle stream error events too.
401, 402, 403, 404 and 413 Errors
- 401 authentication_error: your API key is malformed, revoked or expired. Create a new key in the Console and make sure it is passed as the
x-api-keyheader (the SDKs readANTHROPIC_API_KEYautomatically). - 402 billing_error: fix your payment details in the Console billing page.
- 403 permission_error: the key’s workspace cannot use that resource. Check workspace settings and model access.
- 404 not_found_error: wrong path or ID. A very common cause is an old or misspelled model ID. Current IDs are
claude-opus-5-5,claude-sonnet-5-5,claude-haiku-5-5andclaude-fable-5-1, and retired models such as Claude 3.5 Haiku and Opus 4.1 no longer run on the first-party API. - 413 request_too_large: the request exceeded the size limit: 128 MB for the Messages API, 256 MB for the Batch API and 500 MB for the Files API. Upload big files through the Files API and reference them instead of inlining them.
Retry Code That Handles All of Them
Here is a small Python pattern that retries the right errors, stops on the ones that will never succeed, and falls back from Opus 5.5 to Sonnet 5.5 when Opus is overloaded. It uses the official anthropic SDK with its built-in retries turned off so the logic is explicit.
import random, time
import anthropic
client = anthropic.Anthropic(max_retries=0)
MODELS = ["claude-opus-5-5", "claude-sonnet-5-5"]
def ask(prompt):
for model in MODELS:
for attempt in range(6):
try:
return client.messages.create(
model=model,
max_tokens=1024,
messages=[{"role": "user", "content": prompt}],
)
except anthropic.RateLimitError as e:
if "enforced_spend_limit_reached" in str(e):
raise # spend cap: retrying will never work
wait = e.response.headers.get("retry-after")
time.sleep(float(wait) if wait else 2 ** attempt + random.random())
except anthropic.APIStatusError as e:
if e.status_code in (500, 504, 529):
time.sleep(2 ** attempt + random.random())
continue
raise # 400, 401, 403, 404, 413: fix the request
except anthropic.APIConnectionError:
time.sleep(2 ** attempt + random.random())
# this model kept failing, try the next one
raise RuntimeError("All models failed")
If you prefer the SDK to do it for you, simply create the client with anthropic.Anthropic(max_retries=5). The SDK retries connection errors, rate limits and 5xx errors with exponential backoff and honours retry-after.
Claude App and Claude Code Limit Messages
In the Claude apps and Claude Code you do not see HTTP codes, you see plan limits. Every paid plan has a session limit that resets every five hours and a weekly limit, and chat and Claude Code share the same pool. When you see a limit message:
- Check Settings > Usage to see whether it is the session or the weekly limit, and when it resets.
- Switch to a lighter model. Sonnet and Haiku use much less allowance than Opus or Fable.
- Start a fresh chat. Very long conversations use more allowance per reply.
- Turn on usage credits to keep working at API rates after the limit, or upgrade. Verified Ultra accounts have no five-hour limit at all.
If you use Claude Code with an API key instead of a subscription, the API errors above apply, and the Claude Code workspace has its own limit that can return a 429 with a retry-after header. I explain all plan limits in Claude Free vs Pro vs Max vs Ultra.
Frequently Asked Questions
Why does Claude say it is overloaded?
A 529 overloaded error means Anthropic’s servers are under heavy load from all users. It is temporary. Retry after a short wait or switch to another model.
What is the difference between 429 and 529?
429 is about your own organisation’s limits (rate or spend). 529 is about Anthropic’s overall capacity and affects everyone.
How long does a Claude rate limit last?
Per-minute limits refill continuously, so usually seconds. The retry-after header tells you exactly. A spend cap lasts until the start of next month unless you move up a tier.
Will retrying fix a spend limit error?
No. A 429 with enforced_spend_limit_reached and a 400 “specified API usage limits” error both need a billing change: a higher tier, a higher spend limit you set yourself, or the start of a new month.
Where do I report a Claude bug?
Contact Anthropic support with the request_id from the error response.
Final Thoughts
Most “Claude not working” moments come down to three things: Anthropic is busy (529), you are going too fast (429), or you have run out of budget or plan allowance. Read the error type, check the status page, and only retry the errors that can succeed. With prompt caching, a sensible backoff and a fallback model in place, these errors become rare blips rather than outages.
Running into similar problems elsewhere? See my DeepSeek API guide, which covers the “server is busy” error, and if you want a model that never rate limits you, try running one locally with my Ollama install guide.




