Skip to main content

Resources

Error Codes

Every HTTP status and error code the CallMissed API returns, what causes it, and how to recover.

Error Format

All errors return a JSON body with a stable machine-readable code and a human message. We never leak upstream provider errors or stack traces to clients.

json
{
  "error": {
    "code": "insufficient_credits",
    "message": "Your credit balance is too low to complete this request.",
    "type": "billing_error"
  }
}

The OpenAI-compatible endpoints (/v1/*) return the standard OpenAI error envelope so existing SDK error handling works unchanged.

HTTP Status Codes

StatusMeaningTypical cause
200OKSuccess
400Bad RequestMalformed JSON, invalid parameter value
401UnauthorizedMissing/invalid Authorization header or expired token
402Payment RequiredInsufficient credits or monthly budget cap reached
403ForbiddenKey lacks the required scope/permission, or domain not allowlisted
404Not FoundResource ID does not exist or belongs to another tenant
409ConflictDuplicate resource, or replayed Idempotency-Key with a different body
422Unprocessable EntitySchema validation failed (bad enum, out-of-range number)
429Too Many RequestsPer-IP or per-key rate limit exceeded — back off and retry
500Internal Server ErrorUnexpected server error — safe to retry once
501Not ImplementedEndpoint exists but the feature is not yet live (e.g. embeddings)
503Service UnavailableUpstream provider temporarily unavailable

Common Error Codes

CodeStatusMeaning
invalid_api_key401The cm_ key is unknown or revoked
token_expired401JWT access token expired — refresh it
insufficient_credits402Top up credits to continue
budget_exceeded402Monthly credit budget cap reached
permission_denied403Key is missing the required service permission
search_provider_not_allowed403Key's allowed web-search providers excludes the requested provider
domain_not_allowed403Request origin is not in the key's domain allowlist
not_found404Resource does not exist in your tenant
rate_limit_exceeded429Slow down — see Retry-After
provider_error503Upstream model/provider failed

Retrying

  • On 429, honor the Retry-After header (seconds) and use exponential backoff.
  • On 500/503, retry once or twice with jittered backoff. To make a mutating request safely retryable, send an Idempotency-Key header — replays with the same key and body return the original result instead of duplicating the action.
  • On 402/403, do not retry — fix the underlying credit/permission issue first.
Was this page helpful?