Skip to content
API referenceBlogDashboard

Errors

Status codes, error codes and what to retry.

Errors use the error shape of the endpoint you called.

OpenAI endpoints
{ "error": { "message": "Not enough credit for this request. Top up at https://app.solcardinference.ai/top-up", "type": "insufficient_quota", "code": "insufficient_balance", "required_micros": "2950000", "available_micros": "2730000" } }
Messages
{ "type": "error", "error": { "type": "billing_error", "message": "Not enough credit for this request. Top up at https://app.solcardinference.ai/top-up", "required_micros": "2950000", "available_micros": "2730000" } }
Status Code Meaning Retry?
400 invalid_request Malformed body, missing model, bad output limit No
400 model_not_found Unknown model ID No
400 unsupported_content Non-text content (images, audio, files) No
400 unsupported_tool Chat Completions tool type other than function (Responses and Messages leave hosted tools out instead) No
400 unsupported_parameter n > 1, best_of, previous_response_id, store: true, or thinking outside Messages No
401 invalid_api_key Missing, revoked or unknown key No
402 insufficient_balance Neither your credits nor your plan can cover the request, and no window reset would help After topping up
402 key_limit_exceeded Your credits could cover the request, but the key’s monthly spend limit has less left than it needs Next month, or raise the limit
403 account_suspended Account suspended No; contact support
403 content_policy_violation The request is outside the usage policy No
429 rate_limited Over requests per minute Yes, after retry-after
429 concurrency_limited Too many requests in flight Yes, after retry-after
429 plan_limit_reached Your credits cannot cover the request and the plan’s weekly limit is used up; resets_at says when it resets After resets_at, or after topping up
502 upstream_error, upstream_unavailable Model backend failed Yes, with backoff
503 server_busy Service at capacity Yes, after retry-after
503 billing_unavailable, shutting_down, content_policy_unavailable Transient Yes
504 upstream_timeout Generation exceeded 9 minutes No: this request was charged

A 402 refused before anything was reserved also carries required_micros, the least the request could reserve (its input plus the smallest reply), and available_micros, what the limit that refused it has left: your credits for insufficient_balance (or, when the key’s monthly limit is short too, what the key could still spend), the key’s monthly limit for key_limit_exceeded. Both are integer micro-USD strings (1 USD = 1,000,000). When available_micros is well above zero, the request itself is too big for what is left: a long conversation, an expensive model, or both.

503 responses carry x-should-retry: true; 504 carries x-should-retry: false so SDKs do not retry and charge you twice.

If an error happens after a stream has started, the stream ends early without a final usage event.