Virtual try-on API for fashion: one request, one finished image

Send a garment and a photo of a person. The TryOnCloud API returns a photorealistic image of that person wearing it, in the same response, with no job to poll. It handles Indian ethnic wear as well as Western fashion, and you pay only for try-ons that succeed.

From
$0.07 / try-on
Credits
Never expire
Testing
Free mode
curl -X POST https://www.tryoncloud.com/api/v1/generate \
  -H "X-API-KEY: $TRYONCLOUD_API_KEY" \
  -F "garment_url=https://yourstore.com/products/kurti.jpg" \
  -F "person_image=@shopper.jpg" \
  -o result.png

Response: 200 OK with Content-Type: image/png. The body is the try-on image. Errors come back as JSON with a stable code.

Virtual try-on API result: a lehenga rendered on a shopper photoVirtual try-on API result: a hoodie rendered on a shopper photoVirtual try-on API result: a T-shirt rendered on a shopper photo

Example results from the TryOnCloud try-on engine.

How the virtual try-on API works

Most try-on services make you upload, start a job and poll for the result. The TryOnCloud generate endpoint does it in a single call, which keeps your integration short and your error handling simple.

  1. Step 1

    Send the garment

    A product photo as a file, a public HTTPS URL or base64. We read the garment's type, length, neckline, sleeves and fabric before generating.

  2. Step 2

    Send the person

    A clear photo of your shopper as a file or base64. A full-length photo gives the best result for sarees, lehengas and dresses.

  3. Step 3

    Get the image

    The response body is the finished PNG. Show it, store it on your side, or send it to the shopper. Nothing is kept on our side by default.

What developers build with it

Storefront try-on

A try-on button on product pages of a custom, headless or Hydrogen store.

Mobile apps

Shoppers try clothes from their camera roll; your backend calls the API.

Catalogue imagery

Batches of up to 500 items to show products on models at scale.

Platforms and agencies

Offer try-on to your own clients under your own brand.

Garments it understands

One endpoint handles both Indian and Western catalogues, so a store selling both does not need two providers.

Indian ethnic wear

Sarees with the pallu, lehengas with dupatta, kurtis, salwar suits, anarkalis, sherwanis

Western wear

Shirts, T-shirts, tops, dresses, gowns, jeans, trousers, co-ords

Outerwear and active

Hoodies, jackets, coats, gym and yoga wear

Full-length handling

Long garments render completely even when the person photo shows shorts or short sleeves

Footwear, jewellery and accessories are not supported today.

Technical specifications

EndpointPOST https://www.tryoncloud.com/api/v1/generate (synchronous). Async: POST /api/v1/generations, POST /api/v1/batches
AuthenticationX-API-KEY header with a tk_dev_v1_ key. Keys are shown once and stored only as a hash
Inputsgarment_image, garment_url or garment_base64; person_image or person_base64; optional customer_id
FormatsJPEG, PNG, WebP or HEIC, checked by file content, up to 15 MB per image
OutputOne PNG per request, about 1 megapixel, shaped to the person photo
Rate limits300 requests per minute per key, 600 per account; up to 50 async jobs at once
RetriesIdempotency-Key header, so a retried request is never charged twice
WebhooksSigned events when an async job or batch finishes
ToolingJavaScript/TypeScript SDK, OpenAPI 3.1 spec, MCP server, public status page

Full reference: Generate a try-on, async jobs and webhooks, errors and live status.

Virtual try-on API pricing

Prepaid credits, one credit per successful try-on. No subscription, no monthly reset, and credits never expire. Buy more and the price per try-on drops.

Starter

$0.11

per try-on (₹9 in India)

From 50 credits

Growth

$0.10

per try-on (₹8 in India)

From 300 credits

Business

$0.09

per try-on (₹7.5 in India)

From 1,000 credits

Enterprise

$0.07

per try-on (₹6.5 in India)

From 5,000 credits

Failed try-ons are never charged, and test mode is free. Buy packs on the pricing page; read more in what a try-on really costs.

Privacy by default

The synchronous endpoint stores nothing unless you switch result storage on. Erase one end user's data with a single call. Data Processing Agreement for GDPR and India's DPDP Act.

Production ready

Stable error codes with a fix for each, request ids on every response, rate-limit headers, safe retries, and a public status page.

Your brand, your price

No TryOnCloud branding on results. Agencies and platforms may resell try-on to their own clients.

How it compares

Honest side-by-side comparisons with other try-on APIs, including where they are the better fit.

Virtual try-on API FAQ

What is a virtual try-on API?+

A virtual try-on API is a web service that takes a photo of a garment and a photo of a person and returns a new image of that person wearing the garment. Developers call it from their own server to add try-on to an online store, a mobile app, a kiosk or a marketplace.

How do I call the TryOnCloud virtual try-on API?+

Send one POST request to https://www.tryoncloud.com/api/v1/generate with your API key in the X-API-KEY header, the garment (file, public URL or base64) and the person photo (file or base64). The response body is the finished PNG image. There is no polling step for this endpoint.

How much does the virtual try-on API cost?+

It is pay as you go. Prepaid credits cost $0.11 per try-on from 50 credits down to $0.07 per try-on from 5,000 credits (₹9 to ₹6.5 in India). Credits never expire, there is no subscription, and failed try-ons are never charged.

Can I test the API for free?+

Yes. Add ?mock=true to any request to test your integration without spending credits: the API validates your request and returns a response without generating. The free plan also includes 10 real try-ons a month.

Which clothes does it support?+

Tops, shirts, T-shirts, dresses, trousers, jeans, jackets, activewear and Indian ethnic wear such as sarees, lehengas, kurtis, salwar suits, anarkalis and sherwanis. Full-length garments render completely even when the person photo shows shorter clothes. Footwear, jewellery and accessories are not supported today.

Is the virtual try-on API fast enough for a live store?+

Yes. Results come back quickly in the same request, which suits a storefront button or a mobile app. For catalogue work, use async jobs or batches of up to 500 items and receive a signed webhook when results are ready.

Do you store my customers' photos?+

Not by default. The synchronous endpoint returns the image and stores nothing unless you turn result storage on. Async jobs keep their result for 7 days so you can download it, and you can erase everything for one end user with a single API call. A Data Processing Agreement covering GDPR and India's DPDP Act is available.

Can I call the API from a browser or a mobile app?+

Keep your API key on your server. Your web or mobile app calls your backend, and your backend calls TryOnCloud. Never put the key in front-end code or an app bundle.

Can I resell the virtual try-on API under my own brand?+

Yes. Agencies, platforms and enterprises may sell try-on to their own clients under their own brand, with no TryOnCloud branding on the result images.

Is there an SDK or OpenAPI specification?+

Yes. There is a zero-dependency JavaScript and TypeScript SDK for Node, Deno, Bun and edge runtimes, an OpenAPI 3.1 specification at /api/v1/openapi.json, and an MCP server so AI coding assistants can call the API. Any language can use the REST endpoint directly.

Add virtual try-on to your product

Create a key, test for free with mock mode, and ship your first try-on today. Building on Shopify? Use the Shopify app instead.