API Reference
Errors

Errors

Routify uses OpenAI-compatible error envelopes for drop-in compatibility.

Format

{
  "error": {
    "message": "Insufficient balance. Top up at https://routify.bytedance.city/dashboard/billing",
    "type": "insufficient_balance",
    "code": "balance_exhausted",
    "param": null
  }
}

HTTP status codes

StatusTypeWhen
400invalid_request_errorMalformed body, unknown model
401authentication_errorMissing / invalid API key
402insufficient_balanceAccount credit exhausted
403permission_deniedTier doesn't allow this model
404not_foundEndpoint or resource missing
408timeoutUpstream provider timeout
422unprocessableBody parsable but logically invalid
429rate_limitRPM / tokens-per-day exceeded
500internal_errorRoutify bug — should be reported
502upstream_errorAll channels failed
503service_unavailableRoutify maintenance

Retry policy

  • 5xx / 429: retry with exponential backoff (1s, 2s, 4s, 8s, max 5 attempts)
  • 4xx (except 429): do not retry — fix the request
  • Connection errors: retry as 5xx

The official OpenAI SDKs handle this automatically.

Specific errors

balance_exhausted

Account credit ≤ $0. Top up at billing page.

model_not_allowed

Your tier doesn't include the model. Free tier excludes Claude, o1, GPT-4o.

rate_limit

Hit RPM ceiling. Response includes Retry-After header.

all_channels_failed

All healthy upstream channels for this model returned errors. Try again, or fall back to a different model. We're auto-disabling the failed channels and working on it.