Product to Model
The Product to Model endpoint transforms flat-lay or ghost-mannequin product shots into professional on-model photography, allowing you to specify the model's appearance or photographic style.
Model Name: product-to-model
Lifecycle: stable
Processing Time: ~10s–30s (increases when using style or model references)
Output Format: Auto (JPEG or PNG)
Delivery Methods: URL
Credits: 1 to 5 per generation (depends on quality)
Request
Submit your product image to the universal /v1/run endpoint:
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": "product-to-model",
"inputs": {
"productImage": "https://example.com/ghost-mannequin-shirt.jpg",
"styleId": "editorial",
"customPrompt": "Asian female model, outdoor city street, natural lighting",
"quality": "2k",
"sampleCount": 1,
"ratio": "3:4"
}
}'Response
Because image generation can take up to 20 seconds, the /v1/run endpoint returns a 201 Created status immediately with an asynchronous job id. You must poll the Status API using GET /v1/status/{id} to retrieve the final results. Alternatively, you can configure webhooks to receive notifications automatically. Please note that our webhook dispatcher enforces a strict 15-second timeout. Your server must acknowledge the webhook with a 2xx status code within 15 seconds, or we will consider it failed and retry it later.
{
"id": "123a87r9-4129-4bb3-be18-9c9fb5bd7fc1",
"status": "starting",
"created_at": "2026-07-18T17:30:00.000Z",
"error": null,
"output": null
}Once the status changes to "succeeded", the output field will contain an array with the URL pointing to your generated image:
{
"id": "123a87r9-4129-4bb3-be18-9c9fb5bd7fc1",
"status": "succeeded",
"created_at": "2026-07-18T17:30:00.000Z",
"error": null,
"output": [
"https://cdn.fititon.app/users/123/results/product-model-123.png"
]
}Request Parameters
Required Parameters
productImageRequiredstringThe product image to drape on a model (flat-lay or ghost mannequin). Can be a publicly accessible URL or a Base64-encoded image string. Max size: 25MB.
Pro Tip: Flat-lay photos on white backgrounds produce the most consistent on-model results. Mannequin photos also work well. Remove tags, price stickers, or accessories not part of the garment before shooting. Ensure the entire garment is visible and unfolded — no cut-off sleeves.
Formatting Requirement
When submitting a Base64 string, it must include the standard data URI prefix (e.g., data:image/jpeg;base64,...).
Optional Parameters
customPromptstringTextual instructions describing the desired model (e.g., gender, ethnicity, pose) or scene. Max length: 500 characters.
modelImageUrlstringThe URL of a human reference model to use for the generation. If omitted, a random diverse model will be generated.
Preset Models Available:
Note: Supplying a reference model increases the overall processing time.
styleIdstringThe photographic style ID to apply (e.g., "studio", "iphone", "editorial").
If omitted, defaults to a neutral studio presentation.
Available Styles:
| Style Name | Style ID (`styleId`) |
|---|---|
Note: Complex styles may increase generation time.
quality'1k' | '2k' | '4k'Output resolution tier. 1k produces ~1 megapixel output, 2k ~4 megapixels, and 4k ~16 megapixels.
Default: 1k
sampleCountintegerNumber of image variations to generate per request. Must be between 1 and 4.
Default: 1
ratiostringDefines the width-to-height ratio of the generated image. If empty, the system defaults to 3:4 for fashion shots.
Supported values: '1:1', '3:4', '4:3', '9:16', '16:9', '2:3', '3:2', '4:5', '5:4', '21:9'.
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 cost depends on the chosen output quality tier multiplied by the sampleCount.
Formula: Cost = QualityCredits × sampleCount
| Quality Tier | Credits per Image |
|---|---|
| 1k (Default) | 1 |
| 2k | 3 |
| 4k | 5 |
