Skip to content

Error codes

Errors are returned using the standard response envelope with an error status code and message.

HTTPstatus codeDescription
400BAD_REQUEST_ERRORThe request was malformed.
401UNAUTHORIZED_ERRORMissing or invalid API token.
402PAYMENT_REQUIRED_ERRORNot enough tokens/credits to process the request or need to upgrade to a premium plan.
404NOT_FOUND_ERRORThe requested resource was not found.
410GONE_ERRORThe resource is no longer available.
422VALIDATION_ERRORInput failed validation; see data for details if any.
429TOO_MANY_REQUESTS_ERRORRate limit exceeded. Use Retry-After before retrying.
500SERVER_ERRORInternal server error.
504GATEWAY_TIMEOUT_ERRORThe operation did not finish within the time window.

Example error response:

json
{
  "status": "VALIDATION_ERROR",
  "message": "Invalid promptVersionId",
  "data": ...
}

Used by: