Skip to Content
TryItOn
DocsAPI ReferenceSDKsResources

Live Try-On Garments & Outfits API

Prepare garments and outfits for real-time virtual try-on: product photo in, a reusable garment id out. Free, cached, with custom stream instructions.

Before a garment can appear on a live stream, prepare it once on your server. You get an id back. Pass it as garment_id when you start a session, or to live.switchGarment(id) in the browser. To show 2 or 3 items at once, combine prepared garments into an outfit.

Preparing is free, up to 2000 new garments and outfits per account per UTC day. Repeat calls for something already prepared return it at once with 200 and don't count.

Good to know

  • Prepare ahead. Fetching, normalizing and describing an image takes a few seconds. Do it when you sync your catalog, not when the shopper clicks.
  • Send the category. Detection can misread photos that show more than the item, for example a model wearing a shirt and trousers. Categories are the same as for Clothing & Accessories Try-On.
  • One garment per combination. The same photo with a different category or different options gets a different id.
  • Image URLs are fetched by TryItOn: public, at most 25 MB, answering within 15 seconds and at most 5 redirects. Private and internal addresses are refused. Data URLs count toward the 12 MB body limit.
  • Unused garments expire. A garment or outfit nobody starts or switches to for 90 days is deleted. Prepare it again for a new id. Using an outfit keeps its items alive. Storage details are in Data Retention & Privacy.

Prepare a garment

POST
/live/garments

Authorization

bearerAuth
headerAuthorizationBearer <token>

Your API key from https://tryiton.now/app/developer, sent as Authorization: Bearer YOUR_API_KEY. Keep it on your server. A missing, malformed or unknown key is rejected with 403 Forbidden.

Request Body

application/json
  1. body
garment_image*string

A public http(s) URL or a data:image/...;base64, URI of the garment. A product photo on a plain background works best.

Length1 <= length
category?|

Recommended. What the item is, or auto / omitted to detect it. Detection can misread photos that show more than the item.

subcategory?|

Must be valid for category (see TryonSubcategory). Ignored when category is omitted.

detail_images?array<>

Up to 3 extra photos of the same item (back, side, close-up detail), each a URL (at most 8 MB) or data URI. They only sharpen the item's description, so they're ignored when you send description; the stream is shown garment_image alone.

Itemsitems <= 3
description?string

Your own description of the item, e.g. black leather knee-high boots. Replaces the detected one in the generated prompt.

Length1 <= length <= 200
instructions?string

Your own prompt for the stream, used instead of the generated one, word for word.

Length1 <= length <= 1000
enhance_prompt?boolean

Let the stream expand the prompt. Turn it off to have exact instructions used as written.

Defaulttrue

Response Body

Already prepared from the same image and pick (cached).

application/json
  1. response
ok*boolean
garment*

A garment or outfit prepared for live try-on.

curl -X POST 'https://tryiton.now/api/v1/live/garments' \  -H 'Authorization: Bearer YOUR_API_KEY' \  -H 'Content-Type: application/json' \  -d '{  "garment_image": "https://example.com/products/shirt.jpg",  "category": "clothing",  "subcategory": "tops"}'
Example Response
{  "ok": true,  "garment": {    "id": "6b0827eba2f220ae7dd7c7fb",    "category": "clothing",    "subcategory": "tops",    "description": "a navy short-sleeve pique polo shirt",    "prompt": "Substitute the current top with a navy short-sleeve pique polo shirt shown in the reference image, matching its color, material, and fit.",    "enhancePrompt": true,    "items": null,    "createdAt": "2026-11-26T12:20:59.512Z"  }}

Custom instructions

The generated prompt replaces the item's slot ("Substitute the current shoes with…") or adds an accessory, and leaves the rest of the shopper's outfit alone. When you need something else, send your own instructions. They're used word for word. Set enhance_prompt: false to stop the stream from expanding them.

POST /live/garments request body
{
  "garment_image": "https://example.com/products/boots.jpg",
  "category": "footwear",
  "instructions": "Replace only the shoes with the black leather knee-high boots shown in the reference image. Keep the person's clothing, body shape and proportions unchanged.",
  "enhance_prompt": false
}

Describe the item in words. The stream follows the text, and an instruction that only says "the item in the reference image" can leave the video unchanged. To keep the generated prompt and only fix the item's name, send a description instead. Check the returned prompt on a real stream before you prepare a whole catalog.

Outfits

What can go together. Each item needs a known place on the body, which comes from its category. No two items may take the same place: one top, one bottom, one pair of shoes, one hat, one watch and so on. A dress takes the top and the bottom. Items in the others category (socks, suspenders) combine freely. An outfit can't contain another outfit. A garment prepared with category: "auto" works when detection could tell where it's worn.

Use product photos. Each item's image becomes one part of the outfit's image. An item prepared from a photo of a model in a full outfit brings that whole outfit along. Use packshots, flat lays or ghost mannequin photos.

Swapping one item. Prepare the new combination (the same trousers and shoes with a different top) and switch to it. The stream keeps running and the other items stay in place. Prepare the variants ahead to make switches instant.

Items' own instructions don't carry over. The outfit's prompt names each item by its category and description, unless you send instructions for the outfit.

Prepare an outfit

POST
/live/outfits

Authorization

bearerAuth
headerAuthorizationBearer <token>

Your API key from https://tryiton.now/app/developer, sent as Authorization: Bearer YOUR_API_KEY. Keep it on your server. A missing, malformed or unknown key is rejected with 403 Forbidden.

Request Body

application/json
  1. body
garment_ids*array<>

Prepared garments to wear together, in any order. At most one per body place.

Items2 <= items <= 3
instructions?string

Your own prompt for the stream, used instead of the generated one, word for word.

Length1 <= length <= 1000
enhance_prompt?boolean

Let the stream expand the prompt.

Defaulttrue

Response Body

Already prepared from the same garments and options (cached).

application/json
  1. response
ok*boolean
outfit*

A garment or outfit prepared for live try-on.

Example Request
curl -X POST 'https://tryiton.now/api/v1/live/outfits' \  -H 'Authorization: Bearer YOUR_API_KEY' \  -H 'Content-Type: application/json' \  -d '{  "garment_ids": [    "6b0827eba2f220ae7dd7c7fb",    "6b0827eba2f220ae7dd7c7fc",    "6b0827eba2f220ae7dd7c7fd"  ]}'
Example Response
{  "ok": true,  "outfit": {    "id": "6b0827eba2f220ae7dd7c7fb",    "category": "auto",    "subcategory": "auto",    "description": "string",    "prompt": "string",    "enhancePrompt": true,    "items": [      "6b0827eba2f220ae7dd7c7fb"    ],    "createdAt": "2019-08-24T14:15:22Z"  }}