Skip to content

Errors

Every error has the same shape: an HTTP status, and a body with a stable code, a sentence for people, and sometimes details.

{
"error": {
"code": "key_limit_reached",
"message": "This key has used its credit limit for the last 30 days.",
"details": { "limit": 500, "used": 498, "cost": 5 }
}
}

Branch on code, never on message: messages may be reworded, codes never change. Each answer also has an X-Request-Id header; quote it to support.

In the SDKs, an error answer raises an APIError with status, code, details and the request id. A subclass names the common cases: AuthenticationError (401), InsufficientCreditsError (402), PermissionDeniedError (403), NotFoundError (404), ConflictError (409), InvalidRequestError (400, 415, 422), RateLimitError (429) and InternalServerError (5xx).

  • Retry 429 (after Retry-After) and 5xx (with backoff). With an Idempotency-Key, a retried start never pays twice.
  • Fix the request for every other 4xx. Retrying it unchanged gets the same answer.
CodeStatusWhat happenedWhat to do
invalid_request 422 A field is missing or has the wrong shape. details.issues lists each one. Fix the fields named in details.issues.
invalid_api_key 401 The key is missing, wrong or revoked. Send Authorization: Bearer rmk_... with a live key.
verify_email 403 The account's email address is not confirmed. Confirm the email in the app.
premium_required 403 That room, style or model needs a plan. Pick one with premium: false in the catalog, or choose a plan.
insufficient_credits 402 The account does not have enough credits. details.available says how many it has. Buy credits or choose a cheaper quality.
key_limit_reached 402 This key's credit limit for the last 30 days would be passed. details has limit, used and cost. Raise the key's limit in the app, or wait for older designs to leave the 30-day window.
allowance_exhausted 402 The plan's credits for this period are used up. Wait for them to refresh, or buy a credit pack.
rate_limited 429 Too many requests, design starts or uploads in a short time. Wait for Retry-After seconds, then retry.
too_many_active 429 The most API designs this account may render at once are rendering. Start another as soon as one finishes.
not_found 404 No design with that id was made by a key of this account. Check the id. Designs made in the app are not visible to keys.
asset_not_ready 422 A photo id is unknown, or was not uploaded with a key. Upload the photo with POST /public/v1/uploads and use the id it returns.
source_not_found 422 sourceImageId is not an image of a design made with a key. Use images[].id of a finished API design.
input_required 422 The mode needs inputAssetId. Upload a photo and pass its id.
prompt_required 422 edit and brush need a prompt (or preset: "remove"). Describe the change.
invalid_mask 422 The mask covers too little or too much of the photo, or could not be read. Paint (or whiten) between about 0.5% and 90% of the photo.
unknown_room 422 room is not in the catalog. Use a rooms[].name from GET /public/v1/catalog.
unknown_style 422 style is not in the catalog. Use a styles[].name from GET /public/v1/catalog.
unsupported_type 415 The upload is not JPEG, PNG, WebP, HEIC or a JSON body with url. Send one of those types with a matching Content-Type.
empty_upload 400 The upload body is empty. Send the photo's bytes.
upload_too_large 400 Over 25 MB, or a side over 20,000 pixels. Send a smaller photo.
upload_wrong_type 400 The bytes are not the type the Content-Type announced (or the URL is not a photo). Send the right Content-Type, or a URL of a photo.
upload_unreadable 400 The photo could not be read. Re-export it as JPEG or PNG.
url_unreachable 422 The photo URL could not be fetched (not found, too slow, not public, too many redirects). Use a public https URL that answers within 20 seconds.
image_required 400 OpenAI-compatible: images.generate has no photo to start from. Use images.edit with the photo as image.
design_failed 422 OpenAI-compatible: the design failed. Its credits were refunded. details.designId names it. Retry, or try another quality.
still_rendering 504 OpenAI-compatible: the design took longer than 90 seconds. details.designId names it. Retry the same request (it waits on the same design), or fetch the design by id.