Skip to content

Errors ​

Errors are JSON. The HTTP status and error.code tell you what to do next.

json
{
  "error": {
    "code": "validation_error",
    "message": "font_size_pt must be from 8 to 72.",
    "request_id": "req_01h2err",
    "details": [
      { "field": "font_size_pt", "code": "out_of_range" }
    ]
  }
}

X-Request-ID is present on every response. Use error.request_id when it is in the body, and the header otherwise.

Codes ​

HTTPcodeWhat happened
401unauthorizedThe API key is missing or not recognized.
403access_not_enabledThe key cannot render yet. Email [email protected].
403feature_not_enabledThe key cannot use this font, paper, or realism setting.
404font_not_foundfont_id is not in the catalog.
422validation_errorA field is missing or not usable. Read details.
422page_limit_exceededThe text needs more pages than this format allows.
429rate_limitedThe key sent more than 30 render requests in a minute.
429quota_exceededThe key has used its page allowance.
500server_errorThe render did not finish. No pages were counted. Send the request again.

Field details ​

details lists the fields to change. Common detail codes are:

codeMeaning
requiredThe field is missing.
out_of_rangeThe number is outside the documented range.
invalid_enumThe value is not one of the allowed names.
invalid_formatThe string does not match the expected format, such as a hex color.
too_longThe text is longer than the format allows.
too_many_pagesThe text needs more pages than the format allows.
unknownThe id is not in the catalog.
incompatibleThe combination is not available, such as a transparent JPEG.

Field names use the request path, such as output.background or margins_mm.left.

Rate and allowance ​

For rate_limited, wait the number of seconds in the Retry-After header, then send the request again.

For quota_exceeded, read reset_at. Creating the render again before the allowance resets returns the same error. limit and used show the allowance for the current period.

A server_error means the render did not finish. No page allowance is consumed. Send the request again. Include the same seed if you already chose one.

Keys are enabled after you request access.