Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Docs
API referenceSign in

Errors

Errors include a machine-readable code and a message. Distinguish a rejected request from an uncertain result that may already have used inference capacity.

Error format

JSON error
{
  "error": {
    "message": "Insufficient available credit for this request. Add credit or resolve pending reservations.",
    "type": "invalid_request_error",
    "code": "insufficient_credit"
  }
}

Use the response's x-request-id and your activity records to investigate a request. Never include the secret key or conversation content in a support report.

Status codes

StatusMeaning / action
400Invalid body, unknown fields, context limit, or unsupported capability.
401Missing, invalid, or revoked Bearer key.
402Insufficient available credit or the API key's spending limit was reached.
403Unavailable account or a model outside the key's allowlist.
404Unknown endpoint or unapproved model ID.
409An idempotency reference was already used.
413 / 415Body too large or content type other than application/json.
429Rate, request, or concurrency limit. Wait for the Retry-After interval before retrying; pending reservations may require reconciliation.
502Model generation error, invalid stream, or usage unavailable.
503Maintenance, readiness, launch configuration, or model_temporarily_unavailable.

HTTP 503 model_temporarily_unavailable uses type server_error and the message "The model is temporarily unavailable." X-Should-Retry is false. Wait for Retry-After when it is included.

Uncertain results

An inference timeout or usage_unavailable response can leave a pending hold. These errors include X-Should-Retry: false to suppress automatic SDK replays. Error codes distinguish unavailable models, invalid parameters, timeouts, and stream failures without exposing internal routing details. Inspect activity and reconcile the first result before deciding to submit a new call.

Idempotency

An optional Idempotency-Key contains 1–128 letters, digits, dots, underscores, colons, or hyphens. Reusing a reference returns 409 and does not rerun inference. This is duplicate prevention, not cached response replay.