Browse docs

Guides · Reliability

Errors

HTTP errors and realtime error events share one bounded logical shape, so clients can handle failures consistently across transports.

Error shape

The same logical fields appear in JSON HTTP responses and WebSocket error events.

ErrorResponse
{
  "error": {
    "type": "invalid_request_error",
    "code": "unsupported_audio_format",
    "message": "public audio must be PCM16LE at 24000 Hz mono",
    "request_id": "req_EXAMPLE"
  }
}

Retry with intent

Retry transient catalog, store, or upstream failures with bounded backoff. Do not retry invalid audio or authentication failures blindly.

Safe diagnostics

Error payloads never include bearer keys, provider URLs, raw upstream payloads, private room data, or unbounded audio/transcripts.

Error codes

Use the HTTP status and code together when deciding whether to retry or ask the user to change input.

CodeHTTPMeaning
invalid_vr_sk401The secret key is missing, invalid, revoked, or outside the resource owner boundary.
model_not_found404The requested catalog model does not exist or is not available to this key.
model_not_allowed403The key is not allowed to use the selected model.
insufficient_wallet_balance402The prepaid wallet cannot cover the session preauthorization.
idempotency_conflict409An idempotency key was reused with a different owner or request body.
session_not_found404The session does not exist for the authenticated owner.
session_expired410The session passed its attach or lifecycle expiry window.
unsupported_parameter400A request or event contains a field outside the public contract.
unsupported_audio_format400Audio is not raw PCM16LE, 24 kHz, mono audio.
invalid_audio400Audio is empty, malformed, odd-sized, oversized, or invalid base64.
rate_limited429The caller exceeded the applicable request or session rate limit.
provider_unavailable502The selected upstream route could not produce a response.
session_terminated409The session is terminal and cannot accept more events.

Transport behavior

Authentication and ownership failures happen before the realtime upgrade.

  • 401 invalid_vr_sk is returned before a WebSocket is accepted, so no new reservation is created.
  • invalid_audio covers empty, malformed, odd-sized, oversized, or invalid base64 audio.
  • unsupported_parameter is returned for event fields outside the public session contract.
  • session_terminated means the client must create a new session before sending more audio.