The Virtual Try-On API enables realistic clothing transfer onto a model image. It supports upper garments, lower garments, and one-piece outfits, allowing you to visualize how different clothing items look on a person.
taskId.Enum: application/json
Bearer authentication token. Example: Bearer {{APIKey}}.
The URL of the model image. This parameter cannot be empty.
Optional. The URL of the upper garment image (e.g., shirt, jacket, top). Provide at least one of upperClothes, lowerClothes, or overallClothes.
Optional. The URL of the lower garment image (e.g., pants, skirt, shorts). Provide at least one of upperClothes, lowerClothes, or overallClothes.
Optional. The URL of the one-piece garment image (e.g., dress, jumpsuit, overalls). Provide at least one of upperClothes, lowerClothes, or overallClothes.
Constraint: At least one of upperClothes, lowerClothes, or overallClothes must be provided, and they cannot all be filled at the same time. You can provide a maximum of two clothing items (e.g., upper + lower for a two-piece outfit). When overallClothes is set, upperClothes and lowerClothes must be empty.
Optional. Generate matching shoes for clothing when enabled. Default: false.
Optional. The width of the output image in pixels. Default: 600. The product of width and height must not exceed 1,200,000.
Optional. The height of the output image in pixels. Default: 800. The product of width and height must not exceed 1,200,000.
Returns 0 for success, or a specific error code.
Returns "success" or a descriptive error message.
The unique identifier for the task. Use this ID with the Polling API to retrieve the generated output.
Use the Polling API to retrieve the processing results.
Alternatively, you can enable Callback to receive task results automatically upon completion.
{
"code": 0,
"message": "success",
"data": {
"task": {
"taskId": "b08337dc08d7428daa64b3d5e61b8350",
"status": 3
},
"images": [{
"imageUrl": "https://dreamface-resource-aigc.oss-us-east-1.aliyuncs.com/apiDocsAdmin/2025-4-1744793368637-tryon_result.jpg",
"imageType": "jpg"
}]
}
}curl -X POST 'https://api.newportai.com/api/async/tryon_clothes' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer {{APIKey}}" \
-d '{
"modelImage": "https://d2t5pyzt5qvy2d.cloudfront.net/api/static_resource/prod/default/INj5UrnnrKIzCR1uYBWv0.png",
"upperClothes": "https://d2t5pyzt5qvy2d.cloudfront.net/api/static_resource/prod/default/8uuMKyo8Pf_Fb68Rvka7H.jpeg",
"lowerClothes": "https://d2t5pyzt5qvy2d.cloudfront.net/api/static_resource/prod/default/X_5VQM9dEfCi5KtMfoEgY.jpeg",
"enableShoes": false,
"width": 600,
"height": 800
}'{
"code": 0,
"message": "success",
"data": {
"taskId": "b08337dc08d7428daa64b3d5e61b8350"
}
}