Anthropic Claude API HTTP 529 5 min read

Claude API 529 Overloaded — How to Diagnose and Fix It

HTTP 529 is Anthropic's server-overload signal — your code is not broken. This guide explains how to tell whether it is a widespread incident or a localized spike, how to implement proper retry logic, and how to keep your app running during Claude API outages.

Anthropic API live status

Anthropic API — live status

Updated every 5 minutes · Full incident history →

Check now →

What does HTTP 529 mean from Claude?

HTTP 529 is a non-standard status code that Anthropic uses exclusively to signal server overload. It differs from other error codes:

Code Meaning Fix
401 Invalid or missing API key Check key in console.anthropic.com
429 Your account rate limit exceeded Slow down requests, add backoff
529 Anthropic servers are overloaded Retry with backoff, check status
503 Service temporarily unavailable Retry, check for major outage

The key distinction between 429 and 529: a 429 means you are sending too many requests; a 529 means Anthropic's infrastructure is at capacity regardless of your traffic volume. Both are temporary and retriable.

5 steps to fix and prevent 529 errors

1

Check whether it is a global incident or local spike

Before writing retry logic, determine whether Anthropic is having a platform-wide outage or whether your 529s are isolated. The fastest way is the Prismix status dashboard, which polls Anthropic's API and aggregates incident reports in real time.

Diagnosis checklist

  • Open prismix.dev/service/anthropic — active incidents appear at the top.
  • No incident shown but 529s continue? Try a different model (e.g. switch from claude-opus-4-8 to claude-3-5-haiku-20241022) — overload can be model-specific.
  • Also check status.anthropic.com directly for Anthropic's own incident page.
2

Use SDK built-in retries (simplest fix)

The official Anthropic Python and TypeScript SDKs automatically retry 429 and 529 errors with exponential backoff. The default is 2 retries — increase it for production workloads:

# Python — increase SDK retries to 5 (covers most transient 529 spikes)
import anthropic

client = anthropic.Anthropic(
    api_key=os.environ["ANTHROPIC_API_KEY"],
    max_retries=5,   # default is 2; max recommended is 8
    timeout=60.0,    # seconds per attempt
)
// TypeScript — same pattern
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  apiKey: process.env.ANTHROPIC_API_KEY,
  maxRetries: 5,
  timeout: 60_000,  // ms
});

With max_retries=5, the SDK will wait approximately 1 s, 2 s, 4 s, 8 s, and 16 s between attempts (with jitter) before surfacing the error to your code. This covers the vast majority of short 529 spikes with zero extra code.

3

Add explicit exponential backoff for long-running jobs

For batch processing or server-side jobs, write an explicit retry wrapper that handles 529 separately from 429, caps wait time, and logs each attempt:

import time
import random
from anthropic import Anthropic, APIStatusError

client = Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"], max_retries=0)

def create_with_backoff(max_attempts: int = 6, **kwargs):
    """Retry on 429 and 529 with exponential backoff + jitter."""
    for attempt in range(max_attempts):
        try:
            return client.messages.create(**kwargs)
        except APIStatusError as e:
            if e.status_code not in (429, 529):
                raise  # don't retry auth or validation errors
            if attempt == max_attempts - 1:
                raise
            wait = min(60.0, (2 ** attempt) + random.uniform(0, 1))
            label = "overloaded (529)" if e.status_code == 529 else "rate-limited (429)"
            print(f"Claude API {label}. Retry {attempt + 1}/{max_attempts - 1} in {wait:.1f}s")
            time.sleep(wait)

# Usage
response = create_with_backoff(
    max_attempts=6,
    model="claude-3-5-sonnet-20241022",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
// TypeScript async version
import Anthropic, { APIError } from '@anthropic-ai/sdk';

const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY, maxRetries: 0 });

async function createWithBackoff(params: Anthropic.MessageCreateParamsNonStreaming, maxAttempts = 6) {
  for (let attempt = 0; attempt < maxAttempts; attempt++) {
    try {
      return await client.messages.create(params);
    } catch (e) {
      if (!(e instanceof APIError) || ![429, 529].includes(e.status)) throw e;
      if (attempt === maxAttempts - 1) throw e;
      const wait = Math.min(60_000, (2 ** attempt) * 1000 + Math.random() * 1000);
      console.warn(`Claude API ${e.status} — retry ${attempt + 1} in ${(wait / 1000).toFixed(1)}s`);
      await new Promise(r => setTimeout(r, wait));
    }
  }
}
4

