Skip to main content

Error format

All error responses follow the same structure:
{
  "error": "Human-readable error message"
}

HTTP status codes

StatusMeaningCommon causes
400Bad RequestMissing required fields, invalid parameters
401UnauthorizedMissing, invalid, expired, or revoked API key
402Payment RequiredWallet balance is zero — top up to continue
403ForbiddenAPI billing not active for this team
404Not FoundResource doesn’t exist (e.g., wrong key ID)
429Too Many RequestsRate limit exceeded — check Retry-After header
500Internal Server ErrorSomething went wrong on our end

Error handling by category

Authentication errors (401)

// Missing header
{ "error": "Missing X-API-Key header" }

// Bad key
{ "error": "Invalid API key" }

// Expired key
{ "error": "API key expired" }
Fix: Check that you’re sending the correct key in the X-API-Key header. If the key was revoked or expired, create a new one from the dashboard.

Payment errors (402)

{ "error": "Insufficient balance" }
Fix: Top up your wallet. Consider enabling auto-refill to avoid this in the future.

Rate limit errors (429)

{ "error": "Rate limit exceeded" }
Fix: Wait for the duration specified in the Retry-After response header, then retry. See Rate Limits for retry strategies.

Retry strategy

A simple rule of thumb:
StatusRetry?
400No — fix the request
401No — fix authentication
402No — add funds first
403No — check billing setup
429Yes — after Retry-After seconds
500Yes — with exponential backoff