Troubleshooting
Quickly diagnose protocol, key, model, and environment errors.
Find the row that matches what you are seeing.The gateway returns Chinese, English, or other text based on the Accept-Language header; it defaults to English when the header is not set.
| Symptom | Cause | What to do |
|---|---|---|
| 401 "Missing API key" / "Invalid API key" / "API key has expired" | No key was sent, the key was copied incompletely or with extra whitespace, or the key was deleted, disabled, or expired | Re-copy the full key from API Keys in the console; create a new one if needed |
| 402 "Insufficient balance" / "API key quota exhausted"; video submissions return "Insufficient balance: available …" | The account balance, this key's quota, or the balance reserved when a video task was submitted is insufficient | Add funds or adjust the key's quota before retrying; 402 does not resolve on its own, so do not retry in a loop |
| 429 "… are currently rate limited, please retry later" 502 "… service is temporarily unavailable, please retry later" 503 "No … is available right now, please retry later" / "The request could not be completed right now, please retry later" 504 "… request timed out, please retry later" | The model is temporarily unavailable or the response timed out | Retry using Retry-After or exponential backoff, or switch to another model in the same family; if it persists past 10 minutes, contact us with the X-Request-ID from the response headers |
| The request disconnects mid-flight and is logged as 499 | The client disconnected before completion — either a manual cancel, or the client's own read timeout fired first (openai-python defaults to 600 seconds; other clients vary) | Switch to streaming for long outputs and raise the client's read timeout |
| An error event arrives partway through a streamed response (for example "Response stream interrupted, please retry") or the connection drops | The failure happened after output had already started, so the stream cannot resume in place | Discard the partial output received so far and resend the whole request |
| 404 "The current group does not support the requested model: X" / "The group this API key belongs to does not provide the requested model…"; 400 "… is not a valid model ID" | The model ID is not in this key's group, is misspelled, or a decommissioned ID is still cached in your client configuration | Call GET /v1/models with this key and copy a full ID from the response; if it is not listed, switch to a key from a group that includes it. Do not retry automatically |
| 404 "Model "X" is not supported by any configured account in this group" | The model cannot currently serve requests for this group | Call GET /v1/models with this key first: if the model is listed, treat it like the 502 / 503 case above; if not, switch model ID or use a key from a different group |
| 404 "This API path is not supported by the current platform" | The path does not belong to this key's group: a Claude key called an OpenAI-protocol endpoint; the Anthropic Base URL has an extra /v1 (turning it into /v1/v1/messages); or the path is one the platform does not expose, such as /v1/dashboard/billing/*, /v1/files, /v1/batches, /v1/embeddings, or Codex web search's /v1/alpha/search | Switch Claude to the Anthropic protocol with no /v1 in the Base URL; check balance with GET /v1/usage or the console; the web-search 404 does not affect normal conversations |
| 400 "Failed to read request body"; 413 "Request body exceeds the size limit (60 MB)" | The request body is incomplete, or it exceeds 60 MB (usually base64-encoded images or video) | Check the JSON and Content-Type; compress large files first, or pass a URL instead when the model supports it |
| 400 for exceeding context length (the exact text varies by model) | The conversation history, attachments, and max_tokens together exceed the model's context window | Trim the history or start a new conversation, and reduce max_tokens |
400 "Invalid signature in thinking block" / "duplicate thinking.signature" | Claude's thinking history was rewritten, spliced, or duplicated | Pass back the previous assistant turn's thinking block exactly as received (including its signature); never rewrite, merge, or reuse it across models. If you cannot fix it, restart the conversation without thinking history |
| 400 "No tool call found for function call output" / "No tool output found for function call" | Tool results and tool calls are not paired: tool_call_id / call_id do not match, or one side is missing | Return exactly one result for every tool call and pass its ID back unchanged; when trimming history, remove both sides of a pair together |
| 400 "Unsupported parameter: …" | The model does not accept a parameter you sent | Remove that parameter; on the Responses API, limit output length with max_output_tokens, not max_tokens |
| 400 content rejected by a safety policy (for example "Your request was rejected by the safety system.") | The prompt or a reference asset triggered the model's content-safety policy | Revise the prompt or asset before resending; resending the same request unchanged will be rejected again |
| 400 invalid image parameters (for example "size … is not valid") | The size, tier, or count is outside what that model supports | Adjust the value for that model per the Image API |
| 400 "media_download_failed" | The URL for a reference image or video is not publicly reachable | Use an HTTP(S) URL that can be downloaded without signing in |
| 404 "The group this API key belongs to has been taken offline and no longer serves requests…" | The group this key belongs to has been discontinued | Create a new key in a currently sold group in the console and replace the old one |
| "node / npm is not recognized" | Node.js is missing or not on PATH | Reinstall from nodejs.org (keep the defaults on Windows), then close and reopen the terminal |
| PowerShell blocks script execution | Windows execution-policy restrictions | Prefer the console's one-click setup command; or run Set-ExecutionPolicy RemoteSigned as Administrator |
Still stuck after working through this table? Contact us with the client name, model ID, approximate time, HTTP status code, the X-Request-ID from the response headers, and a screenshot with the key hidden.