# Mannequin to Flat Lay

For AI agents: this is the Markdown version of https://docs.fashiolabs.com/tools/model_to_flat_lay.html. The index of all Fashio API docs is at https://docs.fashiolabs.com/llms.txt, and the complete reference in one file is at https://docs.fashiolabs.com/llms-full.txt.

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)

![Mannequin to Flat Lay result — garment converted to a clean flat-lay product shot](https://fashiolabs.com/min/images/mannequin-to-flat-lay/after.png)

## 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](https://docs.fashiolabs.com/tools/virtual_model.md) — 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**

```bash
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"
  }'
```

**Node.js**

```javascript
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();
```

**Python**

```python
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**

```json
{ "success": true, "id": "8b1e...", "status": "processing" }
```

Poll `GET /v1/generations/:id` (see [Quickstart](https://docs.fashiolabs.com/quickstart.md)) until it completes:

**200 · completed**

```json
{
  "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](https://docs.fashiolabs.com/rate-limits.md). |

## Related tools

- [Amateur to Professional](https://docs.fashiolabs.com/tools/amateur_to_pro.md) — polish a casual product photo instead of converting an on-model shot.
- [Remove Background](https://docs.fashiolabs.com/tools/remove_background.md) — strip the background from a product photo.

---

Source: https://docs.fashiolabs.com/tools/model_to_flat_lay.html · OpenAPI spec: https://docs.fashiolabs.com/openapi.yaml · Docs index: https://docs.fashiolabs.com/llms.txt