Implement a circuit breaker for production APIs

During a prolonged 529 incident, retrying every request wastes resources and queues up a backlog. A circuit breaker stops sending requests after a failure threshold, waits a fixed recovery window, then probes before resuming:

import time

class CircuitBreaker:
    def __init__(self, failure_threshold=3, recovery_timeout=60):
        self.failures = 0
        self.threshold = failure_threshold
        self.timeout = recovery_timeout
        self.opened_at = None
        self.state = "closed"  # closed | open | half-open

    def record_failure(self):
        self.failures += 1
        if self.failures >= self.threshold:
            self.state = "open"
            self.opened_at = time.monotonic()
            print(f"Circuit OPEN — pausing Claude API calls for {self.timeout}s")

    def record_success(self):
        self.failures = 0
        self.state = "closed"

    def allow_request(self) -> bool:
        if self.state == "closed":
            return True
        elapsed = time.monotonic() - self.opened_at
        if elapsed >= self.timeout:
            self.state = "half-open"
            return True  # probe request
        return False

breaker = CircuitBreaker()

def safe_create(**kwargs):
    if not breaker.allow_request():
        raise RuntimeError("Claude API circuit open — skipping request")
    try:
        result = client.messages.create(**kwargs)
        breaker.record_success()
        return result
    except APIStatusError as e:
        if e.status_code == 529:
            breaker.record_failure()
        raise
5

Fall back to a lighter model during overload

Overload is often model-specific. If claude-3-5-sonnet or claude-opus-4-8 returns 529s persistently, claude-3-5-haiku-20241022 (lighter infrastructure) may still be available:

MODEL_FALLBACK_CHAIN = [
    "claude-3-5-sonnet-20241022",
    "claude-3-5-haiku-20241022",   # lighter — often available during partial outages
]

def create_with_fallback(**kwargs):
    for model in MODEL_FALLBACK_CHAIN:
        try:
            return client.messages.create(model=model, **kwargs)
        except APIStatusError as e:
            if e.status_code == 529 and model != MODEL_FALLBACK_CHAIN[-1]:
                print(f"{model} overloaded — trying {MODEL_FALLBACK_CHAIN[1]}")
                continue
            raise
  • Off-peak hours: UTC 02:00–08:00 typically has the lowest Claude API load. Schedule heavy batch jobs in this window.
  • Prompt caching: reducing token load per request by caching your system prompt with cache_control: {"type": "ephemeral"} can decrease the probability of hitting 529 on high-throughput workloads.

Get an email the next time Anthropic goes down

Outage alerts for Anthropic, straight to your inbox. No account needed, unsubscribe in every email.

Watching more than one service? A free account covers 5 services + a daily digest — and Pro is currently free.

FAQ

Is HTTP 529 documented by Anthropic?

Yes. Anthropic's API reference documents 529 as "Overloaded" and recommends retrying after a short wait. It is the only non-standard HTTP code they use. Unlike 503, it specifically means the model-serving infrastructure is at capacity rather than the API gateway being down.

Will I be charged for a request that returns 529?

No. A 529 response means Anthropic did not process your request — no tokens were consumed and you are not billed. You only pay for successful completions and for cached input tokens that were written to cache in a prior request.

Can 529 errors affect the Batch API?

The Anthropic Message Batches API is designed for high throughput and handles capacity internally — individual 529s at the batch submission level are rare. If a batch is accepted (HTTP 200), Anthropic retries internally. If you receive 529 when submitting a batch, retry submission with backoff using the same pattern above.

Does upgrading my Anthropic tier reduce 529s?

Yes — higher tiers (Tier 3 and Tier 4, unlocked by historical spend of $1k and $40k respectively) get priority routing during high-load periods. They do not eliminate 529s during major outages, but they significantly reduce frequency during moderate load spikes. Check your tier at console.anthropic.com/settings/limits.

Related guides