Error codes
Every code below comes from the API itself.
All codes
| Code | Status | Type | What it means |
|---|---|---|---|
api_disabled | 403 | permission_error | The developer API is not open yet. Try again once it has been opened for your account. |
key_in_query | 400 | invalid_request_error | A key was found in the address of the request. Send keys only in the Authorization header, and revoke any key you sent this way. |
invalid_key | 401 | authentication_error | The key is missing or not recognised. Send a valid key as a Bearer token in the Authorization header. |
key_revoked | 401 | authentication_error | This key has been revoked. Make a new key on the Developer API page. |
key_expired | 401 | authentication_error | This key has expired. Make a new key on the Developer API page. |
plan_required | 403 | permission_error | Your plan does not include the developer API. Move to a plan that does, then try again. |
missing_scope | 403 | permission_error | This key is not allowed to do that. Use a key that has the scope this route needs. |
wrong_key_type | 403 | permission_error | This key cannot be used here. |
foreign_origin | 403 | permission_error | Requests from other websites are not accepted. |
not_verified | 403 | permission_error | Verify your email address before you use this feature. |
account_on_hold | 403 | permission_error | This account has a safety hold, so new requests are not accepted. Open your account page to see what to do next. |
invalid_request | 400 | invalid_request_error | The request could not be used. Check the field named in param and the documentation, then try again. |
unsupported_parameter | 400 | invalid_request_error | The request has a field or value that this API does not support. Remove it or change it, then try again. |
unknown_model | 400 | invalid_request_error | That model name is not known. Use a name from the list in the documentation. |
too_many_images | 400 | invalid_request_error | The request has more images than this route accepts. Send one image. |
mask_unreadable | 400 | invalid_request_error | The mask could not be read. Send a non-interlaced PNG with an alpha channel. |
mask_size_mismatch | 400 | invalid_request_error | The mask must have the same proportions as the image. Resize the mask and try again. |
mask_too_complex | 400 | invalid_request_error | The mask is too detailed to use. Send a smaller or simpler mask. |
image_not_found | 404 | not_found_error | No available image matches that id. Check the id, or send the image itself. |
image_url_refused | 400 | invalid_request_error | The image address could not be used. It must be a public https address that returns a picture. |
image_refused | 400 | invalid_request_error | The image was not accepted. Send a JPEG, PNG or WebP picture that is not too large. |
body_too_large | 413 | invalid_request_error | The request is larger than this route accepts. Send a smaller request. |
not_found | 404 | not_found_error | Nothing was found for that id. Check the id and try again. |
rate_limited | 429 | rate_limit_error | Too many requests. Wait for the time in the Retry-After header, then try again. |
daily_line_reached | 429 | quota_error | The daily limit for your plan has been reached. Try again after the time in reset_at. |
period_pool_used | 429 | quota_error | The credits for this plan period have been used. Try again after the time in reset_at. |
class_limit_reached | 429 | quota_error | The limit for this kind of picture has been reached. Try again after the time in reset_at. |
free_budget_spent | 429 | quota_error | The free allowance has been used. Try again after the time in reset_at, or move to a paid plan. |
key_budget_reached | 429 | quota_error | This key's monthly credit budget has been reached. Raise the budget or use another key, or wait for the time in reset_at. |
over_max_credits | 402 | quota_error | This request would cost more credits than max_credits allows. Raise max_credits or change the request. |
quote_changed | 409 | conflict_error | The price changed while the request was being made. Send the request again. |
idempotency_conflict | 409 | conflict_error | That Idempotency-Key was already used for a different request. Use a new key, or repeat the first request exactly. |
content_refused | 400 | content_policy_error | The request was refused by the content rules. Change the request and try again. |
class_not_in_plan | 403 | permission_error | Your plan does not include this kind of picture. Move to a plan that does, or choose another operation. |
operation_unavailable | 503 | api_error | This operation is not available right now. Try again later. |
try_again | 503 | api_error | The request could not be finished this time. Wait a few seconds and try again. |