# Ready Template Sets

For AI agents: this is the Markdown version of https://docs.fashiolabs.com/ready-template-sets.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.

No photoshoot of your own to save yet? Fashio ships its own curated library of "ready photoshoots" — one model, one venue, a pinned list of poses — that you can run any product through without picking a model or venue yourself.

> This is a **different** library from [Template Sets](https://docs.fashiolabs.com/template-sets.md) — those are presets _you_ save from your own past generations. This is Fashio's own curated catalogue, the same one the app's "Catalogue" tool browses.

## 1\. Browse the library

**cURL**

```bash
curl "https://api.fashiolabs.com/v1/ready-template-sets?category=editorial&limit=10" \
  -H "Authorization: Bearer fio_live_YOUR_KEY"
```

**Node.js**

```javascript
const res = await fetch(
  "https://api.fashiolabs.com/v1/ready-template-sets?category=editorial&limit=10",
  { headers: { Authorization: "Bearer " + process.env.FASHIO_API_KEY } },
);
const { templateSets, nextCursor } = await res.json();
```

| Query param |  | Description |
| --- | --- | --- |
| `query` | optional | Free-text search. |
| `category` | optional | Matches a value in the set's `tags.category`. |
| `gender`, `setting`, `lighting`, `mood`, `palette`, `type` | optional | Single-value tag filters. |
| `featuredOnly` | optional | `true` to only show featured sets. |
| `sort` | optional | One of `curated` (default), `popular`, `newest`. |
| `limit` | optional | 1–60, default 20. |
| `startAfter` | optional | The previous page's `nextCursor`. |

**200**

```json
{
  "success": true,
  "templateSets": [
    {
      "id": "set_editorial_04",
      "displayNames": { "en": "Studio Editorial — Model A" },
      "coverUrl": "https://.../cover.jpg",
      "shotCount": 6,
      "isFeatured": true,
      "shots": [
        { "id": "shot_01", "shotType": "full_body", "previewUrl": "https://...", "isDefault": true }
      ]
    }
  ],
  "nextCursor": 1735000000000
}
```

## 2\. Get one set's full shot list

**cURL**

```bash
curl https://api.fashiolabs.com/v1/ready-template-sets/set_editorial_04 \
  -H "Authorization: Bearer fio_live_YOUR_KEY"
```

Each entry in `shots[]` has its own `id` — pass a subset of these to `shotIds` in the next step, or omit `shotIds` entirely to generate every shot.

## 3\. Run your product through it

One request generates one image per shot — a 6-shot set is 6 credits worth of shots, charged as a single job.

**cURL**

```bash
curl -X POST https://api.fashiolabs.com/v1/catalog-jobs \
  -H "Authorization: Bearer fio_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "readyTemplateSetId": "set_editorial_04",
    "images": { "garment_photo": "https://your-cdn.com/dress.jpg" }
  }'
```

**Node.js**

```javascript
const res = await fetch("https://api.fashiolabs.com/v1/catalog-jobs", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.FASHIO_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    readyTemplateSetId: "set_editorial_04",
    images: { garment_photo: garmentUrl },
  }),
});
const { mediaItemId } = await res.json();
```

| Field |  | Description |
| --- | --- | --- |
| `readyTemplateSetId` | required | From step 1/2. |
| `images.garment_photo` / `images.garment_photos` | required | Your product photo(s) — single URL or an array for multiple angles. |
| `shotIds` | optional | Generate only these shots. Omit for every shot in the set. |
| `ratio` | optional | Overrides the set's default aspect ratio. |
| `modelId` | optional | Advanced: override the underlying image-to-image model. |

**202 Accepted**

```json
{
  "success": true,
  "mediaItemId": "9c3f...",
  "status": "pack_processing",
  "packTotal": 6,
  "shotIds": ["shot_01", "shot_02", "..."],
  "diamondCost": 18,
  "message": "Catalogue generation started with 6 shots."
}
```

## 4\. Poll for every shot's result

Use the same [GET /v1/generations/:id](https://docs.fashiolabs.com/quickstart.md) endpoint as every other tool — `resultUrls` fills in with every completed shot's image, in the order they finish, once `status` is `completed`. A catalog job also returns `packTotal`/ `packCompleted`/`packFailed` so you can show progress before it's fully done.

**200 · still running**

```json
{
  "success": true,
  "id": "9c3f...",
  "status": "processing",
  "resultUrls": ["https://.../shot_01.jpg"],
  "packTotal": 6,
  "packCompleted": 1,
  "packFailed": 0,
  "errorMessage": null
}
```

**200 · completed**

```json
{
  "success": true,
  "id": "9c3f...",
  "status": "completed",
  "resultUrls": ["https://.../shot_01.jpg", "https://.../shot_02.jpg", "..."],
  "packTotal": 6,
  "packCompleted": 6,
  "packFailed": 0,
  "errorMessage": null
}
```

> If every shot fails, the whole job's diamonds are refunded automatically. Partial failures (some shots succeed, some don't) are not refunded for the failed shots — `packFailed` tells you how many.

## Common errors

| Status | Meaning |
| --- | --- |
| 400 | `readyTemplateSetId is required`, or no garment image was given. |
| 402 | Insufficient diamonds for the full shot count. |
| 404 | `readyTemplateSetId` doesn't exist or isn't active. |

---

Source: https://docs.fashiolabs.com/ready-template-sets.html · OpenAPI spec: https://docs.fashiolabs.com/openapi.yaml · Docs index: https://docs.fashiolabs.com/llms.txt
