Gengxi API Developer Docs

Errors

Understand public error codes and take safe recovery actions.

Error handling

Use the HTTP status, stable public error code, message, and Request ID when available. Do not parse internal provider details as a stable contract.

Error reference

StatusCodeMeaningWhat to do
400invalid_request_errorThe request is malformed or unsupported.Validate fields and content types.
400api_key_in_query_deprecatedA query parameter was used for authentication.Move the key to an authorization header.
401API_KEY_REQUIRED / INVALID_API_KEYA key is missing or invalid.Check the header and key value.
401API_KEY_DISABLED / USER_INACTIVEThe key or user cannot make requests.Review account and key status.
403API_KEY_EXPIREDThe key has expired.Create or update a valid key.
403INSUFFICIENT_BALANCE / ACCESS_DENIEDBalance or access policy blocks the request.Check Usage, subscription, and group access.
404model_not_found / not_found_errorThe model or resource is unavailable.Call GET /v1/models and verify the path.
429API_KEY_QUOTA_EXHAUSTED / USAGE_LIMIT_EXCEEDED / rate_limit_exceededA quota or rate limit was reached.Honor Retry-After and use exponential backoff.
500INTERNAL_ERRORAn internal error occurred.Retry safely; contact Support with the Request ID.
502upstream_errorAn upstream request failed.Retry later with backoff.
503service_unavailable / API_KEY_AUTH_OVERLOADEDCapacity is temporarily unavailable.Retry later with backoff.

Retry policy

  • Retry only idempotent or safely repeatable operations.
  • Honor Retry-After on 429 responses.
  • Use exponential backoff with jitter for 429, 502, and 503.
  • For persistent 500 errors, include the Request ID when contacting Support.