Error codes

Learn about the HTTP status codes and error responses returned by the API.

The API uses conventional HTTP status codes: 2xx means the request succeeded, 4xx means the problem is with the request, and 5xx means something failed on Pixel's side (rare). Whether and how to retry depends on the code; the table below covers each one.

Error response format

Error responses use the ApiError schema, a JSON object with these fields:

  • code — the machine-readable error code. The table below lists every value.
  • message — a human-readable explanation of what went wrong.
  • details — optional structured context, for example the offending fields on some validation errors.
  • retryAfter — optional; the number of seconds to wait before retrying. Set for rate_limited and service_unavailable.
{
  "code": "invalid_request",
  "message": "applicationId must be a valid UUID.",
  "details": {
    "issues": [
      {
        "path": "applicationId",
        "message": "Invalid uuid",
        "code": "invalid_string"
      }
    ]
  }
}

Error codes

Error codeHTTP statusMeaning
invalid_request400The request is malformed: a missing or invalid parameter, or a body that is not the expected multipart/form-data. details.issues names the offending fields when available. Fix the request before retrying.
unsupported_format400The uploaded file is not an accepted image type. Send JPEG, PNG, or HEIC/HEIF.
unauthorized401The API key is missing or invalid. Send it as Authorization: Bearer <api_key>; see Authentication.
not_found404The requested resource does not exist or is not visible to your application, for example a jobId from another application.
file_too_large413The file exceeds the 25 MB upload limit.
unprocessable422The file is a valid upload but cannot be analysed. Submitting the same file again returns the same error.
rate_limited429Too many requests. Wait retryAfter seconds before retrying; see rate limits for the limits and retry guidance.
internal_error500Something failed on Pixel's side. These are rare; retry a submission only with its original Idempotency-Key, so the retry returns the existing job instead of creating a duplicate. Contact us if it persists.
service_unavailable503The service is temporarily overloaded. Wait retryAfter seconds and retry with backoff.