Free 5 min read Developer guide

Claude API Error Codes Explained

529 overloaded, 429 rate limit, 503 unavailable, 500 server error — what each means and how to fix it in your code.

Anthropic API live status

Anthropic API — live status

Updated every 5 minutes. 24h latency sparkline + incident history at prismix.dev/service/anthropic.

Full status →

Error code quick reference

Code Meaning Who’s at fault Fix
529 Server overloaded Anthropic (all users affected) Exponential backoff, monitor status
429 Rate limit exceeded Your account / request rate Slow down; upgrade usage tier
503 Service unavailable Anthropic (deployment / infra) Retry after 5–10s; check status
500 Internal server error Often a bad request payload Validate request; check model name
401 Unauthorized Invalid or missing API key Check x-api-key header and key validity
400 Bad request Malformed JSON / wrong params Validate payload against API docs

529 Overloaded — the full picture

HTTP 529 is Anthropic’s custom status code meaning “we have more demand than capacity right now.” Unlike 429, it is not your fault — every client hitting the API gets the same response during a 529 incident.

  • Appears on all Claude surfaces simultaneously: API, claude.ai, Claude Code, Cursor, etc.
  • Typically lasts 5–30 minutes. Incidents exceeding 2 hours are rare.
  • Official acknowledgment on status.anthropic.com usually lags 10–20 minutes behind actual degradation.
  • Our probes at prismix.dev/service/anthropic detect overload from latency spikes before the status page updates.

Retry pattern (Python)

import anthropic, time, random

client = anthropic.Anthropic()

def call_with_backoff(prompt: str, max_retries: int = 6):
    delay = 1.0
    for attempt in range(max_retries):
        try:
            return client.messages.create(
                model="claude-sonnet-5",
                max_tokens=1024,
                messages=[{"role": "user", "content": prompt}],
            )
        except anthropic.RateLimitError:          # 429
            raise                                  # your rate limit — fix at source
        except anthropic.APIStatusError as e:
            if e.status_code in (529, 503, 500) and attempt < max_retries - 1:
                jitter = random.uniform(0, 0.3 * delay)
                time.sleep(delay + jitter)
                delay = min(delay * 2, 60)
                continue
            raise
    raise RuntimeError("Max retries exceeded")

Retry pattern (TypeScript)

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic();

async function callWithBackoff(prompt: string, maxRetries = 6) {
  let delay = 1000;
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    try {
      return await client.messages.create({
        model: "claude-sonnet-5",
        max_tokens: 1024,
        messages: [{ role: "user", content: prompt }],
      });
    } catch (err: any) {
      const status = err?.status;
      if ([529, 503, 500].includes(status) && attempt < maxRetries - 1) {
        const jitter = Math.random() * delay * 0.3;
        await new Promise((r) => setTimeout(r, delay + jitter));
        delay = Math.min(delay * 2, 60_000);
        continue;
      }
      throw err;
    }
  }
}

429 Rate Limit — diagnose and fix

Check response headers

Anthropic returns retry-after, anthropic-ratelimit-requests-remaining, and anthropic-ratelimit-tokens-remaining headers. Read these before retrying — retry-after tells you exactly how long to wait.

Know your limits

Rate limits apply per API key and vary by usage tier. Check your current limits at console.anthropic.com/settings/limits. Default tiers allow ~60 requests/min and ~100k tokens/min. High-volume workloads need Tier 3 or 4.

Use token-efficient models for high-throughput tasks

Haiku 4.5 has higher token-per-minute limits than Sonnet 5 and costs ~20× less per token. For classification, extraction, or routing tasks, Haiku is often the right model and rarely hits rate limits.

Batch requests with a queue

If you are sending many concurrent API calls, add a client-side request queue that enforces your RPM and TPM limits before hitting the API. Libraries like p-limit (Node.js) or asyncio.Semaphore (Python) make this straightforward.

Frequently asked questions

Is 529 the same as "Claude is currently overloaded with requests"?
Yes. The HTTP 529 status code and the error message "Claude is currently overloaded with requests" refer to the same condition. Both indicate Anthropic is at capacity. The message appears on claude.ai; the 529 status code appears in API responses.
How long do 529 overload incidents usually last?
Based on data from 6 weeks of monitoring: most 529 incidents resolve within 5–30 minutes. Incidents exceeding 2 hours are rare (under 5% of all incidents). Prismix tracks resolution times at prismix.dev/service/anthropic.
Does the Anthropic SDK handle retries automatically?
The official Anthropic Python and TypeScript SDKs retry on 529, 503, and 500 by default (up to 2 retries). You can configure max_retries when initializing the client. For production workloads, override the default with a higher limit and custom delay logic as shown above.
Can I get alerted when the Anthropic API recovers from a 529?
Yes — Prismix sends email or webhook alerts when Anthropic API status changes. Free accounts get alerts on one service; Pro adds up to 5 destinations and webhooks. Set it up at prismix.dev/service/anthropic → star the service.

Monitor Anthropic API status automatically

Get email or webhook alerts the moment Anthropic reports an incident — before the status page updates.

Set up alerts →

Free account · No credit card

Related guides