boolean
Always
false for errors.object
string
Time of the response.
429 response also has top-level limit, retry_after and reset_at fields. See Rate Limit.
Error codes
The exact messages for the
401 errors are:
api_key_required: “Please provide an API key in the ApiKey header”invalid_api_key: “The provided API key is invalid or inactive”
Image requirements: formats JPG, PNG, WEBP, BMP or GIF; size 1 KB to 10 MB; content type
image/jpeg, image/png, image/webp, image/bmp or image/gif. Anything else returns 400 invalid_image.What counts against your quota
- Counts: successful requests, and
4xxerrors produced while processing:missing_image,invalid_image,invalid_parameter, and4xxerrors returned by the image processor. - Doesn’t count:
401,402,403and429rejections; any5xxerror; calls to/v2/account/usage/. Retrying after a429is free.
Recommended retry policy
- 429: wait the number of seconds in the
Retry-Afterheader, then retry. - 5xx and timeouts (including
504): retry with exponential backoff: wait 1 s, then 2 s, then 4 s. - 400, 401, 402, 403: never retry. Fix the request, key, plan or billing first.
Python
