≡ All docs

API Guide / Error Codes

Error Codes

Updated: 2026-02-05

Error Format

All error responses are JSON and contain an error field:

JSON
{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key provided.",
"type": "authentication_error",
"request_id": "req_01H8XYZ..."
}
}

Error Code List

ParameterTypeRequiredDescription
400invalid_request_errorOptionalBad request parameters; check the JSON structure and fields
401authentication_errorOptionalAPI Key missing or invalid; re-check the Authorization header
403permission_deniedOptionalNo access to this resource or model
404not_foundOptionalResource not found; check the model ID / file ID
429rate_limit_exceededOptionalRate limit hit; see the Rate Limits section
500server_errorOptionalPlatform-side error; contact support with the request_id
503service_unavailableOptionalUpstream model temporarily unavailable; retry later

Retry Strategy

For 429 and 5xx errors, use exponential backoff retries (start 1s, max 30s, up to 5 attempts). Do not retry 4xx errors — fix the parameters first.

Didn't find what you were looking for?Contact us →