Platform

Error reference

Every error code the platform returns.

All errors share one envelope (error.message, error.type, error.code). Branch on code — it stays stable where messages don't.

Your request

StatusCodeWhere
400bad_requestMalformed input — the message says exactly what to fix.
400model_not_supported_for_endpointRight model, wrong endpoint — an embedding model sent to /v1/chat/completions, or the reverse.
400batch_not_supportedThis model can't be used with batch. Send the requests to /v1/chat/completions instead.
413request_too_largeInference body over 10MB; audio uploads over 50MB.
422guardrail_blockedAccount guardrails stopped sensitive data leaving.

Your account

StatusCodeWhere
401invalid_api_keyMissing, revoked, disabled or expired key.
402budget_exceededHard spend cap reached for the period.
403forbiddenKey lacks the required scope, or the account is suspended.
403model_unavailable_under_budgetA hard cap is armed and this model can't be metered, so serving it would bypass the cap.
429rate_limit_exceededRequests/min, tokens/min or concurrency cap. Has retry-after.
429rate_limitedToo many failed authentication attempts from one source — check the key you're sending. One budget covers the gateway, the management API and MCP, so a bad key spent at one shows up at all three. Has retry-after.

The model

StatusCodeWhere
404model_not_foundNo such model, or not one your key can use.
404no_regional_routeYour account keeps traffic in-region and this model has no route there.
503no_live_deploymentThe model is in the catalogue but nothing can serve it right now. Safe to retry.

Us

StatusCodeWhere
404not_foundNo such resource for you — Roar never reveals whether it exists for someone else.
502upstream_errorThe model could not be reached, including after failover. Safe to retry.
503service_unavailableA problem on our side, not with your request or your key. Has retry-after.
504upstream_timeoutThe model took too long; safe to retry.

A 503 service_unavailable never means your credentials are wrong. If we can't reach our own control plane we say so, rather than returning 401 and sending you off to rotate a key that was fine.

Include the request id when contacting support. Every response carries it twice, under x-request-id and x-roar-request-id — same value, so either will do. If you use an official OpenAI SDK it is already on the error object as error.requestID.