# TryOnCloud: complete reference for AI assistants > TryOnCloud is an AI virtual try-on platform for clothing brands. Shoppers upload or take a photo and see themselves wearing a garment in seconds. It runs as a Shopify app, an in-store virtual try-on kiosk, and a pay-per-use Developer API for any website or app. Built in Hyderabad, India, it supports Indian ethnic wear (sarees, lehengas, salwar suits, kurtas, sherwanis) and all Western clothing. Last updated: 2026-11-16. Short index: https://www.tryoncloud.com/llms.txt All public content on tryoncloud.com may be indexed and cited by AI assistants. ## Key facts - Three products: a Shopify app (monthly plans billed by Shopify), an in-store virtual try-on kiosk, and a pay-per-use Developer API. - Shopify app installs from the Shopify App Store with no code. Listed since April 2026. - Developer API is self-serve: sign up, create an API key in the dashboard, call POST /api/v1/generate. A free test mode (?mock=true) costs nothing. - Developer API credits are bought once and never expire. Failed generations are refunded automatically. - India pays in INR, every other country pays in USD. The currency is decided by the server, never by the visitor. - Results are never watermarked with TryOnCloud branding. A small Powered by link shows on the Shopify widget on the Free and Starter plans only. - Lead capture: after a shopper's second try-on, an optional prompt asks for their email for the merchant. Shopify try-on users are tagged tryoncloud-user and an auto-created customer segment is added. - Purchase attribution matches completed Shopify orders back to the try-on that influenced them. - Klaviyo integration sends a Try-On Lead event per try-on. Signed webhooks send leads to any CRM (Mailchimp, HubSpot, Brevo, Zapier, Make and others). - Shopper photos are used only to create the try-on and are not stored by TryOnCloud after generation. Developer API results are returned to the developer and not stored by default. - Photos are never used to train AI models. A Data Processing Agreement covers GDPR and India's DPDP Act. - Account security: users get an email when their account signs in from a new device, and can see and sign out their signed-in devices from the dashboard. Device records hold only a hashed device ID, browser and OS, approximate location and a shortened IP, and are deleted 12 months after last use. - Resellers, agencies, wholesale buyers and enterprises all use the same Developer API and may resell try-on under their own brand. - The storefront widget is available in 6 languages: English, French, Spanish, German, Portuguese, Italian. ## Pricing ### Developer API packs (also used by resellers, agencies, wholesale and enterprise) - Starter (50+ try-ons): ₹9 or $0.11 per try-on - Growth (300+ try-ons): ₹8 or $0.10 per try-on - Business (1,000+ try-ons): ₹7.50 or $0.09 per try-on - Enterprise (5,000+ try-ons): ₹6.50 or $0.07 per try-on - Any amount from 50 to 1,00,000 try-ons, priced at the tier it reaches. Credits never expire. Failed try-ons are refunded. - India pays in INR, every other country in USD. ### Shopify app plans - Free: $0/month, 10 try-ons - Starter: $19/month, 100 try-ons, then $0.19 per extra try-on - Growth: $49/month, 300 try-ons, then $0.15 per extra try-on - Scale: $145/month, 1,000 try-ons, then $0.12 per extra try-on - Billed in USD by Shopify on the merchant's Shopify invoice. Try-ons reset every billing period. Full pricing: https://www.tryoncloud.com/pricing ## Developer API ``` POST https://www.tryoncloud.com/api/v1/generate Header: X-API-KEY: Body: multipart/form-data or JSON. Two images required: garment_image (file) or garment_url (public https URL) or garment_base64 person_image (file) or person_base64 JPEG, PNG, WebP or HEIC, up to 15MB each. Test mode: add ?mock=true (or header X-Mock: true). Nothing generated, nothing charged, nothing stored. Response 200: the body IS the finished try-on image (image/png). Store it yourself. Headers: X-Credit-Was-Free, X-Result-Id (only if result storage is enabled), X-Mock. Errors (JSON {error, code}): 401 NO_KEY, INVALID_KEY | 400 NO_PERSON, NO_GARMENT, BAD_INPUT | 402 NO_CREDITS, FREE_TRIAL_USED, QUOTA_EXCEEDED | 413 IMAGE_TOO_LARGE | 422 CONTENT_FILTERED (refunded) | 429 RATE_LIMITED (honour Retry-After) | 500 GENERATION_FAILED (refunded) Delete a stored result: DELETE https://www.tryoncloud.com/api/v1/results/ -> 204 Check credits: GET https://www.tryoncloud.com/api/v1/credits -> { credits_remaining, purchased_remaining, purchased_total, free_remaining, spends_from } MCP server for AI assistants: https://www.tryoncloud.com/api/mcp (Streamable HTTP, X-API-KEY header). Tools: search_docs, read_doc, check_credits, generate_tryon. SDK (JavaScript/TypeScript, zero dependencies): https://www.tryoncloud.com/sdk/tryoncloud.mjs Typical generation time: about 19 seconds median; use a 120 second client timeout. Call from your server only. Never put the API key in a browser or app. ``` Docs: https://www.tryoncloud.com/docs. AI coding assistants (Claude Code, Codex, Cursor) can be given the contract above as a project rule file, or connect the MCP server at https://www.tryoncloud.com/api/mcp. ## API documentation (full text) ### Introduction (https://www.tryoncloud.com/docs) Add AI virtual try-on to any website, app or kiosk with **one API call**. Send a garment photo and a person photo, and the response is the finished try-on image. No polling, no webhooks, no SDK required. When you need them, [async jobs, batches and signed webhooks](/docs/async) are there too. ### Basics | | | |---|---| | Base URL | `https://www.tryoncloud.com/api/v1` | | Auth | `X-API-KEY: tk_dev_v1_...` header on every request | | Main endpoint | `POST /generate`, returns the try-on as `image/png` | | OpenAPI spec | [`/api/v1/openapi.json`](/api/v1/openapi.json) (OpenAPI 3.1), for client generators and API tools | | Status | [Live success rate and speed](/status), also as JSON at `/api/v1/status` | | Price | From $0.11 down to $0.07 per try-on (₹9 to ₹6.50 in India). Credits never expire. Failed try-ons are refunded. See [pricing](/pricing#developer-api) | | Free to start | 10 free try-ons on sign-up, and a free test mode (`?mock=true`) | | Speed | Median about 19 seconds per result (last 30 days of production traffic) | | Storage | None by default. You get the image in the response and store it yourself | | Errors | JSON `{ "error", "code" }`. See [Errors](/docs/errors) | | SDK | Optional [JavaScript/TypeScript SDK](/docs/sdk). Plain HTTP works everywhere | ### Choose your platform ```cards Shopify | No-code app. Install and add the block. | /docs/shopify | No code React and Next.js | Server route plus a try-on component. | /docs/nextjs | Popular Node.js | Express, Fastify, NestJS. | /docs/nodejs Python | Django, Flask, FastAPI. | /docs/python PHP and Laravel | cURL or Laravel's HTTP client. | /docs/php Mobile apps | iOS, Android, Flutter, React Native. | /docs/mobile In-store kiosk | Try-on screen or smart mirror. | /docs/kiosk | Retail Klaviyo and webhooks | Send try-on leads to your CRM. | /docs/klaviyo All platforms | Compare every option. | /docs/platforms ``` ### How it works ```flow Your server -> TryOnCloud API: POST /api/v1/generate (garment + person) TryOnCloud API --> Your server: 200 image/png (the finished try-on) ``` 1. **Your server** sends the garment image and the shopper's photo to `POST /api/v1/generate` with your API key. 2. **TryOnCloud** checks both images, generates the try-on, and returns the finished PNG in the same response. 3. **You** show it to the shopper and store it wherever you like. Nothing is kept on our side unless you ask us to enable result storage. > **Note:** Always call the API from your server. Never put your API key in a browser, mobile app or public repository. ### What it supports - **Every clothing type:** sarees, lehengas, salwar suits, kurtas, sherwanis, dhotis, shirts, T-shirts, dresses, jeans, gowns, jackets and more, for men, women and kids. - **Any input:** a garment file, a public image URL, or base64. JPEG, PNG, WebP and HEIC up to 15MB. - **White-label:** no TryOnCloud branding on results. You may resell try-on under your own brand ([Resellers](/docs/resellers)). ### Next steps - [Quickstart](/docs/quickstart): your first try-on in five minutes - [Generate a try-on](/docs/generate): every parameter and response header - [AI coding assistants](/docs/ai-assistants): let Claude Code, Codex or Cursor write the integration - [MCP server](/docs/mcp): connect AI assistants directly to the API ### Quickstart (https://www.tryoncloud.com/docs/quickstart) Your first try-on in five minutes. ### 1. Get an API key 1. [Sign up free](/signup). Every account starts with 10 free try-ons. 2. Open **Dashboard > API Keys** and create a key. It starts with `tk_dev_v1_` and is shown **once**, so copy it now. 3. Store it as an environment variable on your server: ```bash export TRYONCLOUD_API_KEY="tk_dev_v1_your_key_here" ``` ### 2. Test for free with mock mode Add `?mock=true`. The request is authenticated and both images are validated exactly like a real call, but nothing is generated and nothing is charged. The person image comes back unchanged. ```bash curl -X POST "https://www.tryoncloud.com/api/v1/generate?mock=true" \ -H "X-API-KEY: $TRYONCLOUD_API_KEY" \ -F "garment_image=@shirt.jpg" \ -F "person_image=@person.jpg" \ -o mock.png -D - ``` Look for `X-Mock: 1` in the response headers. Use mock mode while you build. ### 3. Generate a real try-on Remove `?mock=true`: ```bash curl -X POST "https://www.tryoncloud.com/api/v1/generate" \ -H "X-API-KEY: $TRYONCLOUD_API_KEY" \ -F "garment_image=@shirt.jpg" \ -F "person_image=@person.jpg" \ -o result.png ``` `result.png` is the shopper wearing the garment. A typical result takes about 20 seconds, so give your HTTP client a timeout of at least 120 seconds. ### 4. Check what you have left ```bash curl https://www.tryoncloud.com/api/v1/credits -H "X-API-KEY: $TRYONCLOUD_API_KEY" ``` ### Best photos for best results - **Person:** one person, full body, facing the camera, good light, plain background if possible. - **Garment:** a clear front-facing product photo, on a model or flat on a plain background. - **Draped garments** (sarees, dhotis) work best when the product photo shows the garment draped on a model. ### Next steps - [Full examples](/docs/examples) in Node.js, Next.js, Python and PHP - [Errors](/docs/errors) and when to retry - [Async jobs, batches and webhooks](/docs/async) for long jobs and catalogue work - Create one key per app or environment, with an optional monthly credit limit, on **API Keys** - [Buy credits](/pricing#developer-api) when you are ready to go live ### Full examples (https://www.tryoncloud.com/docs/examples) Complete integrations you can copy. Each one keeps the API key on the server, handles errors, and returns the try-on image to your front end. ### Next.js route handler `app/api/try-on/route.ts`: your front end posts the shopper's photo and the product image URL here, and gets the PNG back. ```ts export const runtime = "nodejs" export const maxDuration = 120 export async function POST(req: Request) { const incoming = await req.formData() const person = incoming.get("person") const garmentUrl = incoming.get("garmentUrl") if (!(person instanceof Blob) || typeof garmentUrl !== "string") { return Response.json({ error: "person file and garmentUrl are required" }, { status: 400 }) } const form = new FormData() form.append("person_image", person, "person.jpg") form.append("garment_url", garmentUrl) const res = await fetch("https://www.tryoncloud.com/api/v1/generate", { method: "POST", headers: { "X-API-KEY": process.env.TRYONCLOUD_API_KEY! }, body: form, signal: AbortSignal.timeout(120_000), }) if (!res.ok) { const { error, code } = await res.json() return Response.json({ error, code }, { status: res.status }) } return new Response(await res.arrayBuffer(), { headers: { "Content-Type": "image/png" } }) } ``` ### Node.js (Express) ```js import express from "express" import multer from "multer" const app = express() const upload = multer({ limits: { fileSize: 15 * 1024 * 1024 } }) app.post("/try-on", upload.single("person"), async (req, res) => { const form = new FormData() form.append("person_image", new Blob([req.file.buffer]), "person.jpg") form.append("garment_url", req.body.garmentUrl) const r = await fetch("https://www.tryoncloud.com/api/v1/generate", { method: "POST", headers: { "X-API-KEY": process.env.TRYONCLOUD_API_KEY }, body: form, signal: AbortSignal.timeout(120_000), }) if (!r.ok) return res.status(r.status).json(await r.json()) res.type("png").send(Buffer.from(await r.arrayBuffer())) }) app.listen(3000) ``` ### Python ```python import os import requests def try_on(person_path: str, garment_path: str, out_path: str = "result.png") -> str: with open(person_path, "rb") as person, open(garment_path, "rb") as garment: r = requests.post( "https://www.tryoncloud.com/api/v1/generate", headers={"X-API-KEY": os.environ["TRYONCLOUD_API_KEY"]}, files={"person_image": person, "garment_image": garment}, timeout=120, ) if r.status_code != 200: err = r.json() raise RuntimeError(f"{err['code']}: {err['error']}") with open(out_path, "wb") as f: f.write(r.content) return out_path print(try_on("person.jpg", "shirt.jpg")) ``` ### PHP ```php true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 120, CURLOPT_HTTPHEADER => ["X-API-KEY: " . getenv("TRYONCLOUD_API_KEY")], CURLOPT_POSTFIELDS => [ "person_image" => new CURLFile("person.jpg"), "garment_url" => "https://cdn.yourstore.com/shirt.jpg", ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($status !== 200) { $err = json_decode($body, true); throw new Exception($err["code"] . ": " . $err["error"]); } file_put_contents("result.png", $body); ``` ### Front end The browser only talks to **your** server, never to TryOnCloud directly: ```js const form = new FormData() form.append("person", fileInput.files[0]) form.append("garmentUrl", product.imageUrl) const res = await fetch("/api/try-on", { method: "POST", body: form }) if (res.ok) resultImg.src = URL.createObjectURL(await res.blob()) ``` ### TypeScript SDK (https://www.tryoncloud.com/docs/sdk) A small, zero-dependency client with full TypeScript types. Works in Node 18+, Deno, Bun and edge runtimes. **Server-side only.** ### Install The package is being prepared for npm. Until then, download the single file into your project: ```bash curl -o tryoncloud.mjs https://www.tryoncloud.com/sdk/tryoncloud.mjs ``` > **Tip:** Plain `fetch` works just as well. The SDK only saves you the form building, error parsing and header reading. See [Generate a try-on](/docs/generate). ### Usage ```js import { readFile, writeFile } from "node:fs/promises" import { TryOnCloud, TryOnCloudError } from "./tryoncloud.mjs" const client = new TryOnCloud() // reads TRYONCLOUD_API_KEY try { const result = await client.generate({ garment: { url: "https://cdn.yourstore.com/shirt.jpg" }, person: { data: await readFile("person.jpg"), filename: "person.jpg" }, customerId: "shopper_123", // optional, your own end-user id idempotencyKey: crypto.randomUUID(), // optional, a retry is never charged twice }) await writeFile("result.png", result.image) console.log("free credit?", result.creditWasFree, "request", result.requestId) } catch (e) { if (e instanceof TryOnCloudError && e.code === "NO_CREDITS") { console.log("Out of credits, top up in the dashboard") } else if (e instanceof TryOnCloudError && e.code === "KEY_LIMIT_REACHED") { console.log("This key used its monthly limit", e.details) // { used, limit } } else throw e } ``` ### API | Method | Returns | Endpoint | |---|---|---| | `new TryOnCloud({ apiKey?, baseUrl?, timeoutMs? })` | client | | | `generate({ garment, person, mock?, customerId?, idempotencyKey? })` | `{ image, contentType, resultId, creditWasFree, mock, requestId }` | `POST /generate` | | `createGeneration({ garment, person, mock?, customerId?, metadata?, webhookUrl?, idempotencyKey? })` | the job (`status: "queued"`) | `POST /generations` | | `getGeneration(id)` | the job | `GET /generations/:id` | | `waitForGeneration(id, { intervalMs?, timeoutMs? })` | the finished job (polls) | `GET /generations/:id` | | `createBatch({ items, webhookUrl?, mock? })` | the batch | `POST /batches` | | `getBatch(id)` | the batch with every item | `GET /batches/:id` | | `cancelBatch(id)` | the batch, with `cancelled_now` and `refunded_credits` | `DELETE /batches/:id` | | `getResult(resultId)` | the image bytes | `GET /results/:id` | | `deleteResult(resultId)` | nothing | `DELETE /results/:id` | | `deleteCustomer(customerId)` | `{ results_deleted, records_cleared, webhook_events_deleted }` | `DELETE /customers/:id` | | `credits()` | `{ credits_remaining, purchased_remaining, purchased_total, free_remaining, spends_from }` | `GET /credits` | | `TryOnCloud.verifyWebhook(rawBody, headers, secret)` | `true` or `false` | | Image inputs: - `{ url }`: a public https image URL (garment, or the person in `createGeneration`) - `{ base64 }`: a base64 string - `{ data, filename? }`: a `Blob`, `ArrayBuffer`, `Uint8Array` or Node `Buffer` Errors are thrown as `TryOnCloudError`, with `status`, `code` (see [Errors](/docs/errors)), `requestId`, `details` (extra fields such as `used` and `limit`) and `retryAfter` on `429`. ### Async jobs and batches ```js // One async try-on, result fetched when ready const job = await client.createGeneration({ garment, person, customerId: "shopper_123" }) const done = await client.waitForGeneration(job.id) // or receive a webhook instead if (done.status === "completed") await writeFile("look.png", await client.getResult(done.result_id)) // A catalogue batch, notified by webhook const batch = await client.createBatch({ items: skus.map((s) => ({ garment_url: s.imageUrl, person_url: modelUrl, customer_id: s.sku })), webhookUrl: "https://example.com/hooks/tryoncloud", }) ``` See [Async jobs, batches and webhooks](/docs/async) for limits and events. ### Verify webhooks Pass the raw request body, the headers and your signing secret (**API Keys > Webhooks**): ```js // Next.js route handler export async function POST(request) { const raw = await request.text() if (!(await TryOnCloud.verifyWebhook(raw, request.headers, process.env.TRYONCLOUD_WEBHOOK_SECRET))) { return new Response("bad signature", { status: 401 }) } const { event, data } = JSON.parse(raw) // event: generation.completed | generation.failed | batch.completed | webhook.test return new Response("ok") } ``` Deliveries older than 5 minutes are rejected, so a captured delivery cannot be replayed. ### Test mode ```js const preview = await client.generate({ garment, person, mock: true }) // free, returns the person image const testJob = await client.createGeneration({ garment, person, mock: true }) // free, completes without a render ``` ### All platforms (https://www.tryoncloud.com/docs/platforms) TryOnCloud works on every platform. Pick yours: ### Stores and apps ```cards Shopify | No-code app. Install, add the block, done. Products sync automatically. | /docs/shopify | No code Shopify Hydrogen (headless) | Headless Shopify on Hydrogen and Oxygen: one server route and a product-page button. | /docs/shopify-hydrogen | Enterprise React and Next.js | Server route plus a front-end component for headless storefronts. | /docs/nextjs | Popular Node.js | Express, Fastify, NestJS or any Node backend. | /docs/nodejs Python | Django, Flask or FastAPI. | /docs/python PHP and Laravel | Plain PHP with cURL, or Laravel's HTTP client. | /docs/php Mobile apps | iOS, Android, Flutter and React Native, through your backend. | /docs/mobile In-store kiosk | A try-on screen or smart mirror for physical stores. | /docs/kiosk | Retail Any other stack | One HTTP call from any language. Start with the API reference. | /docs/generate ``` ### Marketing and CRM (Shopify app) ```cards Klaviyo | A Try-On Lead event per captured lead, for flows and segments. | /docs/klaviyo Webhooks | Signed lead events to HubSpot, Zoho, Mailchimp, Zapier, Make or your server. | /docs/webhook ``` ### Build it faster with AI ```cards AI coding assistants | Let Claude Code, Codex or Cursor write the integration. | /docs/ai-assistants MCP server | Connect AI assistants straight to the API and these docs. | /docs/mcp | New TypeScript SDK | A small typed client for Node, Deno, Bun and edge. | /docs/sdk ``` ### Which path is right for you? | You have | Use | Code needed | |---|---|---| | A Shopify store | [Shopify app](/docs/shopify) | None | | A headless Shopify store (Hydrogen) | [Developer API on Hydrogen](/docs/shopify-hydrogen) | A server route and a component | | Any other website or headless store | [Developer API](/docs/generate) from your server | A server route | | A mobile app | Developer API through your backend | A backend endpoint | | A physical store | [In-store kiosk](/docs/kiosk) | None | | Clients you build for (agency or reseller) | Developer API, one key per client | A server route | > **Note:** For everything except Shopify and the kiosk, the API key must stay on your server. Your website or app talks to your server, and your server talks to TryOnCloud. ### Shopify (https://www.tryoncloud.com/docs/shopify) The fastest way to add virtual try-on to a Shopify store. **No code and no API key.** The Shopify app is billed by Shopify on your Shopify invoice. ### Install 1. Install **TryOnCloud** from the [Shopify App Store](https://apps.shopify.com/tryoncloud). 2. In the Shopify admin, go to **Online Store > Themes > Customize**, open a product page template, and add the **TryOnCloud Try-On** app block to the product section, under your Add to cart button. 3. Save. The try-on button now shows on your product pages. Your products sync automatically. The AI uses the product photos already in your catalogue, so there is nothing to upload or reshoot. ### What shoppers see 1. They tap **Try On Virtually** on a product page. 2. They upload a photo or take one with their camera. A "What makes a good photo" guide helps them pick a good one. 3. They see themselves wearing the product, then buy, download or share the look. ### What you can configure - Button text, position and colours to match your theme. - Which collections or products show the button. - A daily or weekly try-on limit per shopper. - Optional email capture after a shopper's second try-on, with leads in your dashboard and the Shopify customer tag `tryoncloud-user`. ### Plans Shopify plans are monthly and billed by Shopify. Try-ons reset each billing period. See the Shopify tab on [pricing](/pricing#shopify). > **Note:** The Shopify app and the Developer API are separate products. Shopify try-ons are paid by your Shopify plan, never by Developer API credits. ### Connect your marketing tools - [Klaviyo](/docs/klaviyo): Try-On Lead events for flows and segments. - [Webhooks](/docs/webhook): signed lead events to any CRM. ### Custom Shopify builds Building a headless Shopify storefront instead of using a theme? The app's block needs a theme, so use the Developer API from your server: follow the [Shopify Hydrogen guide](/docs/shopify-hydrogen), or the [Next.js guide](/docs/nextjs) for a Next.js storefront. ### Shopify Hydrogen (headless) (https://www.tryoncloud.com/docs/shopify-hydrogen) Add virtual try-on to a **headless Shopify storefront** built with Hydrogen and hosted on Oxygen. It takes one server route and one product-page component, and the API key never reaches the browser. ### What "headless" means A normal Shopify store renders its pages with a **theme**. Our [Shopify app](/docs/shopify) adds the try-on button to that theme with no code. A **headless** store keeps Shopify for products, cart, checkout and payments, but the storefront shoppers see is a separate **React app** built by your developers. Hydrogen is Shopify's framework for that app and Oxygen is Shopify's hosting for it. Because there is no theme, theme app blocks do not appear, so a headless store adds try-on through the **Developer API** instead. | | Theme store | Headless (Hydrogen) store | |---|---|---| | Storefront | Shopify theme | Your React app on Oxygen | | How try-on is added | Install the Shopify app, add the block | One server route and one component | | Billing | Shopify plan, on your Shopify invoice | Developer API credits, prepaid | | Guide | [Shopify](/docs/shopify) | This page | ### How it works ```flow Shopper browser -> Your Hydrogen route: POST /api/try-on (photo + product image URL) Your Hydrogen route -> TryOnCloud API: POST /api/v1/generate (X-API-KEY) TryOnCloud API --> Your Hydrogen route: 200 image/png Your Hydrogen route --> Shopper browser: 200 image/png ``` 1. The shopper taps **Try it on** on a product page and takes or uploads a photo. 2. The browser sends the photo and the product's image URL to **your** Hydrogen route. 3. Your route calls TryOnCloud with your secret key and gets the finished image back, usually in about 20 seconds. 4. The shopper sees themselves wearing the product. Nothing is stored by TryOnCloud unless you turn result storage on. ### 1. Get an API key Sign up, open **Dashboard > API Keys** and create a key. It starts with `tk_dev_v1_` and is shown in full only once. Your account starts with free try-ons, and test mode (`?mock=true`) is always free. ### 2. Store the key in Oxygen In the Shopify admin open **Hydrogen > your storefront > Storefront settings > Environments and variables** and add a **secret** variable: ```bash TRYONCLOUD_API_KEY=tk_dev_v1_your_key_here ``` For local development, pull it into `.env` with `npx shopify hydrogen env pull`, or add it to `.env` by hand. Then add it to the `Env` type in `env.d.ts` so `context.env` is typed: ```ts interface Env extends HydrogenEnv { TRYONCLOUD_API_KEY: string } ``` ### 3. Add the server route Create `app/routes/api.try-on.tsx`. Hydrogen serves it at `/api/try-on`. The route only accepts product images from your own Shopify CDN, so nobody can use your key to try on random images. ```ts import type { Route } from "./+types/api.try-on" const MAX_PHOTO_BYTES = 15 * 1024 * 1024 export async function action({ request, context }: Route.ActionArgs) { if (request.method !== "POST") return new Response("Method not allowed", { status: 405 }) const incoming = await request.formData() const person = incoming.get("person") const garmentUrl = incoming.get("garmentUrl") // One id per try-on, made in the browser. A retry with the same id is never charged twice. const tryOnId = incoming.get("tryOnId") if (!(person instanceof Blob) || person.size === 0 || person.size > MAX_PHOTO_BYTES) { return Response.json({ error: "Please add a photo under 15MB." }, { status: 400 }) } // Only your own product images: blocks anyone using this route as a free try-on service. if (typeof garmentUrl !== "string" || !garmentUrl.startsWith("https://cdn.shopify.com/")) { return Response.json({ error: "Invalid product image." }, { status: 400 }) } const form = new FormData() form.append("person_image", person, "person.jpg") form.append("garment_url", garmentUrl) // Optional: your own shopper id (for example a hash of the Customer Account id), // so you can find this shopper's try-ons and erase them on request. // form.append("customer_id", shopperId) const headers: Record = { "X-API-KEY": context.env.TRYONCLOUD_API_KEY } if (typeof tryOnId === "string" && /^[\w-]{8,64}$/.test(tryOnId)) headers["Idempotency-Key"] = tryOnId const res = await fetch("https://www.tryoncloud.com/api/v1/generate", { method: "POST", headers, body: form, signal: AbortSignal.timeout(120_000), }) const requestId = res.headers.get("X-Request-Id") ?? "" if (!res.ok) { const { error, code } = await res.json() console.error("try-on failed", code, requestId) // quote requestId to TryOnCloud support return Response.json({ error, code }, { status: res.status }) } return new Response(res.body, { headers: { "Content-Type": "image/png", "Cache-Control": "no-store", "X-Request-Id": requestId }, }) } ``` On an older Remix-based Hydrogen project, import the types from `@shopify/remix-oxygen` instead: `import type { ActionFunctionArgs } from "@shopify/remix-oxygen"`, and type the action as `({ request, context }: ActionFunctionArgs)`. > **Note:** A try-on takes about 20 seconds. Keep the request open and do not add a shorter timeout in front of this route. Failed try-ons are refunded automatically. ### 4. Add the button to the product page Create `app/components/TryOnButton.tsx`: ```tsx import { useState } from "react" export function TryOnButton({ productImageUrl }: { productImageUrl: string }) { const [result, setResult] = useState(null) const [busy, setBusy] = useState(false) const [error, setError] = useState(null) async function onFile(file: File) { setBusy(true) setError(null) const form = new FormData() form.append("person", file) form.append("garmentUrl", productImageUrl) form.append("tryOnId", crypto.randomUUID()) // reuse the same id if you add a "Retry" button try { const res = await fetch("/api/try-on", { method: "POST", body: form }) if (!res.ok) throw new Error((await res.json()).error ?? "Try-on failed") setResult(URL.createObjectURL(await res.blob())) } catch (e) { setError(e instanceof Error ? e.message : "Try-on failed") } finally { setBusy(false) } } return (

