SupaNexus

Replace <BASE_URL> using values from Endpoints.

SupaNexus API (/v1/*) uses OpenRouter-compatible errors: error.code is a number equal to the HTTP status.

Error JSON format

{
  "error": {
    "code": 402,
    "message": "Your account or API key has insufficient credits. Add more credits and retry the request.",
    "metadata": {}
  }
}
FieldDescription
error.codeInteger matching the HTTP response status
error.messageHuman-readable description
error.metadataOptional extension (e.g. provider error details)

HTTP status reference

HTTPWhen
400Invalid parameters, JSON parse failure; video_url that is not a public http(s) URL (including data URIs, file, or vendor private schemes)
401Missing, wrong, or expired API key
413Request body exceeds the limit (default 64 MB, error.code = request_too_large)
402Insufficient account or API key credits
403Account suspended, permission denied, or missing org/project context
404Model not found or not sellable
408Request timeout
409Idempotency key reused
429Rate or usage quota exceeded (Retry-After may be set)
501Embeddings / images not implemented yet
502Service temporarily unavailable
503Service temporarily unavailable
500Internal service error

Account suspended (403)

When a platform user is suspended by an administrator, every /v1/* request fails after API key validation with:

{
  "error": {
    "code": 403,
    "message": "Your account has been suspended. Contact support for assistance."
  }
}
  • Independent of whether the key itself is still valid (non-revoked keys can still receive this error)
  • Access resumes immediately after unsuspension; no need to recreate keys
  • See Authentication — Suspended account check

Retry guidance

HTTPRetry?Notes
401NoFix API key
403NoContact admin if suspended; otherwise check permissions and context
402NoAdd credits or contact your administrator
404NoUse a valid model id
408MaybeReduce payload or increase client timeout
409NoUse a new idempotency key
429YesRespect Retry-After when present
502MaybeExponential backoff, then retry
503MaybeShort backoff

Service auth failures

If the inference provider rejects credentials, SupaNexus typically returns 502 with message "Upstream authentication failed." rather than exposing provider details.

Anthropic /v1/messages errors

On POST /v1/messages, SupaNexus returns Anthropic-shaped JSON instead of OpenRouter numeric codes:

{
  "type": "error",
  "error": {"type": "authentication_error", "message": "Invalid API key"}
}

See Messages for field reference. Chat Completions continues to use the OpenRouter format above.

Streaming errors

Errors that occur before streaming starts use the JSON format above with the appropriate HTTP status. See Streaming.

Related