Errors

All errors share a single envelope shape. The HTTP status code + the error.code field together tell you what to do next.

{
  "error": {
    "code": "insufficient_credits",
    "message": "Account balance is insufficient for this request.",
    "type": "billing_error",
    "param": null,
    "x_relayx": { "request_id": "rx_chat_abcdef..." }
  }
}
CodeHTTPWhen you see thisWhat to do
missing_api_key401No Authorization header on the requestAdd Authorization: Bearer rx_live_…
invalid_api_key401Key is revoked, expired, or never existedCreate a new key from /dashboard/keys
insufficient_credits402Account balance can’t cover this requestTop up your balance, then retry
key_cap_reached402This specific key has hit its per-key spend ceilingRaise the cap on the key, or use a different key
rate_limited429You exceeded the per-key request quotaBack off (Retry-After header) and resend
upstream_capacity429Upstream provider is at concurrency / rate-limit capHonor the Retry-After header and resend
unsupported_model400Model id is not in the RelayX catalogGET /v1/models to list valid ids
invalid_request400Body shape, params, or headers failed validationCheck error.message for the specific field
internal_error500Upstream provider failed or RelayX hit a bugRetry; if persistent, report with x_relayx.request_id