Skip to content

Errors

Errors are plain JSON in the OpenAI shape:

{ "error": { "type": "invalid_api_key", "message": "invalid or revoked API key" } }
Status error.type Meaning What to do
401 invalid_api_key Key missing, invalid or revoked Create a new key in the console
403 account_not_approved Owner isn’t approved yet Redeem an invite
400 invalid_upstream Playground-only upstream used Use workers-ai or mask-only
400 invalid_request Malformed request body Fix the request shape
429 rate_limit_exceeded Over 60 requests/minute Back off and retry after a minute
429 quota_exceeded Monthly Workers AI cap hit Bring your own provider key
502 upstream_error The upstream provider failed Retry; check provider status

Retry 429s with a short exponential backoff; retry 502s once, then investigate.