Virtual Try-On
Submit a garment image and a model image. A successful request returns HTTP 202 with the task ID.
curl -X POST \
"https://www.fashiondiffusion.ai/api/public/v1/virtual-try-on/tasks" \
-H "Authorization: Bearer fd_live_xxx" \
-H "Content-Type: application/json" \
--data-raw '{
"garmentImageUrl": "https://cdn.example.com/garment.jpg",
"modelImageUrl": "https://cdn.example.com/model.jpg",
"imageCount": 1,
"resolution": "2K",
"ratio": "auto",
"mode": "FAST",
"model": "standard",
"prompt": "Keep the garment shape and fabric texture"
}'# Use Base64 instead of URL fields; each image accepts exactly one input form
"garmentImageBase64": "data:image/jpeg;base64,/9j/4AAQSk...",
"modelImageBase64": "data:image/png;base64,iVBORw0KGgo..."| Parameter | Supported values | Default |
|---|---|---|
| imageCount | 1, 2, 4 | 1 |
| resolution | 2K, 4K | 2K |
| ratio | auto, 1:1, 3:4, 4:3, 9:16, 16:9 | auto |
| mode | FAST, REFINE | FAST |
| model | standard, pro | standard |
Each image may be a public HTTPS URL or a Base64 data URL. JPEG, PNG, and WebP images must be no larger than 20 MB; the API stores inputs before creating the task.
Each accepted request creates and charges a new task. This version has no idempotency protection, so do not automatically retry a timed-out submission unless duplicate charges are acceptable.