Skip to content
AI Dev Toolkit.
Esc
  • AI Token CounterCount tokens for GPT, Claude, Gemini, DeepSeek, Qwen and more.Tool
  • LLM API Cost CalculatorEstimate per-request, daily and monthly API costs.Tool
  • AI Model ComparisonCompare prices, context windows and features across models.Tool
  • AI Model Pricing PagesSpecs, real costs and cheaper alternatives for popular models.Tool
  • Context Window CheckerSee whether your text fits each model's context window.Tool
  • Subscription vs API CalculatorFind out whether a chat plan or the API is cheaper for you.Tool
  • GPU / VRAM CalculatorCheck how much VRAM a local model needs and which GPUs fit.Tool
  • Claude Code Error DatabaseExact Claude Code error messages with tested fixes.Tool

Claude Code · Server and limits

API Error: 500 Internal server error

Something failed inside the API. It isn’t caused by your prompt, settings or account, and usually clears within minutes.

Message

The exact error

Claude Code
API Error: 500 Internal server error. This is a server-side issue, usually temporary — try again in a moment. If it persists, check https://status.claude.com.

Also appears as:

From a proxy or gateway
API Error: 502 Bad Gateway

Meaning

What it means

A 5xx status means the request reached the server and failed there. It’s not something you sent. When the error page comes from a proxy, load balancer or gateway in between, the message shows that page’s status and title instead, such as 502 Bad Gateway. On Amazon Bedrock, Google Cloud or Microsoft Foundry, the last sentence names that provider’s status page.

Causes

Common causes

  • A temporary fault or incident at Anthropic or your cloud provider
  • A proxy or gateway between you and the API failing

Fix

How to fix it

  1. Check the status page

    Look at status.claude.com, or the provider status page the message names, for an active incident.

  2. Wait a minute and resend

    Your message is still in the conversation, so for a long prompt you can just type try again.

  3. Report it if it persists

    With no incident posted and the error repeating, run /feedback so Anthropic can look at your request.

Related

Search all Claude Code errors