Error Codes
Complete reference of all error codes returned by the AIcores API.
Error Response Format
All errors return a JSON object with a consistent structure. The HTTP status code indicates the error category, and the response body provides details.
Error response format
{
400">"error": 400">"error_code_here",
400">"message": 400">"A human-readable description of the error.",
400">"details": {}
}HTTP Status Codes
| Status | Error | Description |
|---|---|---|
| 400 | bad_request | The request is malformed. Check required parameters and their types. |
| 401 | unauthorized | The API key is missing, invalid, or revoked. |
| 403 | forbidden | The API key does not have permission for this resource. |
| 404 | not_found | The requested endpoint does not exist. |
| 408 | timeout | The request timed out (e.g., page load for screenshot or PDF). |
| 413 | payload_too_large | The request body exceeds the maximum allowed size. |
| 415 | unsupported_media_type | The uploaded file type is not supported. |
| 422 | unprocessable_entity | The request was well-formed but could not be processed. |
| 429 | rate_limit_exceeded | You have exceeded the rate limit for your plan. Check the Retry-After header. |
| 500 | internal_server_error | An unexpected error occurred on our side. Contact support if it persists. |
| 503 | service_unavailable | The service is temporarily unavailable. Retry with exponential backoff. |
Validation Errors
For 400 errors with validation issues, the details field contains specific field-level errors:
{
400">"error": 400">"validation_error",
400">"message": 400">"One or more fields are invalid.",
400">"details": {
400">"email": 400">"Must be a valid email address.",
400">"width": 400">"Must be an integer between 320 and 3840."
}
}Tip
Always check the HTTP status code first, then parse the JSON body for details. Implement retry logic with exponential backoff for 429 and 503 responses.