Errors

All API errors follow a consistent JSON format with an HTTP status code, error code, and human-readable message.

Error Responses

All errors follow a consistent JSON format:

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The 'schema' field is required.",
    "details": {}
  }
}

HTTP Status Codes

Code Description
400 Bad Request — Invalid parameters
401 Unauthorized — Invalid or missing API key
402 Payment Required — Insufficient credits or budget cap exceeded
403 Forbidden — Insufficient permissions
404 Not Found — Resource doesn’t exist
413 Payload Too Large — File exceeds size limit
422 Unprocessable Entity — Valid request but cannot process
429 Too Many Requests — Rate limit exceeded
500 Internal Server Error — Something went wrong on our end

402 Payment Required

This error occurs when your organization has run out of credits or when an API key’s budget cap has been exceeded.

Insufficient Credits:

{"success": false, "error": "Insufficient credits"}

Budget Cap Exceeded:

{"success": false, "error": "Budget cap exceeded"}

To resolve, purchase a credit pack or subscribe to a plan at iterationlayer.com/billing. See Credits & Pricing for details.