Generation Tools
Model Swap
Swap the person's identity in an existing on-model photo while keeping the outfit, pose and scene unchanged — show the same product on a different model without a new photoshoot.
toolId: "model_swap"
4 credits
model_garment
ratio: ignored
What it does
Point this at an existing on-model photo and a new identity, and Fashio replaces just the person — the outfit, pose, framing and background all carry over unchanged. It's the tool to reach for when you need to show one product on several different models without re-shooting or re-generating the scene from scratch.
Like Pose Variation, this is an in-place edit: the original
frame and outfit are preserved, only who's wearing it changes. ratio is ignored if sent.
Request body
| Field | Type | Description | |
|---|---|---|---|
toolId | string | required | Always "model_swap". |
images.user_photo | string | required | URL of the existing on-model photo whose person will be replaced. |
images.fashion_model | string | required | A catalog ID from GET /v1/fashion-models, or a direct image URL, of the new identity to swap in. |
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_swap",
"images": {
"user_photo": "https://your-cdn.com/on-model-shot.jpg",
"fashion_model": "fm_south_asian_01"
}
}'
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_swap",
images: {
user_photo: "https://your-cdn.com/on-model-shot.jpg",
fashion_model: "fm_south_asian_01",
},
}),
});
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_swap",
"images": {
"user_photo": "https://your-cdn.com/on-model-shot.jpg",
"fashion_model": "fm_south_asian_01",
},
},
)
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_swap: 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
- Pose Variation — change how the person is posed instead of who they are.
- Virtual Try-On (Single) — generate a fresh on-model photo from a garment instead of editing an existing one.