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

StatusErrorDescription
400bad_requestThe request is malformed. Check required parameters and their types.
401unauthorizedThe API key is missing, invalid, or revoked.
403forbiddenThe API key does not have permission for this resource.
404not_foundThe requested endpoint does not exist.
408timeoutThe request timed out (e.g., page load for screenshot or PDF).
413payload_too_largeThe request body exceeds the maximum allowed size.
415unsupported_media_typeThe uploaded file type is not supported.
422unprocessable_entityThe request was well-formed but could not be processed.
429rate_limit_exceededYou have exceeded the rate limit for your plan. Check the Retry-After header.
500internal_server_errorAn unexpected error occurred on our side. Contact support if it persists.
503service_unavailableThe 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.