FASHN Virtual Try-On v1.6
Virtual Try-On v1.6 enables realistic garment visualization using just a single photo of a person and a garment. It’s our most advanced AI model for try-on experiences, designed to deliver high-quality, detailed results with minimal setup.
- Model Name:
tryon-v1.6 - Lifecycle: stable
- Processing Resolution: 864×1296 pixels
- Processing Time:
- Performance: 5 seconds
- Balanced: 8 seconds
- Quality: 12–17 seconds (variable depending on input resolution)
- Credits: 1 per image
Request
Generate a virtual try-on by submitting your model and garment images to the universal /v1/run endpoint:
Request Parameters
Required Parameters
model_imageRequiredimage URL | base64
Primary image of the person on whom the virtual try-on will be performed.
Models Studio users can use their saved models by passing saved:<model_name>.
garment_imageRequiredimage URL | base64
Reference image of the clothing item to be tried on the model_image.
Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
Optional Parameters
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_freeboolean
Direct garment fitting without clothing segmentation, enabling bulkier garment try-ons with improved preservation of body shape and skin texture. Set to false if original garments are not removed properly.
Default: true
moderation_level'conservative' | 'permissive' | 'none'
Sets the content moderation level for garment images.
-conservative enforces stricter modesty standards suitable for culturally sensitive contexts. Blocks underwear, swimwear, and revealing outfits.
-permissive allows swimwear, underwear, and revealing garments, while still blocking explicit nudity.
-none disables all content moderation
Default: permissive
This technology is designed for ethical virtual try-on applications. Misuse—such as generating inappropriate imagery without consent—violates 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_typeauto | flat-lay | model
Specifies the type of garment photo to optimize internal parameters for better performance. 'model' is for photos of garments on a model, 'flat-lay' is for flat-lay or ghost mannequin images, and 'auto' attempts to automatically detect the photo type.
Default: auto
modeperformance | balanced | quality
Specifies the mode of operation.
-performance mode is faster but may compromise quality
-balanced mode is a perfect middle ground between speed and quality
-quality mode is slower, but delivers the highest quality results.
Default: balanced
seedint
Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.
Default: 42
Min: 0
Max: 2^32 - 1
num_samplesint
Number of images to generate in a single run. Image generation has a random element in it, so trying multiple images at once increases the chances of getting a good result.
Default: 1
Min: 1
Max: 4
output_format'png' | 'jpeg'
Specifies the desired output image format.
-png: Delivers the highest quality image, ideal for use cases such as content creation where quality is paramount.
-jpeg: Provides a faster response with a slightly compressed image, more suitable for real-time applications like consumer virtual try-on experiences.
Default: png
return_base64boolean
When set to true, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed according to the output_format (e.g., data:image/png;base64,... or data:image/jpeg;base64,...).
This option offers enhanced privacy as user-generated outputs are not stored on our servers when return_base64 is enabled.
Default: false
Response Polling
After submitting your request, poll the status endpoint using the returned prediction 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
Try-On shares the common runtime errors in Error Handling. Additional endpoint-specific errors:
| Name | Cause | Solution |
|---|---|---|
PoseError | The pipeline was unable to detect a body pose in either the model image or the garment image (when garment_photo_type: "model"). | Improve model or garment photo quality following the model photo guidelines. |
Related Guides
For detailed implementation guidance and best practices specific to Virtual Try-On:
- Try-On Parameters Guide - Detailed parameter optimization for try-on models
- Python Quickstart Guide - Complete Python implementation examples
- JavaScript Quickstart Guide - Frontend integration patterns
- Image Preprocessing Best Practices - Optimize your input images for better results
- Data Retention & Privacy - Understand how FASHN handles your data