Image Guidelines for Best Try-On Results
How to get the best virtual try-on results: accepted image formats and limits, photo tips for clothing, hairstyle, tattoo and live try-on, and common failures.
The input photos decide most of the result quality in virtual try-on. This page covers what the API accepts, how to shoot or pick photos for each try-on model, and the usual reasons a job fails or looks wrong.
Accepted inputs
Every image parameter (model_image, garment_image, face_image, body_image, design_image, and the live
garment_image) takes one of two forms:
| Form | Example | Limits |
|---|---|---|
| Public image URL | https://example.com/photos/model.jpg | http or https only. Fetched by TryItOn's servers: up to 25 MB, 15-second timeout, up to 5 redirects. Private and internal network addresses are refused. |
| Base64 data URL | data:image/jpeg;base64,/9j/4AAQ... | Must start with data:image/<type>;base64,. The whole JSON body must stay under 12 MB, which leaves room for about 9 MB of image once base64-encoded. |
Prefer URLs for large images. A body over 12 MB is rejected with 413 PayloadTooLarge.
A URL must point at the image file itself, not at an HTML page that shows it, and it must stay reachable until the job finishes. The job may fetch it any time during its run, which can take up to 5 minutes. If you use signed URLs, give them at least that long, plus margin.
Tips for each try-on model
Clothing and accessories
- Person photo (
model_image): one person, facing the camera, well lit. Show the whole body, or at least the region the item goes on: the torso for a top, the feet for shoes, the face for eyewear. - Item photo (
garment_image): a product photo on a plain background, or a flat lay. Show the item on its own. - Category: with
categoryomitted orauto, the item type is detected for you. Passcategory(and itssubcategory) when you already know it. See the fashion try-on reference.
Hairstyle
- Face photo (
face_image): a clear, front-facing photo of the face, well lit.
Tattoo
- Body photo (
body_image): a close-up of bare skin where the tattoo goes, evenly lit. - Design (
design_image): the design alone on a plain or transparent background. A transparent or white background is dropped, so only the design lands on the skin. - Position: use
placementto describe where and how big, orregionto mark the exact spot. See the tattoo try-on reference.
Live try-on
- Garment: a product photo on a plain background.
- Category: pass
categorywhen you prepare the garment, so it doesn't have to be detected.
Common causes of failed jobs
When you submit a photo try-on, the API only checks that each required image is present. Fetching and decoding
happens inside the job. So most image problems don't return 400: the job is accepted and later ends with
status: "failed" and a reason in error. Failed jobs cost nothing.
| Symptom | Likely cause | Fix |
|---|---|---|
Job failed | URL is private, needs a login or cookie, has expired, or returns a 404 | Use a public URL that works in a private browser window, or send base64. |
Job failed | Image over 25 MB, or the host took longer than 15 seconds | Resize the image or host it somewhere faster. |
Job failed | URL points at localhost, a private IP or an internal hostname | Use a public host. Internal addresses are always refused. |
Job failed | Malformed base64 (no data:image/...;base64, prefix, or truncated data) | Send the full data URL with its prefix. |
Job failed with "Timed out." | The job ran over 5 minutes | Resubmit. If it keeps happening with the same inputs, try different photos. |
413 PayloadTooLarge | JSON body over 12 MB | Send the image as a URL. |
400 ImageLoadError | A required image parameter is missing or empty | Check the parameter name for the endpoint you're calling. |
The AI model providers' own safety filters always apply, whatever moderation_level you send.
If a job completes but the result looks wrong, check the photos against the tips above: a cluttered item photo, several people in the frame, or a crop that hides the region the item goes on are typical problems.
Related
Rate Limits
Rate limits and concurrency for the virtual try-on API: requests per minute per IP and per account, how credit holds cap parallel jobs, and how to back off.
Jobs & Polling
How virtual try-on API jobs work: submit, poll GET /status every 2 seconds, handle completed and failed jobs, set SDK wait timeouts, retry without duplicates.