Anthropic API Error: Internal Server Error (500) in Claude Code: what it is, and how to keep working
A 500 from Anthropic is a fault inside Anthropic's systems, not a problem with your request, key or plan. In Claude Code it prints as API Error: 500 api_error: Internal server error and, during an incident, comes back on every prompt. The threads on GitHub all resolve the same way: an Anthropic engineer links the status-page incident and, an hour or so later, it is over. The 529 overloaded_error entry covers the related overload case; this one is short because the answer is short.
Last verified September 21, 2026 against Anthropic docs: errors, anthropics/claude-code #45346: API Error: 500, anthropics/claude-code #35455: Anthropic API Error: Internal Server Error (500), Anthropic status: Elevated errors on Claude, April 8, 2026 · 3 min read
| Provider | Anthropic API, as used by Claude Code and the Anthropic SDKs |
| HTTP status | 500 Internal Server Error |
| Error type | api_error |
| Message | Internal server error |
| How common | Six Claude Code issues titled with this error have 15 to 33 upvotes each since January 2026; all track status-page incidents |
| Can you wait it out? | Yes. Anthropic's docs: retry with exponential backoff, and contact support with the request id if it persists. The incidents behind the big threads lasted twenty minutes to a few hours |
- Check status.claude.com. If there is an open incident, you are in it, and retrying by hand adds nothing to the retries Claude Code already made.
- Keep the request id. If it persists with no incident posted, that id is what Anthropic support needs.
- To keep working now: point Claude Code at another Anthropic-format endpoint with three environment variables, then point it back.
What it looks like
API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011CZ..."}It is not a 529 (overload: capacity exhausted, usually one model) and not a 429 (a limit on your organization or plan). Anthropic's guidance for 500 is to retry with exponential backoff; the SDKs and Claude Code already do that before the message reaches you.
Fix 1: wait for the incident
The April 8, 2026 incident lasted 19 minutes; others have run a few hours. Switching models within Claude Code rarely helps with a 500, because the fault is upstream of model selection. If nothing is on the status page after several minutes, contact support with the request_id from the error.
Fix 2: point Claude Code at another Anthropic-format endpoint
Claude Code will talk to any host that speaks the Anthropic Messages API. Ours serves open models on it, so this is a base URL and a key:
export ANTHROPIC_BASE_URL="https://api.inferenceapis.com"
export ANTHROPIC_AUTH_TOKEN="your-inferenceapis-key"
export ANTHROPIC_MODEL="zai-org/GLM-5.3[1m]"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-ai/DeepSeek-V4.1-Flash[1m]"
claude
# back to Anthropic: open a new shell, or unset the four variablesOn September 21, 2026, Claude Code 2.1.278 through this endpoint on GLM 5.3 ran a failing test, fixed the bug and re-ran it in 6 turns and 3 seconds. The Claude Code guide has the per-project settings.json form, the [1m] context suffix, and results for eight models.
Frequently asked questions
Does a 500 use up my quota?
No. Failed requests are not billed and do not count against plan windows.
Why do I see 500 and 529 in the same incident?
Overload and internal faults often arrive together when a service is under stress. Treat both as "Anthropic, temporary" and check the status page.
Where Inference APIs fits
Fix 2 is what we sell: an endpoint that speaks Claude Code's protocol for open models, so a 500 at Anthropic does not stop the work. They are not Claude; they finished our Claude Code test task for cents. US GPUs, zero retention, prepaid; a new account starts with $1 of credit.
Something changed or wrong? Tell us and we will re-verify the entry.
