Developer documentation
OpenAPI schemakisch.chat
Appearance
Documentation
API reference

Errors

Handle gateway, authentication, and upstream failures.

Requests can fail before reaching a model. The gateway may reject a missing or invalid key, a key without access to the requested model, malformed input, rate or budget limits, an unavailable model, or an upstream timeout. The HTTP status and error body are authoritative for the request that failed.

LiteLLM's OpenAI-compatible error payload typically contains an error object. Do not depend on provider-specific message text or a fixed error code across gateway upgrades.

HTTP statusTypical causeWhat to check
400Invalid request or unsupported parameterCheck JSON shape and the active model's documented capabilities.
401Missing, invalid, or revoked virtual keyAsk the key owner to verify the key and gateway URL.
403Key is not allowed to access the model or routeCheck key/team model access with the gateway operator.
404Route or model alias is not configuredConfirm the path and GET /v1/models output.
429Rate or budget limitReview key limits and retry policy with the operator.
5xxGateway or upstream failureCheck deployment health and request logs; retry only when safe.

For retries, use bounded exponential backoff and a request deadline. A failed or disconnected streaming request may already have consumed compute; automatic retries can repeat work.