Skip to content

Errors and Troubleshooting ​

Record the timestamp, HTTP status, model, endpoint, and request ID first. Remove the API key before sharing diagnostics.

Common status codes ​

StatusCommon causeRecommended action
400Invalid JSON, parameters, or request formatCheck model, stream, Content-Type, and the endpoint example
401Missing, invalid, disabled, or expired keySet or create the key again and verify the auth header
403Account, project, or upstream permission is missingUse a model with the required capability or contact the administrator
404Wrong path, missing model, or unsupported endpointCheck duplicate /v1 segments and refresh the model list
409Request state conflictAvoid duplicate submission and follow the response details
429Concurrency, rate, capacity, or upstream limitHonor Retry-After, back off, or try later
500Internal gateway errorKeep the request ID, retry later, and report it if persistent
502Invalid upstream response or connection failureRetry later and report persistent failures with a request ID
503No compatible account is availableSwitch models, retry later, or contact the administrator
504Upstream timeoutReduce request complexity or increase the client timeout

Selected model is at capacity ​

No compatible upstream account for that model can accept the request immediately. This usually reflects pool load, rate-limit windows, or capacity, not a corrupted local configuration.

  1. Wait a few seconds and retry with exponential backoff.
  2. Confirm that the model still appears in /v1/models.
  3. Temporarily switch to an alternative model when available.
  4. If the issue persists, provide the timestamp, model, and request ID to the administrator.

High time to first token ​

Time to first token includes network setup, queueing, account selection, upstream handshake, pre-inference work, and tool preparation.

  • Use streaming to improve perceived latency.
  • Avoid sending unnecessarily large context on every request.
  • Compare with a lower reasoning effort.
  • Measure several requests and inspect P50/P95 instead of one sample.
  • Separate slow connection setup from slow upstream generation.

An image was generated but the client shows nothing ​

Inspect the raw JSON first. If b64_json exists, generation succeeded and the issue is client rendering. If no image field exists, check the model, group, and request format. See Image Generation and Edits.