Loading
Skip to content
RedRouterRedRouter
Dashboard ↗

Errors

Check the HTTP status and JSON error. Streaming failures may arrive after HTTP 200.

HTTP statuses

StatusAction
400Fix the request or remove unsupported fields.
401Check your API key.
402 / 403Check credits and key permissions. Messages uses 403 for insufficient credit; Chat Completions uses 402.
404Check the model ID. Token counting always returns 404.
413Reduce the request body.
429Wait for the Retry-After seconds, then retry. The code names the limit: concurrency_limit_exceeded, requests_per_minute_limit_exceeded or daily_spend_limit_exceeded.
503supplier_budget_exhausted: daily service budget reached; retry after 00:00 UTC. model_usage_brake: this model is paused for a usage reporting investigation; retry later or choose another model. Both are uncharged and include Retry-After seconds (300 for the model brake).
Other 5xxCheck request usage before retrying a generation.

Error bodies

{
  "error": {
    "message": "max_tokens must be a positive integer.",
    "type": "invalid_request_error",
    "code": "invalid_value",
    "param": "max_tokens"
  }
}
{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "max_tokens is required and must be a positive integer."
  }
}

Retry requests

Use bounded exponential backoff for temporary failures. A disconnected request may have generated tokens. Check usage before sending it again.

↑ ↓ to select · Enter to open · Esc to close