Generation Tools
Mannequin to Flat Lay
The reverse of virtual try-on: take a photo of a garment on a mannequin or model and get back a clean flat-lay / ghost-mannequin style product shot.
toolId: "model_to_flat_lay"
4 credits
single_image_edit
ratio: global (default 1:1)
What it does
Point this at an existing on-model or mannequin photo and Fashio extracts the garment into a clean, catalogue-ready flat-lay or ghost-mannequin shot. It's the inverse of Virtual Try-On — useful when you already have on-model photography (your own shoot, a supplier photo, etc.) and need a matching product-only image without a separate flat-lay shoot.
Request body
| Field | Type | Description | |
|---|---|---|---|
toolId | string | required | Always "model_to_flat_lay". |
images.user_photo | string | required | URL of the on-model or mannequin source photo to convert. |
ratio | string | optional | One of 1:1, 4:5, 3:4, 9:16, 16:9. Defaults to 1:1. |
Example request
curl -X POST https://api.fashiolabs.com/v1/generations \
-H "Authorization: Bearer fio_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"toolId": "model_to_flat_lay",
"images": {
"user_photo": "https://your-cdn.com/on-model-jacket.jpg"
},
"ratio": "1:1"
}'
const res = await fetch("https://api.fashiolabs.com/v1/generations", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.FASHIO_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
toolId: "model_to_flat_lay",
images: {
user_photo: "https://your-cdn.com/on-model-jacket.jpg",
},
ratio: "1:1",
}),
});
const { id } = await res.json();
import os, requests
res = requests.post(
"https://api.fashiolabs.com/v1/generations",
headers={"Authorization": f"Bearer {os.environ['FASHIO_API_KEY']}"},
json={
"toolId": "model_to_flat_lay",
"images": {
"user_photo": "https://your-cdn.com/on-model-jacket.jpg",
},
"ratio": "1:1",
},
)
job_id = res.json()["id"]
Response
202 Accepted
{ "success": true, "id": "8b1e...", "status": "processing" }Poll GET /v1/generations/:id (see Quickstart) until it completes:
200 · completed
{
"success": true,
"id": "8b1e...",
"status": "completed",
"resultUrls": ["https://.../result.jpg"],
"errorMessage": null
}Common errors
| Status | Meaning |
|---|---|
| 400 | model_to_flat_lay: missing required image "user_photo" — required image field wasn't resolvable. |
| 402 | Insufficient diamonds. Required 4, have <n>. |
| 429 | Daily request cap reached for this key — see Rate Limits. |
Related tools
- Amateur to Professional — polish a casual product photo instead of converting an on-model shot.
- Remove Background — strip the background from a product photo.