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
- Processing Resolution: 864×1296 pixels
- Processing Time:
- Performance: 5 seconds
- Balanced: 8 seconds
- Quality: 12–17 seconds (variable depending on input resolution)
Request
Generate a virtual try-on by submitting your model and garment images to the universal /v1/run
endpoint:
Request Parameters
Required Parameters
model_image
Requiredimage 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_image
Requiredimage 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_free
boolean
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_type
auto | 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
mode
performance | 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
seed
int
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_samples
int
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_base64
boolean
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
If an error occurs during inference (while running the model), the API will return a 200
status code with a prediction status: failed
.
Additionally, an error object will be included under the error key in the response.
Name | Cause | Solution |
---|---|---|
ImageLoadError | The pipeline was unable to load the model or garment image from the provided inputs. | For Image URLs:
|
ContentModerationError | Prohibited content detected in the provided garment image based on your current moderation settings. |
|
PoseError | The pipeline was unable to detect a body pose in either the model image or the garment image (if the 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 during the execution of the pipeline. | Retry the request (you will not be charged for failed attempts). If the issue persists, please reach out to us at support@fashn.ai and include the prediction ID from the failed attempt to help us locate and address the issue promptly. |
ThirdPartyError | A third-party processor failed or refused to handle the request. | Most likely caused by content restrictions enforced by supporting services (e.g., image captioning). If that’s the case, try modifying your image inputs. If the issue persists across different inputs, contact support@fashn.ai with the prediction ID. |
The Error Object
Example of an error when polling the /status
endpoint:
If you encounter an unrecognized error, please contact us at support@fashn.ai.
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