Template Sets
Generate one look you like, save it, then put every other product through the exact same model, venue, pose and framing — a shoot you generated once becomes a catalog you can reuse forever.
fashion_model/venue/pose/shotType/stylePreset/ratio
a past generation used, then replays that same combination the next time you generate, with a
different garment. Nothing about how the image itself is generated changes.Which tools support it
Only tools with a model/venue/pose concept can be saved as a template — an in-place edit (Pose Variation, Model Swap, Photo Edit) or a deterministic single-image tool (Enhance, Remove Background, Reframe) has no "styling" to save.
1. Save a template from a generation you like
The common path: you already ran a virtual_model or
pro_studio job whose model/venue/pose you want to keep reusing.
Pass that job's id as sourceMediaId — Fashio reads back exactly what it
used.
curl -X POST https://api.fashiolabs.com/v1/template-sets \
-H "Authorization: Bearer fio_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"label": "Studio white, model A, 3/4 pose",
"sourceMediaId": "8b1e..."
}'
const res = await fetch("https://api.fashiolabs.com/v1/template-sets", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.FASHIO_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
label: "Studio white, model A, 3/4 pose",
sourceMediaId: previousJobId,
}),
});
const { id: templateSetId } = await res.json();
{ "success": true, "id": "tset_9f2a..." }sourceMediaId must be a completed job you own. You can instead define a template
directly, without a past job — pass toolId and images.fashion_model (a
catalog id or URL) yourself:
{
"label": "Editorial, model B",
"toolId": "virtual_model",
"images": { "fashion_model": "fm_south_asian_01", "venue": "venue_studio_white" },
"pose": "pose_standing_relaxed"
}2. Reuse it on a new product
Pass templateSetId instead of picking fashion_model/venue/
pose by hand — only the new garment is required.
curl -X POST https://api.fashiolabs.com/v1/generations \
-H "Authorization: Bearer fio_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateSetId": "tset_9f2a...",
"images": {
"garment_photo": "https://your-cdn.com/new-dress.jpg"
}
}'
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({
templateSetId,
images: { garment_photo: newGarmentUrl },
}),
});
const { id } = await res.json();
Any field you DO pass (e.g. a different venue) overrides the template's saved value —
only what you omit gets filled in. toolId is optional here; when omitted it's taken
from the template, and if given it must match the template's own toolId.
3. Build a whole catalog from it
The same templateSetId works with the pack tools —
Clothing E-com Pack and
Jewelry E-com Pack — so one saved look can fan out into
campaign/catalogue/lookbook/e-commerce formats for every new product you run through it, not just a
single photo.
{
"templateSetId": "tset_9f2a...",
"images": { "user_photo": "https://your-cdn.com/new-product.jpg" }
}
// toolId is "clothing_ecom_pack" on this template — resultUrls comes back with several imagesManaging saved templates
List
curl https://api.fashiolabs.com/v1/template-sets \
-H "Authorization: Bearer fio_live_YOUR_KEY"
{
"success": true,
"templateSets": [
{
"id": "tset_9f2a...",
"label": "Studio white, model A, 3/4 pose",
"toolId": "virtual_model",
"images": { "fashion_model": "https://...", "venue": "https://..." },
"pose": "pose_standing_relaxed",
"coverUrl": "https://.../result.jpg"
}
]
}Delete
curl -X DELETE https://api.fashiolabs.com/v1/template-sets/tset_9f2a... \
-H "Authorization: Bearer fio_live_YOUR_KEY"
Common errors
| Status | Meaning |
|---|---|
| 400 | label is required. |
| 400 | sourceMediaId has not completed generating yet. |
| 400 | toolId must be one of: virtual_model, outfit_photo, ... |
| 400 | templateSetId was saved for toolId "X", not "Y". — on POST /v1/generations, when the request's toolId doesn't match the saved template. |
| 404 | sourceMediaId not found. / templateSetId not found. — wrong id, or owned by a different key. |