Try On (Beta)
BETA - This endpoint is currently in beta and may change without notice.
Places a garment onto a person image.
For Best Results:
- Person Image:
- There should only be one person in the image.
- Plain backgrounds and no accessories are best
- The person should take up most of the frame, a 3/4 body view works best.
- The person should be standing facing forward, side/seated views work less well.
- Garment Image:
- The garment image should only contain a single garment.
- Plain “stock photos” of garments work best, however the model is capable of transferring garments from one person to another.
- The garment should take up most of the frame.
- Note: If the garment image contains a person wearing the garment or other objects, garment extraction will be required, which costs an additional 5 credits.
Limitations:
- The API may not work with all garments, it works best with top garments like t-shirts, blouses, etc.
- Text and fine details in the garment image may not be reproduced perfectly in the resulting image.
- Colors in the resulting image may be slightly different to the colors in the garment image.
Input Image Limits:
- Max size: 25MB
- Min resolution: 64x64px
- Max resolution: 6000x6000px
Authorizations
All API requests require a valid api key. Include your token as a HTTP request header in the following format: X-API-Key: skXXXXXXXXXXXXXXXX. You can obtain an api key by signing up for developer access in your Pixelcut account.
Headers
Acceptable response media type(s). application/json.
Body
URL of the person's image.
"https://cdn3.pixelcut.app/virtual-try-on/person.png"
URL of the garment image.
"https://cdn3.pixelcut.app/virtual-try-on/garment.png"
⚠️ DEPRECATED: This parameter is deprecated and will be removed in a future version.
The API now automatically detects garment type without requiring manual specification.
Indicates the garment type for the try-on service. Determines how the garment is applied on the person image.
- auto: Automatically detects if the garment is full-body, upper-body, or lower-body.
- full: Garment covers the full body (e.g., dresses, jumpsuits).
- upper: Garment covers the upper body (e.g., shirts, jackets).
- lower: Garment covers the lower body (e.g., pants, skirts).
auto, full, upper, lower When true, the garment will be preprocessed to remove background. Defaults to true. In some cases results of model will be improved by skipping pre-processing.
true, false When true, the background will be removed from the final result. Defaults to false.
true, false When true, the API will wait for processing to complete and return the result directly. When false, it returns a job ID for polling.
true, false Response
Success - returned when wait_for_result is true and processing completes successfully.
A URL to access the resultant image which is valid for 1 hour. File format will be jpeg.
"https://assets.pixelcut.app/public/result/a16646be-91c8-4e3a-b359.jpg"