# HTTP 529 `overloaded_error` — API Store Hub

> VI: HTTP 529 (`overloaded_error`) là mã lỗi đặc thù của Anthropic khi cụm GPU phục vụ Claude (đặc biệt Opus/Sonnet giờ cao điểm) quá tải tạm thời.
> EN: HTTP 529 (`overloaded_error`) is Anthropic's transient capacity status emitted when Claude clusters experience sudden global demand spikes.

- Canonical VI: https://apistorehub.com/vi/loi-api/529-anthropic-overloaded
- Canonical EN: https://apistorehub.com/en/loi-api/529-anthropic-overloaded
- Retry Policy: Catch `status === 529 || status === 503`, pause 1.5–4s with jitter, and fail over after 2 attempts.

## Root Causes
- Global peak bursts on flagship Claude Opus and Sonnet models.
- Very large prompts with Extended Thinking during upstream congestion.
- Hardcoding a single model ID with no fallback chain.

## Step-by-Step Resolution
1. Enable `stream=True` to receive initial tokens early and avoid blocking waits.
2. Treat HTTP 529 as retryable with 1.5s -> 3s -> 6s backoff plus jitter.
3. Configure a fallback chain (`claude-sonnet-5-5` -> `claude-haiku-5-5` or `gpt-6.2-sol`) on high-SLA flows.
4. Monitor real-time model uptime on the `/status` dashboard.

## Diagnostic cURL
```bash
curl -i https://apistorehub.com/v1/messages \
  -H "x-api-key: sk-ash-your_key" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-5-5","max_tokens":128,"messages":[{"role":"user","content":"Health check"}]}'
```

## Production Fix (TypeScript)
```
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({ baseURL: "https://apistorehub.com", apiKey: process.env.API_KEY });

export async function askClaudeResilient(prompt: string) {
  const models = ["claude-sonnet-5-5", "claude-haiku-5-5"];
  for (const model of models) {
    try {
      return await client.messages.create({
        model,
        max_tokens: 1024,
        messages: [{ role: "user", content: prompt }],
      });
    } catch (err: any) {
      if (err?.status !== 529 && err?.status !== 503) throw err;
    }
  }
  throw new Error("All Claude lanes busy");
}
```

## FAQ
- **Why do some HTTP clients skip retrying 529 automatically?**: Generic retry libraries often only retry 429/500/502/503/504; explicitly add 529 to your retry filter.
- **Does API Store Hub automatically fail over healthy upstream lanes on 529?**: Yes. Gateway health routing shifts traffic to healthy upstream capacity automatically.
- **Am I charged ST credit when 529 happens?**: No. Failed 529 calls are never billed.
