Find the failure by status code

CodeMeaningWhat to do
400Malformed request or protocol mismatchValidate JSON, route, model ID, and protocol headers (keep anthropic-version for Claude)
401Invalid or missing keyRe-copy the key, check Bearer / x-api-key; rotate immediately if it may have leaked
403Insufficient balance or accessCheck wallet balance, key quota, model permissions, and group access
429Rate limitedRetry with exponential backoff plus jitter, lower concurrency, and check whether the limit came from the gateway or upstream
5xxUpstream or routing failureKeep the request id and ask an administrator to check channel health and upstream status
TimeoutSlow first token or interrupted streamUse a smaller prompt, confirm stream=true, and check whether a proxy buffers SSE

Recommended order

  1. Run a minimal request: curl /v1/models to verify authentication.
  2. Send one minimal chat request to separate auth errors from model/protocol errors.
  3. Read the error body and the request id.
  4. Check the usage log to see whether the request was recorded.

If an API key is exposed

  1. Disable or delete the key in the console immediately.
  2. Create a replacement and update every consumer (env vars, password managers, client config).
  3. Review usage logs for requests you do not recognize.

What to provide when reporting a problem

Request time, route, model ID, HTTP status, request id, client version, and a redacted error message. Never send the key itself.