Error Response Format
All errors follow this structure:| Field | Description |
|---|---|
message | Human-readable description of the error |
type | Error category (e.g., api_error, validation_error) |
code | Machine-readable error code |
reference_id | Unique ID for support inquiries |
timestamp | When the error occurred |
HTTP Status Codes
| Status | Description |
|---|---|
400 | Bad Request - Invalid parameters or malformed request |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Access denied (IP restrictions, disabled account) |
404 | Not Found - Resource doesn’t exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Something went wrong on our end |
503 | Service Unavailable - Temporary outage |
Common Error Codes
Authentication Errors
| Code | Description |
|---|---|
MISSING_HEADER | No Authorization header provided |
INVALID_FORMAT | Authorization header format is incorrect |
INVALID_KEY | API key is invalid or doesn’t exist |
INVALID_OAUTH_TOKEN | OAuth token is invalid |
ACCOUNT_DISABLED | User account has been disabled |
IP_ACCESS_DENIED | Request IP not in allowlist |
Request Errors
| Code | Description |
|---|---|
INVALID_MODEL | Requested model doesn’t exist |
INSUFFICIENT_CREDITS | Not enough credits for this request |
RATE_LIMIT_EXCEEDED | Too many requests |
VALIDATION_ERROR | Request body validation failed |
Provider Errors
| Code | Description |
|---|---|
PROVIDER_ERROR | Upstream provider returned an error |
PROVIDER_UNAVAILABLE | Provider is temporarily unavailable |
MODEL_UNAVAILABLE | Specific model is unavailable |
Handling Errors
Python
TypeScript
Retry Strategy
For transient errors (5xx, rate limits), implement exponential backoff:Debugging Tips
Save the reference_id
Save the reference_id
Every error includes a
reference_id. Save this for support inquiries - it helps us track down issues quickly.Check your API key
Check your API key
Most authentication errors are caused by typos or using the wrong API key. Double-check your key starts with
sk-voidai-.Verify the model exists
Verify the model exists
Use the Models endpoint to see available models before making requests.
Check your credit balance
Check your credit balance
Insufficient credits will cause requests to fail. Check your dashboard for your current balance.
