Errors & retries
The errors BlazeInfer returns today, which ones to retry, and what to include in a support request.
Most errors are JSON
Most error responses are JSON in the OpenAI shape. A few errors that BlazeInfer
raises before it calls the model, such as a 429 from a credit rule, can be
plain text. Always check the HTTP status first.
Error shapes
| Situation | Status | Body today |
|---|---|---|
Missing key, or a key not sent as Authorization: Bearer (for example x-api-key, or bearer in lower case) | 401 | {"error":{"message":"api key required","type":"invalid_request_error"}} |
| Invalid, expired, revoked or blocked key | 401 | {"error":{"message":"invalid api key","type":"invalid_request_error"}} |
| BlazeInfer cannot check the key (a temporary fault) | 503 | {"error":{"message":"api key lookup failed","type":"server_error"}} |
| Unknown or unavailable model, or a path that does not exist | 404 | {"error":{"message":"The requested model is not currently available.","type":"not_found","code":404}} |
| The model is temporarily unavailable | 503 | {"error":{"message":"Upstream provider error.","type":"server_error","code":503}} |
No capacity for the model, or auto cannot pick a model | 503 | Plain text, for example no models are currently available |
| The model is overloaded | 429 | {"error":{"message":"Upstream rate limit exceeded. Please retry.","type":"rate_limited","code":429}} |
| A credit rule is triggered, or BlazeInfer is overloaded | 429 | Plain text |
The model rejected the request (invalid JSON, a missing messages field, a prompt over the context window, …) | 400 (or another 4xx) | {"error":{"message":"The upstream provider rejected the request.","type":"invalid_request","code":400}} |
| A stream fails after it started | 200, then the stream stops | No error body. The client sees a truncated stream |
To find the likely cause of a 400, match the message you see against
Error messages and what they mean.
Retries
429: the same status covers an empty credit balance and a short overload. If your balance is empty, a retry never succeeds. Check your credit first, and retry with backoff only when you have credit.503/502: a temporary fault, or the model is unavailable. Retry with exponential backoff, or use another model.404: a wrong model ID, or a path that does not exist. Do not retry. Check the ID against console.400: do not retry the same request. Change it first.401: do not retry. Fix the key.- Truncated streams: treat a stream that ends without a
finish_reasonas a failure, and retry the request.
Debugging with request IDs
Inference responses (chat and completions) carry an X-Request-Id header.
If you send your own X-Request-Id, BlazeInfer echoes it back. Quote it in support
requests so that a specific request can be traced.
curl -si https://blaze.e2enetworks.net/v1/chat/completions \
-H "Authorization: Bearer $BLAZE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"google/gemma-4-31b-it","messages":[{"role":"user","content":"hi"}]}' \
| grep -i x-request-idThe output is one line, for example x-request-id: 6c29234b25307a10.