Your photo is used only to create this image and is not stored.

{error &&

{error}

} {result && You wearing this product}
) } ``` Then render it in your product route, `app/routes/products.$handle.tsx`, with the image of the selected variant, falling back to the product's main image: ```tsx const garmentUrl = product.selectedOrFirstAvailableVariant?.image?.url ?? product.featuredImage?.url {garmentUrl && } ``` Make sure your product query requests `image { url }` on the variant and `featuredImage { url }` on the product. ### 5. Allow the result image in your CSP Hydrogen sends a strict Content Security Policy. The result is shown from a `blob:` URL, so add `blob:` to `imgSrc` in `app/entry.server.tsx`: ```ts const { nonce, header, NonceProvider } = createContentSecurityPolicy({ shop: { checkoutDomain: context.env.PUBLIC_CHECKOUT_DOMAIN, storeDomain: context.env.PUBLIC_STORE_DOMAIN }, imgSrc: ["'self'", "https://cdn.shopify.com", "data:", "blob:"], }) ``` No `connectSrc` change is needed: the browser only talks to your own `/api/try-on` route. ### 6. Test before going live 1. Point the route at test mode while you build: use `https://www.tryoncloud.com/api/v1/generate?mock=true`. It runs every check and returns the photo unchanged, with no credit used. 2. Try a few products: tops, dresses, sarees, kurta sets and bottoms. 3. Try a photo that is too large, and a non-image file, and check the error messages. 4. Remove `?mock=true` and run real try-ons. ### 7. Run it at retail scale Large catalogues and many stores need a little more than a button. All of this is built in: | Need | How | |---|---| | Separate staging and production | Create one key per environment on **API Keys**. Give the staging key a **monthly credit limit** and an **expiry date**, so tests can never spend production credits. | | Safe retries on mobile networks | Send an `Idempotency-Key` (the `tryOnId` above). A retry of the same try-on after a dropped connection is charged once, and the button is disabled while a try-on runs, so a double tap cannot start a second one. | | Support and audit | Every response carries `X-Request-Id`. Log it with your errors and quote it to us. | | Shopper privacy requests | Send `customer_id`, then erase that shopper's data with `DELETE /api/v1/customers/:id`. Shopper photos are never stored by default. | | Popular products | The garment analysis is cached for 30 days, so repeat try-ons of the same product photo are about 2 seconds faster. | | Catalogue imagery | Create on-model photos for many SKUs with `POST /api/v1/batches` (up to 500 per batch) and a signed webhook when each is ready. See [async jobs, batches and webhooks](/docs/async). | | Traffic peaks | 300 requests per minute per key and 600 per account. Before a big sale or festive launch, [tell us](/contact) so capacity is planned. | | Monitoring | Live success rate and speed at [/status](/status), usage per key in **Generations** (search, CSV export). | | Client generators | OpenAPI 3.1 spec at [/api/v1/openapi.json](/api/v1/openapi.json). | ### 8. Go-live checklist - `TRYONCLOUD_API_KEY` is a **secret** variable in the **production** Oxygen environment - The key appears nowhere in browser code or the page source - `?mock=true` removed from the route - `blob:` added to `imgSrc` - Product images come from `cdn.shopify.com` and show the garment clearly - Privacy line shown next to the button (photo used only for the try-on, not stored) - Credits topped up. We email the account owner automatically when the balance drops to 10% of the last purchase (at least 20 credits) - A production key separate from the staging key, each with the monthly credit limit you want - `Idempotency-Key` sent on every try-on, and `X-Request-Id` logged on errors ### Timeline A Hydrogen team usually needs **1 to 2 weeks** for a pilot: a day to add the key and test in mock mode, two or three days for the route and the product-page button, and the rest for QA on real products and a staged rollout. ### Stores too Have physical stores as well? The [in-store kiosk](/docs/kiosk) runs try-on on a screen or smart mirror, including shoppers holding a garment up to the camera. It uses the same account. ### Pricing Headless stores use **Developer API credits**: prepaid, never expire, and a failed try-on is never charged. See [pricing](/pricing#developer-api). For high volumes or a pilot across many stores, [contact us](/contact) for enterprise pricing. ### Related - [Generate a try-on](/docs/generate): every field and response - [Errors](/docs/errors) and [limits](/docs/limits) - [Async jobs, batches and webhooks](/docs/async) - [API status](/status) and the [OpenAPI spec](/api/v1/openapi.json) - [Data and privacy](/docs/data-privacy) and the [Data Processing Agreement](/dpa) ### React and Next.js (https://www.tryoncloud.com/docs/nextjs) Add try-on to a React or Next.js storefront. The browser sends the shopper's photo to **your** server route, and your route calls TryOnCloud with the API key. The key never reaches the browser. ```flow Browser -> Your Next.js route: POST /api/try-on (photo + product image URL) Your Next.js route -> TryOnCloud API: POST /api/v1/generate (X-API-KEY) TryOnCloud API --> Your Next.js route: 200 image/png Your Next.js route --> Browser: 200 image/png ``` ### 1. Add your key `.env.local`: ```bash TRYONCLOUD_API_KEY=tk_dev_v1_your_key_here ``` ### 2. Server route (App Router) `app/api/try-on/route.ts`: ```ts export const runtime = "nodejs" export const maxDuration = 120 export async function POST(req: Request) { const incoming = await req.formData() const person = incoming.get("person") const garmentUrl = incoming.get("garmentUrl") if (!(person instanceof Blob) || typeof garmentUrl !== "string") { return Response.json({ error: "person file and garmentUrl are required" }, { status: 400 }) } const form = new FormData() form.append("person_image", person, "person.jpg") form.append("garment_url", garmentUrl) const res = await fetch("https://www.tryoncloud.com/api/v1/generate", { method: "POST", headers: { "X-API-KEY": process.env.TRYONCLOUD_API_KEY! }, body: form, signal: AbortSignal.timeout(120_000), }) if (!res.ok) { const { error, code } = await res.json() return Response.json({ error, code }, { status: res.status }) } return new Response(await res.arrayBuffer(), { headers: { "Content-Type": "image/png" } }) } ``` On the Pages Router, put the same logic in `pages/api/try-on.ts` and disable the default body parser so the file upload passes through. ### 3. Try-on component ```tsx "use client" import { useState } from "react" export function TryOnButton({ productImageUrl }: { productImageUrl: string }) { const [result, setResult] = useState(null) const [busy, setBusy] = useState(false) const [error, setError] = useState(null) async function onFile(file: File) { setBusy(true) setError(null) const form = new FormData() form.append("person", file) form.append("garmentUrl", productImageUrl) const res = await fetch("/api/try-on", { method: "POST", body: form }) setBusy(false) if (!res.ok) return setError((await res.json()).error) setResult(URL.createObjectURL(await res.blob())) } return (
e.target.files?.[0] && onFile(e.target.files[0])} /> {busy &&

Creating your look, about 20 seconds...

} {error &&

{error}

} {result && You wearing this product}
) } ``` ### Tips - `productImageUrl` must be a public `https` URL (your CDN or Shopify CDN). - Show a progress message: a try-on takes about 20 seconds. - Use `?mock=true` on the API URL while you build; it is free. - Plain React (Vite, CRA) works the same; the server route lives in your backend instead. See [Node.js](/docs/nodejs). ### Node.js (https://www.tryoncloud.com/docs/nodejs) Any Node.js 18+ backend works: Express, Fastify, NestJS, Hono or plain `http`. Node 18+ has `fetch`, `FormData` and `Blob` built in, so no HTTP library is needed. ### Express ```js import express from "express" import multer from "multer" const app = express() const upload = multer({ limits: { fileSize: 15 * 1024 * 1024 } }) app.post("/try-on", upload.single("person"), async (req, res) => { const form = new FormData() form.append("person_image", new Blob([req.file.buffer]), "person.jpg") form.append("garment_url", req.body.garmentUrl) const r = await fetch("https://www.tryoncloud.com/api/v1/generate", { method: "POST", headers: { "X-API-KEY": process.env.TRYONCLOUD_API_KEY }, body: form, signal: AbortSignal.timeout(120_000), }) if (!r.ok) return res.status(r.status).json(await r.json()) res.type("png").send(Buffer.from(await r.arrayBuffer())) }) app.listen(3000) ``` ### With the SDK ```js import { TryOnCloud } from "./tryoncloud.mjs" const client = new TryOnCloud() const { image } = await client.generate({ garment: { url: "https://cdn.yourstore.com/shirt.jpg" }, person: { data: personBuffer }, }) ``` See [TypeScript SDK](/docs/sdk) and [Errors](/docs/errors) for retry handling. ### Python (https://www.tryoncloud.com/docs/python) Works with any Python backend. The examples use `requests`; `httpx` works the same way. ### Plain function ```python import os import requests API = "https://www.tryoncloud.com/api/v1/generate" def try_on(person_bytes: bytes, garment_url: str) -> bytes: r = requests.post( API, headers={"X-API-KEY": os.environ["TRYONCLOUD_API_KEY"]}, files={"person_image": ("person.jpg", person_bytes)}, data={"garment_url": garment_url}, timeout=120, ) if r.status_code != 200: err = r.json() raise RuntimeError(f"{err['code']}: {err['error']}") return r.content # the PNG ``` ### FastAPI ```python from fastapi import FastAPI, File, Form, UploadFile, HTTPException from fastapi.responses import Response app = FastAPI() @app.post("/try-on") async def try_on_endpoint(person: UploadFile = File(...), garment_url: str = Form(...)): try: png = try_on(await person.read(), garment_url) except RuntimeError as e: raise HTTPException(status_code=502, detail=str(e)) return Response(content=png, media_type="image/png") ``` ### Django ```python from django.http import HttpResponse, JsonResponse from django.views.decorators.http import require_POST @require_POST def try_on_view(request): person = request.FILES.get("person") garment_url = request.POST.get("garment_url") if not person or not garment_url: return JsonResponse({"error": "person and garment_url are required"}, status=400) try: png = try_on(person.read(), garment_url) except RuntimeError as e: return JsonResponse({"error": str(e)}, status=502) return HttpResponse(png, content_type="image/png") ``` Flask is the same: read `request.files["person"]`, call `try_on`, return the bytes with `mimetype="image/png"`. ### PHP and Laravel (https://www.tryoncloud.com/docs/php) ### Plain PHP (cURL) ```php true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 120, CURLOPT_HTTPHEADER => ["X-API-KEY: " . getenv("TRYONCLOUD_API_KEY")], CURLOPT_POSTFIELDS => [ "person_image" => new CURLFile($personPath), "garment_url" => $garmentUrl, ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($status !== 200) { $err = json_decode($body, true); throw new RuntimeException($err["code"] . ": " . $err["error"]); } return $body; // the PNG } ``` ### Laravel `.env`: ```bash TRYONCLOUD_API_KEY=tk_dev_v1_your_key_here ``` Controller: ```php use Illuminate\Http\Request; use Illuminate\Support\Facades\Http; class TryOnController extends Controller { public function store(Request $request) { $request->validate([ 'person' => 'required|image|max:15360', 'garment_url' => 'required|url', ]); $res = Http::withHeaders(['X-API-KEY' => env('TRYONCLOUD_API_KEY')]) ->timeout(120) ->attach('person_image', file_get_contents($request->file('person')->path()), 'person.jpg') ->post('https://www.tryoncloud.com/api/v1/generate', [ 'garment_url' => $request->input('garment_url'), ]); if ($res->failed()) { return response()->json($res->json(), $res->status()); } return response($res->body(), 200)->header('Content-Type', 'image/png'); } } ``` > **Tip:** In production, read the key with `config('services.tryoncloud.key')` rather than `env()`, so it still works with Laravel's config cache. ### Mobile apps (https://www.tryoncloud.com/docs/mobile) iOS, Android, Flutter and React Native apps call **your backend**, and your backend calls TryOnCloud. Never put the API key in the app: anyone can extract it from the app bundle. ```flow Mobile app -> Your backend: POST /try-on (photo + product image URL) Your backend -> TryOnCloud API: POST /api/v1/generate (X-API-KEY) TryOnCloud API --> Your backend: 200 image/png Your backend --> Mobile app: 200 image/png ``` Build the backend endpoint with [Node.js](/docs/nodejs), [Python](/docs/python) or [PHP](/docs/php). Then call it from the app: ### React Native ```js const form = new FormData() form.append("person", { uri: photo.uri, name: "person.jpg", type: "image/jpeg" }) form.append("garmentUrl", product.imageUrl) const res = await fetch("https://api.yourapp.com/try-on", { method: "POST", body: form }) // Show the result: save the PNG with expo-file-system or react-native-fs, then render it. ``` ### Flutter ```dart final req = http.MultipartRequest('POST', Uri.parse('https://api.yourapp.com/try-on')) ..files.add(await http.MultipartFile.fromPath('person', photo.path)) ..fields['garmentUrl'] = product.imageUrl; final res = await http.Response.fromStream(await req.send()); if (res.statusCode == 200) { setState(() => resultBytes = res.bodyBytes); // Image.memory(resultBytes!) } ``` ### Swift (iOS) ```swift var req = URLRequest(url: URL(string: "https://api.yourapp.com/try-on")!) req.httpMethod = "POST" req.timeoutInterval = 120 // Build a multipart body with "person" (JPEG data) and "garmentUrl", then: let (data, response) = try await URLSession.shared.upload(for: req, from: body) if (response as? HTTPURLResponse)?.statusCode == 200 { image = UIImage(data: data) } ``` ### Kotlin (Android) ```kotlin val body = MultipartBody.Builder().setType(MultipartBody.FORM) .addFormDataPart("person", "person.jpg", photoFile.asRequestBody("image/jpeg".toMediaType())) .addFormDataPart("garmentUrl", product.imageUrl) .build() val request = Request.Builder().url("https://api.yourapp.com/try-on").post(body).build() client.newCall(request).execute().use { res -> if (res.isSuccessful) bitmap = BitmapFactory.decodeStream(res.body!!.byteStream()) } ``` Set the HTTP timeout to at least 120 seconds; a try-on takes about 20 seconds. On unreliable mobile networks, have your backend send an `Idempotency-Key` per try-on so a retry is never charged twice, or use an [async job](/docs/async) and notify the app (for example with a push notification) when the `generation.completed` webhook arrives. ### In-store kiosk (https://www.tryoncloud.com/docs/kiosk) Put AI try-on on a screen or smart mirror in a physical store. **No code**: the kiosk app runs in a browser. ### Hardware | Item | What you need | |---|---| | Screen | Any touchscreen PC, all-in-one, tablet, large display or smart mirror. Portrait looks most like a mirror | | Camera | A webcam or built-in camera that sees the shopper head to toe, about 2 to 3 metres away | | Computer | Windows with a current browser is the most common. The AI runs in our cloud, so a modest machine is enough | | Internet | Stable Wi-Fi or a wired connection | ### Set up 1. Open the kiosk app on the screen and install it like an app. 2. Pair it with your store using your **Store ID and PIN** from the dashboard. 3. Your Shopify catalogue syncs automatically, or use instant capture (below). 4. You can be live the same day. ### Features - **Catalogue try-on:** shoppers pick a product on the screen. - **Instant capture:** a shopper or staff member holds any physical garment up to the camera and tries it on, with no catalogue entry needed. - **Photo from phone:** shoppers can send a photo from their own phone by QR code. - **Result to phone:** the finished look goes to the shopper's phone by QR code. No app install. - **Privacy reset:** the previous shopper's session clears automatically after a few minutes of inactivity. - **Quality check:** every result is checked automatically before the shopper sees it. - **Pay and TryOn (optional):** charge shoppers per try-on with a single-use UPI QR (GPay, PhonePe, Paytm). You set the price from ₹1 to ₹1,000. ### Pricing Kiosk try-ons are metered on the store's plan. For multi-store rollouts, [contact us](/contact) for a quote. More details on the [kiosk page](/virtual-try-on-kiosk). ### Klaviyo (https://www.tryoncloud.com/docs/klaviyo) Send try-on leads from the TryOnCloud Shopify app to Klaviyo, then build flows and segments on them. > **Note:** This is a feature of the Shopify app. It is not part of the Developer API. ### Connect 1. Open the TryOnCloud app in your Shopify admin. 2. Go to **Leads > Integrations** and click **Connect** on the Klaviyo row. 3. Approve access in Klaviyo. That is it: no API keys to copy. The connection uses OAuth with PKCE and minimal permissions. Tokens are encrypted, and delivery retries automatically if Klaviyo is briefly unavailable. ### What is sent When a shopper leaves their email after a try-on, TryOnCloud records a **Try-On Lead** event on that shopper's Klaviyo profile: | Property | Example | |---|---| | `Source` | `TryOnCloud Virtual Try-On` | | `ProductNames` | `["Floral Wrap Dress"]` | | `ProductURLs` | Product page URL | | `ProductImages` | Product image URL | | `Items` | Name, product ID, URL, image and price | | `ConsentedAt` | When the shopper gave their email | The event is consent-safe: TryOnCloud does not subscribe shoppers to any list. Your own Klaviyo consent settings decide who receives marketing. ### Flow ideas - **Abandoned try-on:** 24 hours after a Try-On Lead with no order, send the product they tried. - **Segment:** everyone who tried a product in a collection, for a launch email. ### Webhooks to any CRM (https://www.tryoncloud.com/docs/webhook) Send try-on leads from the TryOnCloud Shopify app to any URL: HubSpot, Zoho, Mailchimp, Brevo, ActiveCampaign, Salesforce, Zapier, Make, n8n or your own server. > **Note:** This page is about **lead** webhooks from the Shopify app. For **Developer API** webhooks when an async try-on or batch finishes, see [Async jobs, batches and webhooks](/docs/async#webhooks). ### Connect 1. Open the TryOnCloud app in your Shopify admin. 2. Go to **Leads > Integrations** and click **Connect** on the Webhook row. 3. Paste your `https` endpoint URL and copy the signing secret. ### Event TryOnCloud sends `POST` with a JSON body when a shopper leaves their email after a try-on: ```json { "event": "lead_captured", "shop": "yourstore.myshopify.com", "created_at": "2026-11-14T10:30:00.000Z", "data": { "email": "shopper@example.com", "customer_id": null, "product_id": "8812345678901", "product_title": "Floral Wrap Dress", "result_url": "https://www.tryoncloud.com/api/result/...", "product_url": "https://yourstore.com/products/floral-wrap-dress", "tagged_shopify": true } } ``` ### Headers | Header | Meaning | |---|---| | `x-tryoncloud-event` | `lead_captured` | | `x-tryoncloud-shop` | Your shop domain | | `x-tryoncloud-delivery-id` | Unique per delivery. Use it to ignore duplicates | | `x-tryoncloud-timestamp` | Unix seconds when sent | | `x-tryoncloud-signature-v2` | `sha256=` + HMAC-SHA256 of `.` with your secret. Verify this one | | `x-tryoncloud-signature` | `sha256=` + HMAC-SHA256 of the raw body only. Still sent so existing integrations keep working | ### Verify the signature Always verify before trusting the data. Use the **raw** request body, not re-serialised JSON. Verify `x-tryoncloud-signature-v2`: it signs the timestamp too, so you can reject deliveries older than 5 minutes and a captured request cannot be replayed later. Each retry is signed again with its own timestamp. ```js import crypto from "node:crypto" function verify(rawBody, headers, secret) { const ts = headers["x-tryoncloud-timestamp"] const sig = headers["x-tryoncloud-signature-v2"] if (typeof ts !== "string" || typeof sig !== "string") return false if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false // too old: possible replay const expected = "sha256=" + crypto.createHmac("sha256", secret).update(`${ts}.${rawBody}`, "utf8").digest("hex") const a = Buffer.from(expected) const b = Buffer.from(sig) return a.length === b.length && crypto.timingSafeEqual(a, b) } ``` ```python import hmac, hashlib, time def verify(raw_body: bytes, headers, secret: str) -> bool: ts = headers.get("x-tryoncloud-timestamp") sig = headers.get("x-tryoncloud-signature-v2") if not ts or not sig or not ts.isdigit(): return False if abs(time.time() - int(ts)) > 300: # too old: possible replay return False expected = "sha256=" + hmac.new(secret.encode(), ts.encode() + b"." + raw_body, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, sig) ``` ### Delivery - Your endpoint must be `https` and should respond `2xx` within 8 seconds. - Failed deliveries retry after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 24 hours. - Deliveries can arrive more than once. Deduplicate on `x-tryoncloud-delivery-id`. - Redirects are not followed. ### AI coding assistants (https://www.tryoncloud.com/docs/ai-assistants) Let Claude Code, Codex or Cursor write the integration for you. Two ways: 1. **Give it the docs.** Every page has a Markdown version (add `.md` to the URL, or use **Copy page** at the top). The whole reference is also at [/llms-full.txt](/llms-full.txt). 2. **Connect the MCP server** so the assistant can read these docs and run real try-ons while it builds. See [MCP server](/docs/mcp). ### Where to put the instructions | Assistant | Put the contract below in | |---|---| | Claude Code | `CLAUDE.md` in your project root | | Codex | `AGENTS.md` in your project root | | Cursor | `.cursor/rules/tryoncloud.mdc`, or paste into the chat | | Any other | Paste into the chat | Then ask: "Add TryOnCloud virtual try-on using the contract in CLAUDE.md" (or AGENTS.md). Keep your key in an environment variable such as `TRYONCLOUD_API_KEY`, never in the file. ### The contract ```text You are integrating the TryOnCloud Developer API into my app. ENDPOINT POST https://www.tryoncloud.com/api/v1/generate Test mode (free, nothing generated or stored): add ?mock=true AUTH Header X-API-KEY, read from env TRYONCLOUD_API_KEY (starts with tk_dev_v1_) REQUEST: multipart/form-data OR JSON. Two images required: garment_image (file) OR garment_url (public https URL) OR garment_base64 person_image (file) OR person_base64 JPEG, PNG, WebP or HEIC, up to 15MB each. Optional: customer_id (my own end-user id, max 128 chars). Optional header: Idempotency-Key (a new UUID per try-on; reuse it only when retrying that same try-on, so it is never charged twice). RESPONSE 200 -> the response BODY IS the finished try-on image (image/png). Read it as bytes, do NOT JSON.parse it. Store it yourself. Headers: X-Request-Id (log it), X-Credit-Was-Free, X-Result-Id (only if result storage is enabled), X-Mock: 1 in test mode. non-200 -> JSON { "error": string, "code": string }: 401 NO_KEY, INVALID_KEY | 400 BAD_INPUT, NO_PERSON, NO_GARMENT 402 NO_CREDITS, QUOTA_EXCEEDED, FREE_TRIAL_USED, KEY_LIMIT_REACHED 403 DEVICE_BANNED | 409 IDEMPOTENCY_IN_PROGRESS, IDEMPOTENCY_REPLAY, IDEMPOTENCY_MISMATCH (not charged) 413 IMAGE_TOO_LARGE | 422 CONTENT_FILTERED (refunded) 429 RATE_LIMITED (wait Retry-After) | 500 GENERATION_FAILED (refunded) OTHER ENDPOINTS GET https://www.tryoncloud.com/api/v1/credits -> { credits_remaining, ... } DELETE https://www.tryoncloud.com/api/v1/results/ -> 204 Async (only if I ask for it): POST /api/v1/generations -> 202 job; GET /api/v1/generations/; POST /api/v1/batches (<= 500 URL items); signed webhooks generation.completed / generation.failed / batch.completed (verify x-tryoncloud-signature-v2 = HMAC-SHA256 of "."). Spec: https://www.tryoncloud.com/api/v1/openapi.json RULES - Call from my server only, never the browser; never expose the key. - Client timeout 120 seconds; a typical result takes about 20 seconds. - Build and test with ?mock=true first, then remove it. - Retry 500 once and 429 after Retry-After. Never loop on 402. - Only send photos of adults who agreed to the try-on. Write production code for [MY STACK] that uploads two images, calls this endpoint, handles every error code above, and saves/returns the PNG. ``` Replace `[MY STACK]` with yours, for example "a Next.js route handler", "Laravel", "Django" or "Express". ### MCP server (https://www.tryoncloud.com/docs/mcp) Connect AI assistants (Claude Code, Cursor, VS Code and any client that supports remote MCP) to TryOnCloud. The assistant can read these docs, check your credits and run real try-ons while it builds your integration. | | | |---|---| | URL | `https://www.tryoncloud.com/api/mcp` | | Transport | Streamable HTTP | | Auth | `X-API-KEY: tk_dev_v1_...` header (or `Authorization: Bearer tk_dev_v1_...`) | ### Tools | Tool | What it does | Cost | |---|---|---| | `search_docs` | Searches these docs and returns the best-matching pages | Free | | `read_doc` | Returns one docs page as Markdown | Free | | `check_credits` | Your remaining try-ons | Free | | `generate_tryon` | Runs a try-on from a garment URL and a person image URL, returns the image | 1 credit (free with `mock: true`) | > **Note:** `generate_tryon` through MCP needs purchased credits (or `mock: true`). The free allowance is for direct API calls. ### Connect #### Claude Code ```bash claude mcp add --transport http tryoncloud https://www.tryoncloud.com/api/mcp \ --header "X-API-KEY: tk_dev_v1_your_key_here" ``` #### Cursor `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project): ```json { "mcpServers": { "tryoncloud": { "url": "https://www.tryoncloud.com/api/mcp", "headers": { "X-API-KEY": "tk_dev_v1_your_key_here" } } } } ``` #### VS Code `.vscode/mcp.json`. VS Code asks for the key once and stores it securely: ```json { "inputs": [ { "type": "promptString", "id": "tryoncloud-key", "description": "TryOnCloud API key", "password": true } ], "servers": { "tryoncloud": { "type": "http", "url": "https://www.tryoncloud.com/api/mcp", "headers": { "X-API-KEY": "${input:tryoncloud-key}" } } } } ``` > **Warning:** Your API key can spend credits. Do not commit a config file that contains it; use the VS Code input prompt or a local, git-ignored file. ### Try it Once connected, ask your assistant: - "Search the TryOnCloud docs for how errors are handled." - "How many TryOnCloud credits do I have left?" - "Run a TryOnCloud try-on in mock mode with this garment URL and this person URL." ### Generate a try-on (https://www.tryoncloud.com/docs/generate) `POST https://www.tryoncloud.com/api/v1/generate` Send a garment and a person, get the finished try-on back as the response body. One request, one image, no polling. ### Headers | Header | Value | |---|---| | `X-API-KEY` | Your key, `tk_dev_v1_...` (required) | | `X-Mock` | `true` for free test mode (optional, same as `?mock=true`) | | `Idempotency-Key` | Optional. Your own unique value per try-on (1 to 255 printable characters). A retry with the same key is never charged twice. See [Retries and idempotency](#retries-and-idempotency) | ### Body Send `multipart/form-data` **or** `application/json`. Two images are required. | Field | Type | Description | |---|---|---| | `garment_image` | file | The garment photo. Or use `garment_url` or `garment_base64` | | `garment_url` | string | A public `https` image URL. We download it server-side | | `garment_base64` | string | Base64 image, with or without a `data:` prefix | | `person_image` | file | The shopper's photo. Or use `person_base64` | | `person_base64` | string | Base64 image, with or without a `data:` prefix | | `customer_id` | string | Optional. Your own id for the end user, up to 128 characters. Search it in the dashboard, and erase their data with [Delete a customer's data](/docs/async#delete-a-customers-data) | Images must be JPEG, PNG, WebP or HEIC, up to 15MB each. The file contents are checked, not just the name or declared type. #### Query parameters | Parameter | Description | |---|---| | `mock=true` | Test mode: validates everything, generates nothing, charges nothing, stores nothing. Returns the person image unchanged | ### Response **200 OK.** The body **is** the finished image, `Content-Type: image/png`, about 1 megapixel (the "1K" class). Read it as bytes; do not parse it as JSON. | Response header | Meaning | |---|---| | `X-Request-Id` | Unique id of this request, on every response including errors. Quote it to support | | `X-RateLimit-Limit` / `X-RateLimit-Remaining` | Your per-minute limit and what is left in the current minute | | `X-Credit-Was-Free` | `1` if this try-on used your free allowance, `0` if it used purchased credits | | `X-Result-Id` | Only when result storage is enabled on your account. Use it with [Delete a result](/docs/delete-result) | | `X-Mock` | `1` on test-mode responses | | `X-Costume` | Only for accounts with costume mode enabled | Errors return JSON `{ "error": "...", "code": "..." }`. See [Errors](/docs/errors). ### Retries and idempotency Networks drop connections. To retry safely, send an `Idempotency-Key` header with a value you generate per try-on (for example a UUID) and reuse it only for retries of that same try-on. Keys are kept for 24 hours per API key. | What happens | Response | |---|---| | First request | Runs normally | | Retry while the first is still running | `409 IDEMPOTENCY_IN_PROGRESS` with `Retry-After`, nothing charged | | Retry after it succeeded | `409 IDEMPOTENCY_REPLAY`, nothing charged. The image was in the first response; with result storage on, `result_id` identifies it | | Retry after it failed | Runs again (the failed attempt was refunded) | | Same key, different images | `409 IDEMPOTENCY_MISMATCH` | Without the header, every request is a new try-on. ### Examples #### multipart (files) ```bash curl -X POST https://www.tryoncloud.com/api/v1/generate \ -H "X-API-KEY: $TRYONCLOUD_API_KEY" \ -F "garment_image=@shirt.jpg" \ -F "person_image=@person.jpg" \ -o result.png ``` #### JSON (garment URL + person base64) ```bash curl -X POST https://www.tryoncloud.com/api/v1/generate \ -H "X-API-KEY: $TRYONCLOUD_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"garment_url\":\"https://cdn.yourstore.com/shirt.jpg\",\"person_base64\":\"$(base64 -w0 person.jpg)\"}" \ -o result.png ``` #### Node.js 18+ ```js import { readFile, writeFile } from "node:fs/promises" const form = new FormData() form.append("garment_image", new Blob([await readFile("shirt.jpg")]), "shirt.jpg") form.append("person_image", new Blob([await readFile("person.jpg")]), "person.jpg") const res = await fetch("https://www.tryoncloud.com/api/v1/generate", { method: "POST", headers: { "X-API-KEY": process.env.TRYONCLOUD_API_KEY }, body: form, signal: AbortSignal.timeout(120_000), }) if (!res.ok) { const { error, code } = await res.json() throw new Error(`${code}: ${error}`) } await writeFile("result.png", Buffer.from(await res.arrayBuffer())) ``` ### Billing - If the API key has a monthly credit limit and it is reached, the request is refused with `402 KEY_LIMIT_REACHED` until the 1st (UTC). Set limits when you create a key on the **API Keys** page. - One successful try-on uses **one credit**. - Failed generations (`422`, `500`) are refunded automatically. - Test mode is always free. - Accounts that have bought credits spend purchased credits. Accounts that have not spend the free allowance. ### Async jobs, batches and webhooks (https://www.tryoncloud.com/docs/async) `POST /generate` is the simplest way to run a try-on: one request, the image comes back. Use async jobs when you do not want to hold a connection open, and batches for catalogue work. Both use the same engine, cost the same, and refund every try-on that fails. | | Sync `POST /generate` | Async `POST /generations` | `POST /batches` | |---|---|---|---| | Response | The PNG, in the same request | `202` with a job id | `202` with a batch id | | Inputs | Files, base64 or `garment_url` | Files, base64 or URLs | `garment_url` and `person_url` per item | | Result | Response body | `GET /results/:id`, kept 7 days | Same, per item | | Notification | None needed | Poll, or webhook | Webhook per item, plus `batch.completed` | | Credits | Free allowance or purchased | Purchased | Purchased, all items taken up front | | Test mode | `?mock=true` | `?mock=true` | `?mock=true` | ### Start an async job `POST https://www.tryoncloud.com/api/v1/generations` Same headers and image fields as [Generate](/docs/generate), plus: | Field | Description | |---|---| | `person_url` | Public `https` URL of the shopper photo (alternative to a file or base64) | | `customer_id` | Your id for the end user, up to 128 characters. Used by [customer deletion](#delete-a-customers-data) | | `metadata` | A JSON object up to 2KB, returned unchanged on the job and in webhooks | | `webhook_url` | Public `https` URL to receive `generation.completed` or `generation.failed` | ```bash curl -X POST https://www.tryoncloud.com/api/v1/generations \ -H "X-API-KEY: $TRYONCLOUD_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -F "garment_image=@shirt.jpg" \ -F "person_image=@person.jpg" \ -F "customer_id=shopper_123" \ -F "webhook_url=https://example.com/hooks/tryoncloud" ``` **202 Accepted** ```json { "id": "6f0e3c1a-0d6a-4f7e-9a7b-2b2a1d3c4e5f", "object": "generation", "status": "queued", "mock": false, "batch_id": null, "customer_id": "shopper_123", "metadata": null, "result_id": null, "result_url": null, "error": null, "created_at": "2026-11-18T10:00:00.000Z", "completed_at": null } ``` The job starts as soon as the response is sent. Your images are processed in memory and never stored; only the finished result is kept, for 7 days. ### Check a job `GET https://www.tryoncloud.com/api/v1/generations/:id` `status` moves `queued` → `processing` → `completed` or `failed`. A completed job has `result_url`; download it with your key: ```bash curl https://www.tryoncloud.com/api/v1/results/RESULT_ID -H "X-API-KEY: $TRYONCLOUD_API_KEY" -o result.png ``` A failed job has `error.code`: `CONTENT_FILTERED`, `GENERATION_FAILED` or `INPUT_FETCH_FAILED`. The credit is refunded in every case. ### Batches `POST https://www.tryoncloud.com/api/v1/batches` with a JSON body of up to 500 items: ```json { "items": [ { "garment_url": "https://cdn.example.com/kurta-1.jpg", "person_url": "https://cdn.example.com/model-a.jpg", "customer_id": "sku-1001" }, { "garment_url": "https://cdn.example.com/saree-7.jpg", "person_url": "https://cdn.example.com/model-b.jpg" } ], "webhook_url": "https://example.com/hooks/tryoncloud" } ``` - One credit per item is taken when the batch is created. If your balance is too low, nothing is created (`402 NO_CREDITS`). - `GET /batches/:id` returns counts and every item. - `DELETE /batches/:id` cancels items that have not started and refunds them. Running items finish. - Each item sends its own webhook, and the batch sends `batch.completed` once every item has an outcome. ### Webhooks We `POST` JSON to your `webhook_url`: ```json { "event": "generation.completed", "created_at": "2026-11-18T10:00:21.000Z", "data": { "id": "6f0e3c1a-...", "object": "generation", "status": "completed", "result_url": "https://www.tryoncloud.com/api/v1/results/...", "customer_id": "shopper_123", "metadata": null } } ``` Events: `generation.completed`, `generation.failed`, `batch.completed`, and `webhook.test` from the dashboard. Headers: `x-tryoncloud-event`, `x-tryoncloud-delivery-id` (dedupe on this), `x-tryoncloud-timestamp` and `x-tryoncloud-signature-v2`. **Account endpoint.** Instead of sending `webhook_url` with every request, save one endpoint on the dashboard (**API Keys > Webhooks**) and pick which events it receives. A request's own `webhook_url` always wins. **Send test event** posts a signed `webhook.test` event to the saved endpoint. **Verify every delivery.** Your signing secret is on the same card (reveal, copy or rotate it). The signature is HMAC-SHA256 of `.`: ```js import crypto from "node:crypto" export function verifyTryOnCloud(rawBody, headers, secret) { const ts = headers["x-tryoncloud-timestamp"] const sig = (headers["x-tryoncloud-signature-v2"] || "").replace("sha256=", "") if (!ts || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false // reject old deliveries const expected = crypto.createHmac("sha256", secret).update(`${ts}.${rawBody}`).digest("hex") return sig.length === expected.length && crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected)) } ``` Reply with any `2xx` within 8 seconds. Other responses and timeouts are retried with backoff (1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 24 hours). Webhook URLs must be public `https` on the standard port; private and internal addresses are refused, both when you save the URL and when we send, and redirects are not followed. ### Delete a customer's data `DELETE https://www.tryoncloud.com/api/v1/customers/:customer_id` Deletes every stored result for that `customer_id` on your account and clears the id from your records. Use it when an end user asks to be forgotten (GDPR, DPDP). ```json { "object": "customer_deletion", "customer_id": "shopper_123", "results_deleted": 3, "records_cleared": 4 } ``` ### Limits | | | |---|---| | Creating jobs and batches | Counts toward the 300 requests per minute per key limit | | Async jobs running at once | 50 per account (`429 TOO_MANY_JOBS`); batches are separate | | Batch size | 500 items | | Results | Kept 7 days | | Metadata | JSON object, 2KB | ### Check credits (https://www.tryoncloud.com/docs/credits) `GET https://www.tryoncloud.com/api/v1/credits` Returns how many try-ons your account can still run, from the same pool `POST /generate` spends from. ### Request ```bash curl https://www.tryoncloud.com/api/v1/credits -H "X-API-KEY: $TRYONCLOUD_API_KEY" ``` ### Response ```json { "credits_remaining": 4870, "purchased_remaining": 4870, "purchased_total": 5000, "free_remaining": 0, "spends_from": "purchased" } ``` | Field | Meaning | |---|---| | `credits_remaining` | Try-ons you can run right now. Use this one | | `purchased_remaining` | Purchased credits left (they never expire) | | `purchased_total` | All credits ever purchased | | `free_remaining` | Free allowance left (only used before your first purchase) | | `spends_from` | `purchased` once you have bought credits, otherwise `free_allowance` | ### Tips - Check before a big batch, and alert yourself when `credits_remaining` drops below a few days of usage. - Rate limit: 60 requests per minute per key. Do not call it before every try-on; a `402` from `/generate` already tells you when you have run out. - [Buy credits](/pricing#developer-api) from the dashboard Billing page. ### Errors | HTTP | code | Meaning | |---|---|---| | 401 | `NO_KEY`, `INVALID_KEY` | Missing or wrong key | | 429 | `RATE_LIMITED` | Over 60 requests per minute | | 500 | `CREDITS_UNAVAILABLE` | Temporary problem, retry | ### Delete a result (https://www.tryoncloud.com/docs/delete-result) `DELETE https://www.tryoncloud.com/api/v1/results/:id` Permanently deletes one stored result before its automatic 7-day deletion. To download a stored result instead, `GET` the same URL with your key. > **Note:** `POST /generate` stores nothing unless result storage is enabled on your account. Async jobs and batches always keep their result for 7 days, so you can download it. To erase everything for one end user at once, use [`DELETE /customers/:id`](/docs/async#delete-a-customers-data). `:id` is the `X-Result-Id` header from the [generate](/docs/generate) response, or `result_id` on an [async job](/docs/async). Use it to honour an end user's request to erase their data. ### Request ```bash curl -X DELETE https://www.tryoncloud.com/api/v1/results/RESULT_ID \ -H "X-API-KEY: $TRYONCLOUD_API_KEY" ``` ### Responses | HTTP | code | Meaning | |---|---|---| | 204 | | Deleted. The image and its link no longer work | | 404 | `NOT_FOUND` | No stored result with that id on your account | | 401 | `NO_KEY`, `INVALID_KEY` | Missing or wrong key | | 429 | `RATE_LIMITED` | Over 120 deletes per minute | | 500 | `DELETE_FAILED` | Storage did not confirm the delete. Retry | Another account's result id returns the same `404`, so ids cannot be probed. ### Errors (https://www.tryoncloud.com/docs/errors) Every error is JSON with a human-readable `error` and a stable `code`. Branch on `code`, not on the message. ```json { "error": "No credits left. Top up your developer wallet to continue.", "code": "NO_CREDITS" } ``` ### Generate errors | HTTP | code | What happened | Retry? | |---|---|---|---| | 400 | `BAD_INPUT` | The body could not be read | No, fix the request | | 400 | `NO_PERSON` | Person image missing, unreadable or not a supported format | No, send a valid image | | 400 | `NO_GARMENT` | Garment image missing, unreadable, or `garment_url` blocked | No, send a valid image or public https URL | | 401 | `NO_KEY` | No `X-API-KEY` header | No | | 401 | `INVALID_KEY` | Key wrong or revoked | No, check the key in the dashboard | | 402 | `NO_CREDITS` | Purchased credits used up | No, [buy credits](/pricing#developer-api) | | 402 | `QUOTA_EXCEEDED` | Free allowance used up | No, buy credits | | 402 | `KEY_LIMIT_REACHED` | This API key reached its monthly credit limit. The body includes `used` and `limit` | No, wait for the 1st (UTC) or use a key with a higher limit | | 402 | `FREE_TRIAL_USED` | The free trial was already used on this device | No, buy credits | | 403 | `DEVICE_BANNED` | This device is blocked for abuse | No, contact support | | 400 | `BAD_IDEMPOTENCY_KEY` | `Idempotency-Key` is empty, too long or has spaces | No, fix the header | | 409 | `IDEMPOTENCY_IN_PROGRESS` | A request with this key is still running. Nothing charged | Yes, after `Retry-After` | | 409 | `IDEMPOTENCY_REPLAY` | This key already succeeded. Nothing charged | No, the first response had the image | | 409 | `IDEMPOTENCY_MISMATCH` | This key was used with different images | No, use a new key | | 413 | `IMAGE_TOO_LARGE` | An image is over 15MB | No, downscale first | | 422 | `CONTENT_FILTERED` | Blocked by content moderation. Credit refunded | No, use different images | | 429 | `RATE_LIMITED` | Too many requests | Yes, after `Retry-After` seconds | | 500 | `GENERATION_FAILED` | The engine failed. Credit refunded | Yes, once | ### Async jobs and batches | HTTP | code | What happened | Retry? | |---|---|---|---| | 400 | `BAD_WEBHOOK_URL` | `webhook_url` is not a public `https` URL | No, fix the URL | | 400 | `BATCH_TOO_LARGE` | More than 500 items, or more than 10 in test mode | No, split the batch | | 402 | `ASYNC_NEEDS_CREDITS` | Async jobs and batches use purchased credits | No, buy credits or use `POST /generate` | | 429 | `TOO_MANY_JOBS` | 50 async jobs already running on the account | Yes, after `Retry-After` | | 500 | `JOB_CREATE_FAILED`, `BATCH_CREATE_FAILED` | Could not create it. Credits refunded | Yes | A job that fails after it was accepted reports `error.code` on the job and in the `generation.failed` webhook: `CONTENT_FILTERED`, `GENERATION_FAILED` or `INPUT_FETCH_FAILED` (an image URL could not be downloaded). Its credit is refunded. Cancelled batch items show `CANCELLED`. ### Other endpoints | Endpoint | HTTP | code | Retry? | |---|---|---|---| | `GET /credits` | 500 | `CREDITS_UNAVAILABLE` | Yes | | `GET /results/:id` | 404 | `NOT_FOUND` (unknown, not yours, or older than 7 days) | No | | `DELETE /customers/:id` | 500 | `DELETE_FAILED` (nothing was cleared) | Yes | | `DELETE /results/:id` | 404 | `NOT_FOUND` | No | | `DELETE /results/:id` | 500 | `DELETE_FAILED` | Yes | ### Recommended handling ```js async function tryOn(form) { for (let attempt = 1; attempt <= 2; attempt++) { const res = await fetch("https://www.tryoncloud.com/api/v1/generate", { method: "POST", headers: { "X-API-KEY": process.env.TRYONCLOUD_API_KEY }, body: form, signal: AbortSignal.timeout(120_000), }) if (res.ok) return Buffer.from(await res.arrayBuffer()) const { code, error } = await res.json() if (code === "RATE_LIMITED") { await new Promise((r) => setTimeout(r, Number(res.headers.get("Retry-After") || 5) * 1000)) continue } if (code === "GENERATION_FAILED" && attempt === 1) continue // refunded, retry once throw new Error(`${code}: ${error}`) // 4xx: fix input or buy credits, do not loop } throw new Error("GENERATION_FAILED twice") } ``` > **Warning:** Never retry a `402` in a loop. It means the account is out of credits. ### Limits (https://www.tryoncloud.com/docs/limits) ### Rate limits | Endpoint | Limit | When exceeded | |---|---|---| | `POST /generate` | 300 requests per minute per API key, 600 per minute per account | `429 RATE_LIMITED` with `Retry-After` | | Test mode (`mock=true`) | 30 requests per minute and 500 per day per account | `429 RATE_LIMITED` with `Retry-After` | | `GET /credits` | 60 requests per minute per API key | `429 RATE_LIMITED` | | MCP tool calls | 60 per minute per API key | Error result | | `DELETE /results/:id`, `DELETE /customers/:id`, `DELETE /batches/:id` | 120 requests per minute per API key | `429 RATE_LIMITED` | | `GET /results/:id`, `GET /generations/:id`, `GET /batches/:id` | 300 requests per minute per API key | `429 RATE_LIMITED` | | `POST /generations`, `POST /batches` | Count toward the 300 per minute generate limit | `429 RATE_LIMITED` | | Async jobs running at once | 50 per account (batches are separate) | `429 TOO_MANY_JOBS` | The generate limit is a safety backstop against leaked keys and runaway loops. Real integrations do not reach it. For very high sustained volume, [contact us](/contact) before launch so capacity is planned. ### Images | Limit | Value | |---|---| | Formats | JPEG, PNG, WebP, HEIC (checked by content, not file name) | | Maximum size | 15MB per image | | `garment_url` | Public `https` URL on port 443 or 80. Internal, private and cloud-metadata addresses are blocked, including through redirects | | Output | One PNG per request, about 1 megapixel (the "1K" class), shaped to the person photo. Higher resolutions are not offered yet | ### Time | | | |---|---| | Typical generation | Median about 19 seconds, 90% within about 24 seconds (last 30 days of production traffic) | | Maximum request time | 120 seconds. Set your client timeout to 120 seconds | | Repeated garments | The garment analysis is cached for 30 days, so a repeat try-on of the same garment photo skips about 2 seconds of preparation | ### Credits | | | |---|---| | Purchase | Any amount from 50 to 100,000 per order | | Expiry | Never | | Failed try-ons | Refunded automatically | | Per-key monthly limit | Optional, set when you create the key. Counts this calendar month (UTC); past it the key gets `402 KEY_LIMIT_REACHED` until the 1st | | Key expiry | Optional date; the key stops working after that day (UTC) | ### Async jobs and batches | | | |---|---| | Batch size | Up to 500 items (10 in test mode) | | Results | Kept 7 days, then deleted | | Webhook reply | Answer `2xx` within 8 seconds; other replies are retried for up to a day | | Webhook URLs | Public `https` on the standard port; redirects are not followed | | Test webhook | Up to 5 per minute from the dashboard | ### Data and privacy (https://www.tryoncloud.com/docs/data-privacy) ### What happens to each piece of data | Data | What happens | |---|---| | Person photo | Processed in memory to generate the result. Never written to our storage | | Garment image | Processed in memory with the person photo. Never written to our storage | | Result image (`POST /generate`) | Returned to you in the response. Not stored, unless you ask us to enable result storage | | Request record | Time, outcome, error code and credit used, for billing and your usage page. No images | | Async job and batch results | Stored for 7 days so you can download them, then deleted. Delete earlier per result, or per end user with `DELETE /customers/:id` | | Async inputs | Uploaded images stay in memory only. For batches and URL inputs we keep the image URLs you sent until the job finishes | | Garment analysis | A short text description of the garment and a crop position, kept 30 days so repeat try-ons of the same product photo are faster. No image and nothing about the shopper | | Test mode | Nothing generated, nothing stored | Our AI infrastructure provider, Google Cloud, keeps request data for up to 55 days only to detect abuse of its service, and does not use it to train models. ### You store the results The finished image is in the response body, so you save it wherever you like: your own server, S3, Google Cloud Storage or anything else. You decide how long your customers' images are kept. ### Optional result storage If you want us to keep a copy (for example so our support team can look at a result you report), we can enable result storage on your account: - Stored results are deleted automatically after 7 days. - Each response carries an `X-Result-Id` header. - You can delete any stored result earlier with [DELETE /results/:id](/docs/delete-result). Only enable it if your own privacy notice covers it. ### Your role under GDPR and the DPDP Act For images you send through the API, **you are the controller** (Data Fiduciary under India's DPDP Act) and **TryOnCloud is your processor**. That means you must: - tell your users about the try-on and have a lawful basis, usually their consent - never send photos of children, or of anyone who has not agreed Our [Data Processing Agreement](/dpa) applies automatically when you use an API key. ### No training Photos and results sent through the API are never used to train AI models. ### Security - HTTPS only. - Keys are stored only as hashes and can be revoked any time from the dashboard. - Keep your key on your server, never in a browser or app. ### Resellers and enterprise (https://www.tryoncloud.com/docs/resellers) Resellers, agencies, wholesale buyers and enterprises all use **the same Developer API** and the same keys. There is no separate partner program to join. ### Sell it under your own brand You may build TryOnCloud try-on into your own products and sell it to your clients under your own brand, with no TryOnCloud branding anywhere. Your clients never need a TryOnCloud account. See the [Terms](/terms#developer-api). You may not share, sell or publish your API keys, or let others use your keys outside your product. ### One key per client Create a **named key per client or product** on the **Dashboard > API Keys** page: - See when each key was last used. - Revoke one client without affecting the others. - Keep up to 5 keys active at once, so you can rotate a key without downtime. - Give each client's key a **monthly credit limit**, so one client can never spend more than their share of your wallet. Past it, that key gets `402 KEY_LIMIT_REACHED` until the 1st (UTC) while your other keys keep working. - Set an **expiry date** for trial or fixed-term clients; the key stops working after that day. - Send each client's end-user id as `customer_id`, then find their try-ons in **Generations** or erase them with `DELETE /customers/:id`. ### Pricing at volume | Try-ons | Per try-on (USD) | Per try-on (India) | |---|---|---| | 50+ | $0.11 | ₹9 | | 300+ | $0.10 | ₹8 | | 1,000+ | $0.09 | ₹7.50 | | 5,000+ | $0.07 | ₹6.50 | - Credits never expire, so buy in bulk and use them over months. - You set your own resale price. - For very large volumes, [contact us](/contact). Live prices: [pricing](/pricing#developer-api). ### Data responsibilities When you resell, you are the controller for your clients' end-user data and TryOnCloud is your processor under the [Data Processing Agreement](/dpa). Make sure your own terms with clients cover the try-on. ### API changelog (https://www.tryoncloud.com/docs/changelog) Changes to the Developer API, newest first. Existing request and response formats do not change without notice here; new fields and endpoints are added alongside them. ### 19 November 2026 - **New:** Async try-ons: `POST /api/v1/generations` returns a job at once; read it at `GET /api/v1/generations/:id`. [Docs](/docs/async) - **New:** Batches of up to 500 try-ons from image URLs: `POST /api/v1/batches`, `GET` and `DELETE /api/v1/batches/:id` (cancelled items are refunded). [Docs](/docs/async#batches) - **New:** Signed webhooks `generation.completed`, `generation.failed` and `batch.completed`, per request (`webhook_url`) or as an account endpoint with event selection and a test event on **API Keys > Webhooks**. [Docs](/docs/async#webhooks) - **New:** `GET /api/v1/results/:id` downloads a stored result with your key. Async results are kept 7 days. - **New:** `DELETE /api/v1/customers/:customer_id` erases one end user's stored results and records. `customer_id` is accepted on `/generate`, `/generations` and batch items. [Docs](/docs/async#delete-a-customers-data) - **New:** Per-key monthly credit limit and expiry date, set when you create a key. Over the limit: `402 KEY_LIMIT_REACHED`. [Docs](/docs/limits) - **New:** Test mode (`?mock=true`) for async jobs and batches (up to 10 items), free. - **Faster:** The garment analysis is cached for 30 days, so repeat try-ons of the same product photo skip about 2 seconds. - **Dashboard:** Generations search by customer id or request id, period filter, Live view and CSV export. Overview shows median and p95 time and a credit runway. - **Security:** Webhooks are sent only to public addresses checked at connection time, never following redirects. ### 18 November 2026 - **New:** `Idempotency-Key` header on `POST /api/v1/generate`; retries are never charged twice. [Docs](/docs/generate#retries-and-idempotency) - **New:** `X-Request-Id` on every response (and `request_id` in error bodies), plus `X-RateLimit-Limit` and `X-RateLimit-Remaining`. - **New:** OpenAPI 3.1 spec at `https://www.tryoncloud.com/api/v1/openapi.json`. - **New:** Public service figures at `GET /api/v1/status` and the [status page](/status). - **Docs:** Output resolution stated: about 1 megapixel (the 1K class). ### 14 November 2026 - **New:** Webhook header `x-tryoncloud-signature-v2`, which signs the timestamp together with the body so old deliveries can be rejected. `x-tryoncloud-signature` is unchanged. [Docs](/docs/webhook) - **Changed:** Rate limits are now enforced across all servers, with an account-wide limit of 600 generate requests per minute and a separate limit for test mode. [Docs](/docs/limits) - **New:** `GET /api/v1/credits` to check remaining try-ons with your API key. [Docs](/docs/credits) - **New:** MCP server at `https://www.tryoncloud.com/api/mcp` for Claude Code, Cursor and VS Code. [Docs](/docs/mcp) - **New:** JavaScript/TypeScript SDK. [Docs](/docs/sdk) - **New:** Free test mode, `?mock=true` or `X-Mock: true`. [Docs](/docs/generate) - **New:** `DELETE /api/v1/results/:id` to erase a stored result early. [Docs](/docs/delete-result) - **Changed:** Enterprise price (5,000+ try-ons) lowered from $0.08 to $0.07. India stays at ₹6.50. - **Changed:** `garment_url` downloads are now checked at every redirect and at connection time; internal, private and cloud-metadata addresses are refused. - **Docs:** New multi-page docs with Markdown versions of every page, a [Data Processing Agreement](/dpa), and a resale permission in the [Terms](/terms#developer-api). ### 12 November 2026 - **Changed:** New prices at every size: 50+ $0.11, 300+ $0.10, 1,000+ $0.09, 5,000+ $0.08. - **New:** Named API keys, up to 5 active, last-used dates, revoke one at a time. ### 5 November 2026 - **Changed:** `POST /generate` always returns `image/png`, matching its documented `Content-Type`. ## In-store virtual try-on kiosk - Runs in a browser on any touchscreen, tablet or large display with a camera, including Windows touch PCs. No special hardware. - Pairs with a store using a Store ID and PIN, and can go live the same day. - Catalogue products sync automatically from the store's Shopify catalogue. - Instant capture: a shopper or staff member holds any physical garment up to the camera and tries it on, with no catalogue entry. - Shoppers can send a photo from their own phone by QR code, and receive the result on their phone by QR code. No app install. - The previous shopper's session is cleared automatically after a few minutes of inactivity. - Every result passes an automatic quality check before the shopper sees it. - Pay and TryOn (optional): the store sets a price from 1 to 1,000 rupees and the shopper pays per try-on with a single-use UPI QR (GPay, PhonePe, Paytm). Payouts to the store from 5,000 rupees. - Kiosk try-ons are metered on the store's plan. Multi-store rollouts are quoted per brand. ## Supported clothing - Women: sarees (silk, Kanjeevaram, Banarasi, cotton, georgette, designer), lehengas, salwar and churidar suits, Patiala and Punjabi suits, kurtis, anarkalis, sharara and gharara sets, mekhela chador, kasavu saree, dresses, tops, jeans, gowns, co-ords, abayas and modest wear - Men: kurtas, kurta pyjama, Pathani suits, sherwanis, bandhgalas, Jodhpuri suits, Nehru jackets, dhotis, veshtis and mundus, suits, blazers, shirts, T-shirts, jeans, trousers, jackets - Kids: festive kurta sets, lehenga cholis, party dresses and everyday wear (photos of children only with a parent's consent) - Notes: Stitched garments give the most reliable results. Draped garments (sarees, dhotis) work best when the product photo shows the garment draped on a model. Very fine zari or embroidery can soften slightly. Footwear, jewellery, headwear and handbags are not part of garment try-on. ## Integrations ### Shopify TryOnCloud integrates with Shopify via the App Store using App Bridge. No code changes to your theme are required. Install the app, configure your display rules, and your customers can virtually try on clothing within minutes. https://www.tryoncloud.com/integrations/shopify ### Custom PHP Integrate TryOnCloud's virtual try-on API into any PHP application, custom-built ecommerce platforms, Laravel stores, Symfony applications, or legacy PHP backends. Uses simple REST API calls with API key authentication. No SDK required. https://www.tryoncloud.com/integrations/php ### React & Next.js Integrate TryOnCloud's virtual try-on into React, Next.js, Angular, or any JavaScript SPA. Call the REST API from your frontend or backend, handle image upload, and display results inline. Includes React hooks and Next.js API route examples. https://www.tryoncloud.com/integrations/react ### Klaviyo TryOnCloud sends a 'Try-On Lead' event to your Klaviyo account every time a shopper leaves their email after a virtual try-on, with the product they tried. Connect it from inside the TryOnCloud app in your Shopify admin, then trigger flows and build segments from real shopper intent. No code, no CSV exports. https://www.tryoncloud.com/integrations/klaviyo ### Webhook TryOnCloud's outbound webhook delivers every captured try-on lead to a URL you control, in real time. Connect Zoho, Mailchimp, HubSpot, Salesforce, Brevo, ActiveCampaign, Zapier, Make, or your own backend. Each delivery is HMAC-SHA256 signed, retried until it lands, and limited to the shopper's email and the product they tried. https://www.tryoncloud.com/integrations/webhook ## Questions and answers Q: What is TryOnCloud? A: TryOnCloud is an AI virtual try-on platform for clothing brands. Shoppers upload or take a photo and see themselves wearing a garment in seconds. It runs as a Shopify app, an in-store virtual try-on kiosk, and a pay-per-use Developer API for any website or app. Built in Hyderabad, India, it supports Indian ethnic wear (sarees, lehengas, salwar suits, kurtas, sherwanis) and all Western clothing. Q: How do I add virtual try-on to my Shopify store? A: Install TryOnCloud from the Shopify App Store (https://apps.shopify.com/tryoncloud), add the Try On block to your product page in the theme editor, and it is live. Products sync automatically. No code. Q: Can I use TryOnCloud outside Shopify? A: Yes. The Developer API adds virtual try-on to any website, app or custom storefront with one REST call (POST /api/v1/generate). Docs: https://www.tryoncloud.com/docs Q: How much does the TryOnCloud virtual try-on API cost? A: $0.11 per try-on from 50 credits, $0.10 from 300, $0.09 from 1,000 and $0.07 from 5,000 (India: ₹9, ₹8, ₹7.50, ₹6.50). No subscription, credits never expire, failed try-ons are refunded, test mode is free. This is separate from the Shopify app's monthly plans ($19, $49, $145), which only cover the Shopify app. https://www.tryoncloud.com/blog/virtual-try-on-api-pricing Q: Does the TryOnCloud API support async jobs, batches and webhooks? A: Yes. POST /api/v1/generations starts an async try-on and returns a job id; POST /api/v1/batches runs up to 500 try-ons from image URLs. Signed webhooks (generation.completed, generation.failed, batch.completed) go to a per-request webhook_url or an account endpoint set in the dashboard. Idempotency-Key makes retries safe, and DELETE /api/v1/customers/:id erases one end user's data. https://www.tryoncloud.com/docs/async Q: Can I cap what each TryOnCloud API key spends? A: Yes. Each key can have a monthly credit limit (counted per calendar month, UTC) and an expiry date, set when the key is created. Past the limit that key gets 402 KEY_LIMIT_REACHED until the 1st while other keys keep working, which suits agencies giving one key per client. Q: What resolution does the TryOnCloud API return? A: One PNG per request of about 1 megapixel (the 1K class), shaped to the person photo. Higher resolutions are not offered yet. POST /api/v1/generate returns the image as the response body and stores no photos; async jobs and batches keep only the result, for 7 days. Q: What is the best virtual try-on API? A: The one that keeps the garment exactly as in the product photo, keeps the shopper's identity, covers your categories, returns a result in well under half a minute and has a real cost per try-on you can afford at full traffic. Test two or three APIs on your own catalogue. A test plan and scorecard: https://www.tryoncloud.com/blog/best-virtual-try-on-api Q: Do I need approval to use the TryOnCloud API? A: No. Sign up, create an API key in the dashboard and start. Test free with ?mock=true, then buy credits. Q: Can I resell the TryOnCloud API under my own brand? A: Yes. The terms allow building try-on into your own product and selling it under your brand with no TryOnCloud branding. Use one named API key per client. https://www.tryoncloud.com/terms Q: Does TryOnCloud store customer photos? A: No. Photos are used only to create the try-on and are not kept after generation. API results are returned to the developer and not stored by default. Our AI infrastructure provider keeps request data for up to 55 days only for abuse detection and never for training. https://www.tryoncloud.com/dpa Q: Is TryOnCloud GDPR and DPDP compliant? A: TryOnCloud acts as a processor under a published Data Processing Agreement covering GDPR and India's DPDP Act, with breach notice within 48 hours and deletion within 30 days of account closure. https://www.tryoncloud.com/dpa Q: Does AI virtual try-on work for sarees and Indian ethnic wear? A: Yes. Kurtas, kurtis, salwar suits, anarkalis, sherwanis and lehengas work well. Sarees and other draped garments work best when the product photo shows the garment draped on a model. Test your own catalogue with the free trial. Q: What is a virtual try-on kiosk? A: A screen with a camera in a physical store. A shopper picks a garment (or holds one up to the camera), stands in front of it, and sees themselves wearing it in seconds, then takes the result to their phone by QR code. https://www.tryoncloud.com/virtual-try-on-kiosk Q: How is an AI trial room different from a smart trial room? A: A smart trial room (like Reliance Retail's AZORTE, as reported) recognises garments by RFID and lets shoppers request sizes from a screen. An AI virtual try-on room shows the shopper wearing the garment before they change. https://www.tryoncloud.com/blog/isha-ambani-azorte-ai-trial-room Q: Can a kiosk charge shoppers per try-on? A: Yes. Pay and TryOn shows a single-use UPI QR; the store sets the price from 1 to 1,000 rupees and one payment unlocks one try-on. Failed try-ons return the credit. Q: Does TryOnCloud capture customer emails? A: Optionally. After a shopper's second try-on, a prompt asks for their email for the merchant. Leads appear in the dashboard with CSV export, and Shopify users are tagged and segmented automatically. Q: Does TryOnCloud integrate with Klaviyo and CRMs? A: Yes. Klaviyo receives a Try-On Lead event per try-on. Signed webhooks send leads to Mailchimp, HubSpot, Brevo, Zapier, Make and any CRM. https://www.tryoncloud.com/integrations Q: Does TryOnCloud add a watermark to results? A: No TryOnCloud watermark on results on any plan. On Growth and Scale a merchant can optionally add their own logo to results. Q: Where is TryOnCloud based? A: Hyderabad, Telangana, India. Contact info@tryoncloud.com. ## Blog posts ### Best Virtual Try-On API in 2026: How to Choose the Right One https://www.tryoncloud.com/blog/best-virtual-try-on-api (2026-11-16, Education) The nine things that decide the best virtual try-on API (garment fidelity, identity, coverage, speed, real cost, integration, moderation, data, licence), the three kinds of API on the market, and a test plan and scorecard you can run on your own catalogue in one day. ### Virtual Try-On API Pricing: What a Try-On Really Costs in 2026 https://www.tryoncloud.com/blog/virtual-try-on-api-pricing (2026-11-16, Education) How virtual try-on APIs are priced, TryOnCloud's exact API prices ($0.07 to $0.11, or ₹6.50 to ₹9 per try-on), how they differ from the Shopify app plans, how to work out your real cost per try-on, worked examples and ten ways to pay less. ### Isha Ambani's AZORTE Has AI Trial Rooms. Here's How Any Clothing Brand Builds Its Own AI Try-On Room https://www.tryoncloud.com/blog/isha-ambani-azorte-ai-trial-room (2026-11-14, Industry News) Reliance Retail's AZORTE, led by Isha Ambani, put smart AI trial rooms in front of Indian shoppers. What they do, how a smart trial room differs from AI virtual try-on, and how any clothing brand builds its own AI try-on room for sarees, sherwanis, kurtas and every other garment, from ₹6.50 per try-on. ### AI Clothes Changer: How Outfit Swapping Actually Works (2026) https://www.tryoncloud.com/blog/ai-clothes-changer (2026-09-19, Education) Most explanations of AI clothes changers stop at "upload a photo". This one covers what actually happens between upload and result, the transfer-versus-generative split that decides whether you get your product back or a lookalike, which garments still break in 2026, and what running one on a real store costs. ### Genlook Alternative: TryOnCloud vs Genlook Virtual Try-On (2026) https://www.tryoncloud.com/blog/genlook-alternative-virtual-try-on (2026-09-14, Shopify) Choosing between Genlook and TryOnCloud for AI virtual try-on? A full breakdown of Shopify plan pricing, per-try-on costs at real volumes, in-store kiosk mode, the developer API and reseller model, Indian wear drape handling, languages, moderation and platform coverage. Every TryOnCloud figure is taken from live production configuration. ### PointAI and ABFRL Virtual Try-On: What Retailers Need to Know https://www.tryoncloud.com/blog/pointai-abfrl-virtual-try-on (2026-08-23, Industry News) PointAI showcased its In-Store Virtual Trial Room with Aditya Birla Fashion and Retail Limited (ABFRL) on August 22, 2026. Here's what's actually confirmed, what PointAI's technology does, and how smaller retailers can offer a comparable virtual try-on experience without an enterprise rollout. ### Virtual Try-On API: The Complete Integration Guide (2026) https://www.tryoncloud.com/blog/virtual-try-on-api (2026-08-10, Education) A REST API that turns a garment photo and a person photo into a photorealistic try-on image. Two calls, no ML team, pay per generation from $0.07. Full docs, pricing, comparison, and code examples in cURL, Node.js, and Python. ### Best AI Project Idea for Final-Year Students: Build a Virtual Try-On App https://www.tryoncloud.com/blog/ai-virtual-try-on-project-for-students (2026-07-29, Education) The best final-year AI project idea for computer science and engineering students: build a working AI virtual try-on app. Real computer vision, a live demo that impresses examiners, and drop-in code for React, Next.js, Python, and PHP. Free to start, credits never expire. ### Kmart Has Virtual Try-On Now. Here's How Your Store Gets the Same Thing (Without Kmart's Budget) https://www.tryoncloud.com/blog/virtual-try-on-like-kmart (2026-07-12, Education) Kmart's AI try-on launch made the technology mainstream overnight, and every merchant had the same thought: that must cost a fortune. It doesn't. What Kmart shipped, the real cost table of building vs. subscribing, and how any clothing store gets the same shopper experience from $19/month on Shopify, WooCommerce, custom sites, or an in-store kiosk. ### Google Virtual Try-On Is Now Live in the UK. Here's How to Add the Same Feature to Your Own Store https://www.tryoncloud.com/blog/google-virtual-try-on-uk (2026-07-12, Education) Google switched on AI try-on for British shoppers, inside Google's own surfaces. With UK returns costing retailers roughly £27 billion a year and one in four online clothing orders coming back, the expectation Google just set is one your own product pages have to meet. The comparison, the UK returns math, the GDPR angle, and the full feature list any store gets from $19/month. ### AI Virtual Try-On in the USA: How American Shoppers Try On Clothes Online in 2026 https://www.tryoncloud.com/blog/ai-virtual-try-on-usa (2026-07-09, Education) US shoppers return almost one in five online clothing orders, and returns cost American retailers roughly $890 billion a year. AI virtual try-on attacks that number at its cause. How it works, real platform data on conversion and returns, and how any US store adds it, from Shopify and WooCommerce to custom React or Next.js sites and in-store kiosks. ### Instant TryOn and Pay Per Try-On: The Kiosk That Scans Any Garment (2026) https://www.tryoncloud.com/blog/instant-tryon-kiosk-pay-per-tryon (2026-07-05, Education) Two new kiosk features explained by the team that built them: Instant TryOn lets a shopper hold any physical garment up to the camera and see it on their body, and Pay & TryOn charges per try-on over a UPI QR. How both work on a real shop floor, including the design mistakes along the way. ### Virtual Try-On Kiosk: The Complete Guide for Clothing Stores (2026) https://www.tryoncloud.com/blog/virtual-try-on-kiosk-guide (2026-06-20, Education) A practical retailer's guide to the virtual try-on kiosk, what it does on the floor, the features that matter, and how it moves conversion and return rates. Written for store owners, not engineers. ### How Does a Virtual Try-On Kiosk Work? (Step by Step) https://www.tryoncloud.com/blog/how-virtual-try-on-kiosk-works (2026-06-20, Education) How a virtual try-on kiosk works, explained step by step: tap a product, take or scan a photo, AI renders the look in seconds, download to your phone. What happens behind the screen and why it is fast and private. ### Virtual Try-On Kiosk vs Fitting Room: Which Is Better for Retail? https://www.tryoncloud.com/blog/try-on-kiosk-vs-fitting-room (2026-06-20, Education) Virtual try-on kiosk vs traditional fitting room compared on speed, queues, floor space, returns and cost. When to keep changing rooms, when a kiosk wins, and why most stores use both. ### 9 Benefits of a Virtual Try-On Kiosk for Retail Stores https://www.tryoncloud.com/blog/virtual-try-on-kiosk-benefits-retail (2026-06-20, Returns) The real benefits of a virtual try-on kiosk for clothing retailers: higher conversion, fewer returns, more dwell time, no fitting-room queue, lower staff load, and a shareable moment that markets your store. ### Best Virtual Try-On Kiosk for Clothing Stores in 2026 https://www.tryoncloud.com/blog/best-virtual-try-on-kiosk (2026-06-20, Education) How to choose the best virtual try-on kiosk for your clothing store in 2026: the criteria that matter, what separates a great kiosk from a gimmick, and why TryOnCloud leads on speed, no-app simplicity, and catalog sync. ### Virtual Try-On Webhook: Send Leads to Any CRM, Securely (2026) https://www.tryoncloud.com/blog/virtual-try-on-webhook-crm-integration (2026-06-11, Lead Generation) Push every virtual try-on lead to any CRM in real time with a signed webhook. Connect Zoho, Mailchimp, HubSpot, Salesforce, Brevo, ActiveCampaign, Zapier, and more. HMAC-SHA256 signed, encrypted secrets, durable at-least-once delivery, SSRF-hardened. ### Klaviyo Virtual Try-On Integration: The 'Try-On Lead' Event (2026) https://www.tryoncloud.com/blog/klaviyo-virtual-try-on-integration (2026-06-11, Lead Generation) Connect Klaviyo to your Shopify virtual try-on in two clicks. Every try-on sends a 'Try-On Lead' event to the shopper's Klaviyo profile, so you can trigger abandoned try-on flows and segment by product. Event-first, minimal scopes, OAuth (PKCE), encrypted by design. ### How to Build & Launch an AI Virtual Try-On SaaS in 2026 (Web, Shopify, WooCommerce & Android) https://www.tryoncloud.com/blog/build-launch-ai-virtual-tryon-saas (2026-06-02, Education) Don't build the AI from scratch. This founder & platform playbook shows how to launch a white-label virtual try-on SaaS, Shopify app, WooCommerce plugin, Android app or web app, on TryOnCloud's API, with real revenue models, pricing, and the single API call that powers all of it. ### Try Before You Buy: How ASOS, Zara & Nike Use Virtual Try-On (and How You Can Too) https://www.tryoncloud.com/blog/try-before-you-buy-brands-virtual-tryon (2026-05-31, Education) ASOS, Zara, Nike and H&M invest millions in virtual try-on. Here's exactly how they do it, and how any ecommerce clothing store can launch the same technology today, free, in 2 minutes. ### How to Add AI Virtual Try-On to Any React or Next.js Ecommerce Store (2026 Guide) https://www.tryoncloud.com/blog/react-nextjs-virtual-tryon (2026-05-31, Education) Not on Shopify? This step-by-step guide shows you how to integrate AI virtual try-on into any React or Next.js store using the TryOnCloud REST API, with full TypeScript code, a secure server-side proxy, and a production-ready component you can drop in today. ### Virtual Try-On Lead Capture: Turn Every Try-On Into a Customer (2026) https://www.tryoncloud.com/blog/lead-capture-virtual-try-on (2026-05-14, Lead Generation) Most Shopify stores spend hundreds getting traffic to product pages, but fewer than 3% buy. TryOnCloud's lead capture auto-captures guest emails after every try-on, creates a Shopify segment on install, and exports leads as CSV, zero setup required. ### AI Virtual Try-On in India: The Complete 2026 Guide for Indian Fashion Brands https://www.tryoncloud.com/blog/ai-virtual-try-on-india (2026-05-05, Markets) How Indian fashion brands use AI virtual try-on for sarees, lehengas and kurtis on Shopify and WooCommerce, in-store kiosks with UPI payments, a rupee-priced API from ₹6.50 and DPDP-ready privacy. Updated November 2026. ### How to Add Virtual Try-On to Shopify (No Code, 10 Minutes) 2026 https://www.tryoncloud.com/blog/how-to-add-virtual-try-on-to-shopify (2026-04-23, Shopify) Step-by-step guide: add virtual try-on to your Shopify clothing store in 2 minutes without any coding. Increase conversions by 40% and reduce returns by 35%. ### 7 Proven Ways to Increase Shopify Clothing Store Conversions (2026) https://www.tryoncloud.com/blog/increase-shopify-clothing-store-conversions (2026-04-23, Shopify) The average Shopify clothing store converts at 1.5%. Here are 7 data-backed tactics, including AI virtual try-on, that top fashion stores use to reach 3 to 5% conversion rates. ### Try Before You Buy Shopify: How AI Virtual Try-On Works (2026) https://www.tryoncloud.com/blog/try-before-you-buy-shopify (2026-04-23, Shopify) Try before you buy on Shopify without shipping products. AI virtual try-on lets shoppers see clothing on their own body in 7 seconds, no returns, no logistics cost. ### Shopify Virtual TryOn: Add AI TryOn to Your Store (2026) https://www.tryoncloud.com/blog/shopify-virtual-try-on (2026-03-27, Shopify) Step-by-step guide to adding AI virtual TryOn to your Shopify store, no coding required. Reduce returns by 35%, increase conversions, and stand out from 99% of Shopify fashion stores. ### How to Reduce Clothing Returns in Ecommerce (2026 Guide) https://www.tryoncloud.com/blog/reduce-clothing-returns (2026-03-26, Returns) Online clothing returns cost retailers billions yearly. Learn 7 proven strategies to cut your return rate by up to 35%, including AI virtual TryOn for Shopify & WooCommerce. ### Virtual Fitting Room for Online Stores: Complete 2026 Guide https://www.tryoncloud.com/blog/virtual-fitting-room-guide (2026-03-26, Education) Everything you need to know about virtual fitting rooms, how they work, plug-and-play vs custom builds, cost comparison, and how to add one to your store today. ## Key pages - Home: https://www.tryoncloud.com/ - Pricing (Shopify plans and Developer API packs): https://www.tryoncloud.com/pricing - Developer API documentation: https://www.tryoncloud.com/docs - TryOnCloud vs FASHN (Developer API comparison): https://www.tryoncloud.com/compare/tryoncloud-vs-fashn - TryOnCloud vs Genlook (Developer API comparison): https://www.tryoncloud.com/compare/tryoncloud-vs-genlook - TryOnCloud vs fal.ai (Developer API comparison): https://www.tryoncloud.com/compare/tryoncloud-vs-fal-ai - Integrations: https://www.tryoncloud.com/integrations - Virtual try-on kiosk: https://www.tryoncloud.com/virtual-try-on-kiosk - Virtual try-on kiosk in India: https://www.tryoncloud.com/virtual-try-on-kiosk/india - Virtual try-on kiosk in Dubai and UAE: https://www.tryoncloud.com/virtual-try-on-kiosk/dubai - Features: https://www.tryoncloud.com/features - Use cases: https://www.tryoncloud.com/use-cases - Changelog: https://www.tryoncloud.com/changelog - FAQ: https://www.tryoncloud.com/faq - Blog: https://www.tryoncloud.com/blog - Contact: https://www.tryoncloud.com/contact ## Legal - Privacy policy: https://www.tryoncloud.com/privacy - Data Processing Agreement (GDPR, India DPDP Act): https://www.tryoncloud.com/dpa - Terms of service (incl. Developer API resale): https://www.tryoncloud.com/terms - Refund policy: https://www.tryoncloud.com/refund-policy ## Company TryOnCloud, founded 2026 by Naveen Allem Address: Matrix IT Hub, MIG 648, KPHB, Kukatpally, Hyderabad, Telangana 500072, India Email: info@tryoncloud.com Phone and WhatsApp: +91 7997200506 Shopify App Store: https://apps.shopify.com/tryoncloud LinkedIn: https://www.linkedin.com/company/tryoncloud