Errors
Error codes, what they mean, and which to retry.
Errors use the OpenAI error shape:
{
"error": {
"message": "Human-readable description",
"type": "rate_limit_exceeded",
"code": "rate_limit_exceeded",
"request_id": "qlo-..."
}
}| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request is malformed or uses an unsupported option. |
| 400 | context_length_exceeded | The prompt and requested output exceed the model's context window. |
| 401 | authentication_error | The API key is missing, invalid or revoked. |
| 402 | insufficient_credits | Your credit cannot cover this request. Add credit in the dashboard. |
| 403 | permission_denied | The key or organization is not allowed to do this. |
| 404 | model_not_found | The model id is unknown. Ids are case-sensitive. |
| 413 | payload_too_large | The request body is over the size limit. |
| 429 | rate_limit_exceeded | Too many requests or tokens for this key, or the daily spend limit was reached. |
| 502 | upstream_error | The model could not be served. |
| 503 | model_unavailable | The model is temporarily unavailable. |
| 504 | timeout | The request took too long. |
Retrying
Retry 429, 502, 503 and 504 with exponential backoff and jitter, honouring retry-after when present. Do not retry other 4xx errors without changing the request.
Getting help
Email hello@qloud.sh with the x-qlo-request-id, the time, the model id and the status code. Never send an API key.