Clothes Tryon
Our Virtual Try-On Clothes endpoint provides realistic garment visualization using only one photo of a person and one of a garment. It’s our most advanced AI model for try-on experiences, built to deliver high-quality, detailed results with minimal setup.
Request
Generate a virtual try-on by sending your model and garment images to following endpoint:
POST
https://tryiton.now/api/v1/tryon/clothes
Request Examples
curl -X POST "https://tryiton.now/api/v1/tryon/clothes" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_image": "https://example.com/path/to/model.png",
"garment_image": "https://example.com/path/to/garment.png"
}'fetch('https://tryiton.now/api/v1/tryon/clothes', {
method: 'POST',
body: JSON.stringify({
model_image: "https://example.com/path/to/model.png",
garment_image: "https://example.com/path/to/garment.png"
}),
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
}
});import requests
response = requests.post(
"https://tryiton.now/api/v1/tryon/clothes",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model_image": "https://example.com/path/to/model.png",
"garment_image": "https://example.com/path/to/garment.png"
}
)Response
Returns a job ID for status polling:
Request Parameters
Required Parameters
model_image image URL | base64
model_image image URL | base64Primary image of the person on whom the virtual try-on will be performed.
Base64 Format
Base64 images must include the proper prefix (for example, data:image/jpg;base64,<YOUR_BASE64>)

Optional Parameters
category 'auto' | 'tops' | 'bottoms' | 'one-pieces'
category 'auto' | 'tops' | 'bottoms' | 'one-pieces'Use auto to enable automatic classification of the garment type. For flat-lay or ghost mannequin images, the system detects the garment type automatically. For on-model images, full-body shots default to a full outfit swap. For focused shots (upper or lower body), the system selects the most likely garment type (tops or bottoms).
Default: auto
segmentation_free boolean
segmentation_free booleanPerforms direct garment fitting without clothing segmentation, allowing bulkier garments to be tried on while better preserving body shape and skin texture. Set this to false if the original garments are not being removed correctly.
Default: true
moderation_level 'conservative' | 'permissive' | 'none'
moderation_level 'conservative' | 'permissive' | 'none'Sets the content moderation level for garment images.
conservativeenforces stricter modesty standards for culturally sensitive contexts, blocking underwear, swimwear, and revealing outfits.permissiveallows swimwear, underwear, and revealing garments, while still blocking explicit nudity.nonedisables all content moderation.
Default: permissive
Responsible Use Notice
This technology is designed for ethical virtual try-on applications. Any misuse, such as generating inappropriate images without consent, is a violation of our Terms of Service.
Setting moderation_level: none does not remove your responsibility for ethical and lawful use.
Violations may result in service denial.
garment_photo_type 'auto' | 'flat-lay' | 'model'
garment_photo_type 'auto' | 'flat-lay' | 'model'Defines the type of garment photo to help optimize internal settings for better results. Use 'model' for photos of garments worn by a model, 'flat-lay' for flat-lay or ghost mannequin images, and 'auto' to let the system automatically detect the photo type.
Default: auto
mode 'performance' | 'balanced' | 'quality'
mode 'performance' | 'balanced' | 'quality'Specifies the mode of operation.
performancemode is faster but may compromise qualitybalancedmode offers an ideal compromise between speed and qualityqualitymode is slower, but delivers the highest quality results
Default: balanced
seed int
seed intSpecifies how many images to generate in one run. Since image generation involves some randomness, creating multiple images at once increases the chance of getting a good result.
Default: 42
Min: 0
Max: 2^32 - 1
num_samples int
num_samples intSpecifies how many images to generate in a single run. Because image generation involves some randomness, generating multiple images at once increases the likelihood of getting a good result.
Default: 1
Min: 1
Max: 4
output_format 'png' | 'jpeg'
output_format 'png' | 'jpeg'Specifies the desired output image format.
pngdelivers the highest image quality, making it ideal for content creation and other cases where quality is the top priorityjpegprovides a faster response with slight compression, making it better suited for real-time applications like consumer virtual try-on experiences
Default: png
Response Polling
After submitting your request, poll the status endpoint using the returned job ID. See API Fundamentals for complete polling details.
Successful Response
When your virtual try-on completes successfully, the status endpoint will return:
The output array contains URLs to your generated try-on images showing the model wearing the specified garment. The number of images depends on the num_samples parameter (default: 1).
Runtime Errors
If an error occurs during inference (while the model is running), the API will return a 200 status code with a prediction status: failed. The response will also include an error object under the error key.
ImageLoadError
The pipeline couldn’t load the model or garment image from the provided inputs.
For Image URLs:
Make sure the URL is publicly accessible and not restricted by permissions.
Verify that the
Content-Typeheader specifies the correct image format (image/jpegorimage/png)
For Base64-encoded images:
Prefix the string with
data:image/<format>;base64where format is the image type (such asjpegorpng)
ContentModerationError
Prohibited content was detected in the provided garment image according to your current moderation settings.
If your use case allows, adjust
moderation_leveltopermissiveornone.Setting
moderation_level: nonedisables content moderation but does not remove your responsibility to ensure ethical and lawful use, as outlined in our Terms of Service.Misuse of this technology such as generating inappropriate imagery of individuals without consent may result in service denial.
PoseError
The pipeline couldn’t detect a body pose in either the model image or the garment image (when garment_photo_type is set to model).
Improve the quality of the model or garment image by following our model photo guidelines.
PipelineError
An unexpected error occurred while running the pipeline.
Retry the request (you won't be charged for failed attempts). If the issue persists, please reach out to us at [email protected] and include the job ID from the failed attempt to help us locate and address the issue promptly.
ThirdPartyError
A third-party processor encountered an error or refused to process the request.
This is most likely due to content restrictions enforced by supporting services (such as image captioning). Try adjusting your image inputs. If the issue continues with different inputs, contact [email protected] with the job ID.
The Error Object
Example of an error when polling the /status endpoint:
If you encounter an unrecognized error, please contact us at [email protected]
Related Guides
For detailed implementation guides and best practices specific to Virtual Try-On:
Python Quickstart Guide - Complete Python implementation examples
JavaScript Quickstart Guide - Complete JavaScript implementation examples
Data Retention & Privacy - Understand how TryItOn handles your data
Last updated