Troubleshooting

Causes and fixes for common AI API errors: 401 invalid key, 402 insufficient balance, 403, 404 model not found, 429 rate limits, 502 / 529, stream drops.

Fix Claude Code "Streaming Response Ended" Errors

Claude Code "Streaming response ended before any complete data was received" means the SSE stream closed early; find the proxy, gateway or network at fault.

Fix Codex "Stream Disconnected Before Completion" Errors

Codex "stream disconnected before completion: upstream request failed" means a Responses stream broke early; read the reason and fix the gateway or network.

Fix 502 Bad Gateway Errors in GPT and Claude API Calls

Learn why GPT and Claude API calls return 502 Bad Gateway, how to tell which hop failed from the response, how 502 differs from 504 and 529, and how to fix it.

Concurrency Limit Exceeded for Account: How to Fix It

"Concurrency limit exceeded for account, please retry later" means too many API calls are in flight; see how it differs from RPM and how to cap parallel calls.

Fix API Error: 402 Insufficient Balance and Budget Limits

API Error: 402 Insufficient Balance, 402 Payment Required or "budget pool quota has been exhausted"? Find which pool ran out and how to fix it.

Fix 529 Overloaded Errors, API Timeouts, and Dropped Streams

Fix 529 overloaded_error, request timeouts, and dropped streams in AI APIs with correct retries, timeout settings, stream recovery, and task splitting.

Fix 403 Forbidden API Errors in Claude Code, Codex, Cursor

Getting 403 Forbidden or "Access to this model requires an access grant"? Find which rule blocked you: allowlist, group, client, team policy or region.

429 Too Many Requests: Fix Claude and OpenAI Rate Limits

Fix 429 Too Many Requests in the Claude and OpenAI APIs: tell RPM, TPM, concurrency and quota limits apart, honor retry-after, and add backoff that works.

Fix "Unexpected Status 401 Unauthorized: Incorrect API Key"

Getting "unexpected status 401 Unauthorized: Incorrect API key provided" in Codex? Read the url in the error, fix the login mode, then test your key with curl.

Model Not Found Error: What It Means and How to Fix It

What "model not found" means and how to fix it in ChatGPT, the OpenAI API, Claude Code, Codex and Cursor: check the base URL, the exact model ID and key access.