Kryyt / Developers
Errors & Recovery
Read both the HTTP status and error code before deciding to retry.
Status and error codes
| Status / code | Meaning | Action |
|---|---|---|
| 400 / invalid_json | JSON cannot be parsed | Send a valid JSON object and Content-Type header. |
| 400 / missing_required_parameter | Missing model, messages, or prompt | Correct the named parameter. |
| 400 / invalid_value, unsupported_value | Invalid roles/content, or n other than 1 | Correct the request before retrying. |
| 400 / vision_not_supported | Model does not accept image input | Choose an available vision-enabled model or remove images. |
| 401 / invalid_api_key | Missing, invalid, revoked key, or inactive project | Check your project key; do not retry unchanged. |
| 404 / model_not_found | Model is not available | Query /v1/models with the same key. |
| 413 | Request too large | Reduce image/body size. A proxy may return HTML rather than JSON. |
| 429 / insufficient_credits | Available purchased balance cannot cover the estimated request | Recharge or lower the requested output budget; waiting alone does not fix it. |
| 429 / gateway rate limit | Traffic throttled by the gateway | Use bounded exponential backoff and honor Retry-After if present. |
| 502 / upstream_error | Model request failed | Inspect the error; retry transient failures cautiously. |
| 500 / internal_error | Unexpected gateway failure | Retain X-Request-ID for support; avoid unlimited retries. |
Error body
{
"error": {
"message": "Recharge Kryyt credits to continue",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_credits"
}
}Gateway-generated validation and funding errors use this shape. A reverse proxy or infrastructure failure may return a different body; check status and Content-Type before parsing JSON.
Retry policy
Do not retry invalid keys, bad input, unavailable models, oversized bodies, or insufficient credits unchanged. For transient failures, use a small retry budget with backoff and jitter. A timeout can occur after generation began, so a retry may duplicate output and usage. This gateway does not provide an idempotency guarantee for completions.
Examples disable the SDK's automatic retries so your application can distinguish funding errors from traffic throttling. See stream interruptions before retrying a partial answer.
Diagnostics
Retain the response X-Request-ID, status, error code, and a timestamp. Do not log API keys, sensitive prompts, or image data URLs. The status page is informational and is not a guarantee that every dependency is operational.