Errors

Updated 7 November 2026

Every error has the same shape:

json
{ "error": "NO_CREDITS", "message": "This workspace is out of credits." }

Branch on error. Messages are written for people and can change. Any failure not listed here comes back as INTERNAL_ERROR.

Authentication#

CodeHTTPMeaning
UNAUTHORIZED401The x-api-key header is missing or the key is unknown
KEY_REVOKED401The key has been revoked
PUBLISHABLE_KEY_REFUSED401A publishable key was sent to an endpoint that needs a secret key
NOT_FOUND404No such generation or customer on this account

The request#

CodeHTTPMeaning
BAD_REQUEST400The body is not JSON, or a required field is malformed
PERSON_REQUIRED400No person was sent
GARMENT_REQUIRED400No products were sent
TOO_MANY_GARMENTS400More than 6 products
BAD_IMAGE400The data could not be read as an image
EMPTY_IMAGE400The image is empty
UNSUPPORTED_IMAGE_TYPE400The image is not JPEG, PNG, WebP or HEIC
FILE_TOO_LARGE413The image is over 10 MB
SUBJECT_REQUIRED400The customer ID is missing

Your catalogue#

CodeHTTPMeaning
PRODUCT_NOT_FOUND400The external ID is not in your catalogue
PRODUCT_IMAGES_REQUIRED400The product has no usable image

Your account and availability#

CodeHTTPMeaning
NO_CREDITS402Buy credits, then try again
RATE_LIMITED429Wait for the time in the retry-after header
MODEL_NOT_FOUND400The modelId you sent is not available
BAD_MODEL400The modelId you sent is not a model code (mdl_)
NO_MODEL503No model is available right now
UNAVAILABLE503Try-on is briefly unavailable. Try again
ERASURE_FAILED502The erasure could not be completed. Try again

Photo screening#

Photos are screened before any try-on starts. A refusal uses no credit.

CodeHTTPMeaning
IMAGE_REJECTED422The shopper photo was refused. The message is deliberately general
GARMENT_REJECTED422A product image was refused. Replace it in your catalogue
SCREENING_UNAVAILABLE503Screening could not run, so no try-on started. Try again

Photo quality#

These checks also run before any try-on starts, and a refusal uses no credit.

CodeHTTPMeaning
IMAGE_TOO_SMALL422The shopper photo is too small. The message gives its size
IMAGE_TOO_BLURRY422The shopper photo is badly out of focus
IMAGE_BAD_ASPECT422The shopper photo is an extreme shape, such as a banner
GARMENT_TOO_SMALL422A product image is too small. The message names the product
GARMENT_TOO_BLURRY422A product image is badly out of focus
GARMENT_BAD_ASPECT422A product image is an extreme shape

These checks do not guarantee a good photo. Only severe blur is caught, so a slightly soft photo passes.

Framing is not checked. A photo cropped at the chest passes, and the model may then invent the rest of the body. If your shoppers upload portraits, check for this on your side.

Anything else#

CodeHTTPMeaning
INTERNAL_ERROR500Something went wrong on our side

Storefront widget errors#

The storefront endpoint returns a shorter list, because its messages reach shoppers. Some messages are reworded for them while the code stays the same.

CodeHTTPMeaning
CONSENT_REQUIRED400The request has no consent object
SHOPPER_REQUIRED400The request has no X-Shopper-Id header

Failed try-ons#

A failed try-on is not charged. The credit is only spent when a try-on reaches COMPLETED.

New to GenFashion? See the product overview or start with free credits.