blaschkeSign up
View Markdown

Errors and retries

Resolve request, authentication, balance, and service errors. Retry only when appropriate, with explicit limits.

Read status and type.

Read the HTTP status and error type. Generated errors currently use param: null and code: null; upstream responses may provide different details.

JSON
{"error":{"message":"...","type":"invalid_request_error","param":null,"code":null}}
HTTP outcomes
StatusMeaning
400Invalid JSON, content type, request field, role, or output budget.
401Missing, invalid, or inactive API key.
402The available balance cannot cover the requested maximum.
404Unknown model ID or endpoint.
409An accounting update conflicted with another request.
429A budget or concurrency limit rejected the request.
502/503The inference worker failed or is unavailable.
504The inference request timed out.

Fix deterministic failures.

Do not retry errors caused by invalid JSON, unsupported fields, an unknown model, or invalid credentials.

  • 400: correct the request schema or output budget.
  • 401: check the API key and its deployment.
  • 402/409/429: check the error message for balance, accounting, or concurrency failures.
  • 503: check model availability before retrying.

Bounded retries only.

Blaschke retries specific model-loading 503 responses a limited number of times. It does not generally retry POST requests or resume interrupted streams.

  • Use bounded exponential backoff with jitter for retryable transport or server failures.
  • Retry-After may be absent; use your own bounded delay.
  • A timeout does not establish whether a request was processed.
  • Keep a request journal to reconcile interrupted or expensive requests.