Virtual Try-On (Image Try-On)
The Try-On endpoint allows you to seamlessly fit a garment onto a person using an image reference.
Model Name: tryon
Lifecycle: stable
Processing Time: ~15s–30s
Output Format: Auto (JPEG or PNG)
Delivery Methods: URL (via Polling)
Credits: 1 × sampleCount
Request
Submit your try-on configuration to the universal /v1/run endpoint using a JSON payload.
https://fititon.app/api/v1/runRequest Examples
curl -X POST https://fititon.app/api/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model_name": "tryon",
"inputs": {
"personImage": "https://example.com/person.jpg",
"garmentImage": "https://example.com/garment.jpg",
"accuracy": "high",
"sampleCount": 1
}
}'Response
The Try-On generation happens asynchronously in the background. Your request will immediately return a 200 OK status with a tracking object.
{
"id": "123a87r9-4129-4bb3-be18-9c9fb5bd7fc1",
"status": "starting",
"created_at": "2026-07-17T11:00:00Z",
"error": null,
"output": null
}Polling for Results
You must use the returned id to poll the status endpoint (GET https://fititon.app/api/v1/status/{id}) to retrieve your generated image URLs. See the API Setup guide for detailed instructions.
Request Parameters
Required Parameters
personImageRequiredstringThe base image of the model you want to dress. Can be a publicly accessible URL or a Base64-encoded image string. Supported formats: JPEG, PNG, WEBP. Max size: 25MB.
Pro Tip: Front-facing poses with arms visible produce the most realistic draping. Remove bags, scarves, or jackets that cover the body before shooting.
Formatting Requirement
When submitting a Base64 string, it must include the standard data URI prefix (e.g., data:image/jpeg;base64,...). The /v1/run endpoint only accepts JSON payloads, so multipart/form-data uploads are not supported.
garmentImageRequiredstringThe image of the clothing item to try on. Can be a publicly accessible URL or a Base64-encoded image string.
Pro Tip: Flat-lay garment photos on white backgrounds work noticeably better than on-hanger shots or crumpled clothes.
Optional Parameters
accuracy'standard' | 'high' | 'hyper'Defines the fidelity of the try-on fit. Higher accuracy increases generation precision but may take slightly longer.
Default: standard
sampleCountintegerNumber of image variations to generate per request. Must be between 1 and 4. Additional images consume more credits and increase processing time linearly.
Default: 1
Runtime Errors
Runtime errors for this feature use the shared set documented in Error Handling. If an error occurs during processing, the status will update to "error" and the error field will contain the specific failure reason.
Credit Cost
For Developer API requests, the Virtual Try-On endpoint operates at a flat rate of 1 credit per image generated, regardless of the requested quality tier.
Formula: Cost = 1 × sampleCount
| Parameter | Credits per Image |
|---|---|
| Flat Rate | 1 |
