Catalog ProAPI Docs

Errors & retries

When something goes wrong you get an HTTP error code and a body like the one below. Check code in your code — the message is for people to read.

{
  "error": {
    "code": "USER_BUSY",                      // what went wrong — use this in your code
    "message": "User u_1042 already has a …"  // a readable explanation
  }
}

Busy? Just try again

When you get a "busy" answer, nothing was charged, so it's always safe to send the request again.

You getWhat it meansWhat to do
409 USER_BUSYThis user already has a request running. The error also has its job_id.Tell the user their last photos are still being made. Send the new request once that one finishes.
429 BUSINESS_BUSY50 of your users are already making photos.Wait the number of seconds in the Retry-After header, then try again.
429 TOO_MANY_REQUESTSYou're calling too often — usually checking the same job more than once every 10 seconds.Wait the seconds in Retry-After, then check once every 15 seconds.
503 TRY_LATERWe couldn't start it right now.Wait 30 seconds and try again. If it happens again, wait longer (60 s, then 120 s).

Other errors

CodeWhat it meansWhat to do
401 INVALID_API_KEYThe key is missing or wrong.Check the X-Api-Key header. Did you rotate the key?
400 INVALID_REQUESTA field is missing or wrong.The message says which field.
402 NO_IMAGES_LEFTNot enough photos left on your plan.Buy a plan in your dashboard, or ask for fewer photos.
404 MODEL_NOT_FOUNDThat model_id isn't one of your models.Get the right id from GET /models.
400 GENDER_MISMATCHThe gender doesn't match the model.Send the model's own gender.
404 JOB_NOT_FOUNDNo such job_id, or it's older than 30 days.Check the id.
403 ACCOUNT_BLOCKEDYour account is blocked.Contact us.

When a request fails

These show up in the error of a finished request (status failed). Nothing is charged.

CodeWhat it means
WRONG_TYPEClothing was sent to /products, or something that isn't clothing was sent to /clothing.
CONTENT_BLOCKEDWe couldn't use the photos — no clear item, different items in different photos, or content we don't make.
GENERATION_FAILEDNo photo could be made. Please try again.