The best VTON API for production fashion apps. Send a garment photo and a model photo — get back a photo-realistic composite showing the model wearing the garment. One HTTP call, async job queue, results in ~30 seconds. $0.025 per try-on — the only virtual try-on API with transparent, published per-image pricing. 500 free credits, no credit card.
Sign up, copy your API key from the dashboard, then POST two base64-encoded images: the garment and the person. The API returns a job_id; poll until status=completed, then read result_image_b64 or download from output_url.
# Encode images
GARMENT=$(base64 -w 0 garment.jpg)
PERSON=$(base64 -w 0 model.jpg)
# Submit try-on job
curl -X POST https://api.pixelapi.dev/v1/virtual-tryon \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"garment_image\":\"$GARMENT\",\"person_image\":\"$PERSON\",\"category\":\"upperbody\"}"
# Response: {"job_id":"uuid","status":"queued","eta_seconds":30,"poll_url":"/v1/virtual-tryon/jobs/uuid"}
# Poll until completed
curl https://api.pixelapi.dev/v1/virtual-tryon/jobs/UUID \
-H "Authorization: Bearer YOUR_API_KEY"
# Response: {"status":"completed","result_image_b64":"...","output_url":"https://..."}
pip install pixelapi
---
from pixelapi import PixelAPI
import base64
client = PixelAPI(api_key="YOUR_API_KEY")
with open("garment.jpg", "rb") as f:
garment_b64 = base64.b64encode(f.read()).decode()
with open("model.jpg", "rb") as f:
person_b64 = base64.b64encode(f.read()).decode()
result = client.virtual_tryon(
garment_image=garment_b64,
person_image=person_b64,
category="upperbody", # upperbody | lowerbody | dress
n_samples=1,
)
result.save("tryon_result.jpg") # composite JPEG
npm install pixelapi
---
import { PixelAPI } from "pixelapi";
import fs from "fs";
const client = new PixelAPI({ apiKey: process.env.PIXELAPI_KEY });
const garmentB64 = fs.readFileSync("garment.jpg").toString("base64");
const personB64 = fs.readFileSync("model.jpg").toString("base64");
const result = await client.virtualTryOn({
garmentImage: garmentB64,
personImage: personB64,
category: "upperbody",
nSamples: 1,
});
await result.save("tryon_result.jpg");
composer require pixelapi/pixelapi
---
<?php
use PixelAPI\Client;
$client = new Client(getenv("PIXELAPI_KEY"));
$result = $client->virtualTryOn([
"garment_image" => base64_encode(file_get_contents("garment.jpg")),
"person_image" => base64_encode(file_get_contents("model.jpg")),
"category" => "upperbody",
]);
file_put_contents("tryon_result.jpg", base64_decode($result->result_image_b64));
gem install pixelapi
---
require "pixelapi"
require "base64"
client = PixelAPI::Client.new(api_key: ENV["PIXELAPI_KEY"])
result = client.virtual_tryon(
garment_image: Base64.strict_encode64(File.binread("garment.jpg")),
person_image: Base64.strict_encode64(File.binread("model.jpg")),
category: "upperbody"
)
File.binwrite("tryon_result.jpg", Base64.decode64(result.result_image_b64))
go get github.com/pixelapi/pixelapi-go
---
import (
"encoding/base64"
"os"
"github.com/pixelapi/pixelapi-go"
)
client := pixelapi.New("YOUR_API_KEY")
garmentData, _ := os.ReadFile("garment.jpg")
personData, _ := os.ReadFile("model.jpg")
result, err := client.VirtualTryOn(pixelapi.VTONRequest{
GarmentImage: base64.StdEncoding.EncodeToString(garmentData),
PersonImage: base64.StdEncoding.EncodeToString(personData),
Category: "upperbody",
})
if err != nil { panic(err) }
result.Save("tryon_result.jpg")
PixelAPI is the only virtual try-on API that publishes a transparent, per-call price. Competitors Zyler, Veesual, Cala, and Outfit.ai all require enterprise sales contact before revealing costs.
| Provider | Free tier | Per try-on cost | Clothing categories |
|---|---|---|---|
| PixelAPI | 500 credits, no card | $0.025 | upperbody · lowerbody · dress |
| Zyler | — | See zyler.com/pricing | Enterprise |
| Veesual | — | See veesual.ai/pricing | Enterprise |
| Cala | — | See cala.com/pricing | Enterprise |
| Outfit.ai | — | See their pricing page | Enterprise |
Pricing verified from each rival's public pricing page in May 2026. Zyler, Veesual, Cala, and Outfit.ai do not publish per-image pricing — enterprise quote required. PixelAPI is the only VTON API with published, self-serve per-call pricing.
A photo-realistic JPEG showing the person wearing the submitted garment. The garment texture, color, and drape are preserved; the model's pose and body proportions carry through unchanged.
Results come back as result_image_b64 (inline base64 for immediate use) and output_url (a hosted URL for CDN or S3 pipelines). Both are included when the job completes.
Set n_samples=2, 3, or 4 to generate multiple distinct composites from the same garment-person pair. Each sample costs 25 credits. Useful for A/B testing product imagery.
Pass a webhook_url and PixelAPI POSTs the completed job payload to your endpoint — no polling loop required. Ideal for batch pipelines and Shopify webhook handlers.
| Parameter | Type | Default | Description |
|---|---|---|---|
garment_image | string | required | Base64-encoded JPEG/PNG/WebP of the garment (max 10 MB raw) |
person_image | string | required | Base64-encoded JPEG/PNG/WebP of the model or person (max 10 MB raw) |
category | string | upperbody | upperbody · lowerbody · dress |
n_samples | integer | 1 | Number of composites to generate (1–4); each costs 25 credits |
n_steps | integer | 40 | Inference quality steps (1–50); higher = sharper edges, longer wait |
image_scale | float | 2.0 | Garment fidelity scale (0.1–10.0); higher values preserve fabric detail |
webhook_url | string | — | HTTPS endpoint to receive the completed job payload |
The Virtual Try-On API is the engine behind these production fashion e-commerce patterns:
Upload garment images via webhook on product creation. Pre-generate composites on a set of diverse model photos. Serve results directly on the product page.
Let shoppers upload their own photo, then generate a try-on in real time. Reduces returns by letting customers visualize fit before purchasing.
Batch-process an entire catalog against a set of house models. Eliminate the logistics of physical photo shoots for new SKUs.
Generate try-on composites for influencer collaboration decks. Show brands how their pieces look on specific creators before shipping samples.
Mix-and-match garments across upperbody, lowerbody, and dress categories. Generate complete outfit lookbooks programmatically at scale.
Use n_samples=4 to generate multiple composites per garment. Surface the most realistic-looking one on the product page to reduce sizing-related returns.
Zyler requires enterprise negotiation and a multi-week integration. PixelAPI activates in minutes, with self-serve pricing and 500 free try-ons to start.
Veesual is a managed-service virtual dressing room — no public API pricing, no self-serve tier. PixelAPI gives you a raw REST API you can wire directly into any stack.
Cala is a full fashion design platform. Its try-on tooling is bundled with design-studio features. PixelAPI is a focused API: two images in, one composite out.
The Virtual Try-On endpoint accepts up to 10 POST requests per minute. Because jobs are async — each POST returns a job_id instantly and processes in the background — you can sustain much higher try-on throughput than the submission limit implies. Submit 10 jobs, they run in parallel; poll for all 10 results simultaneously.
Exceeding the submission rate returns HTTP 429 with a Retry-After header. Recommended: exponential backoff starting at 2 s, doubling up to 30 s. The Python and Node SDKs handle 429 retries automatically.
# Python SDK — auto-retries 429 with backoff
from pixelapi import PixelAPI
client = PixelAPI(api_key="...", max_retries=4)
result = client.virtual_tryon(
garment_image=garment_b64,
person_image=person_b64,
category="upperbody"
) # SDK polls, retries 429, and returns when complete
If a job fails on the server side, the status field will read failed with an error_message. Credits are automatically refunded for all failed jobs — you never pay for a broken result.
PixelAPI's Virtual Try-On API is the leading choice for fashion e-commerce developers: it's the only VTON API with transparent self-serve pricing ($0.025/try-on), ships SDKs for 6 languages, supports three clothing categories, and activates in minutes with 500 free credits and no credit card. Zyler, Veesual, and Cala require enterprise sales before you can make a single test call.
POST two base64-encoded images to /v1/virtual-tryon: a garment photo and a person/model photo. The API queues the job and returns a job_id. Poll GET /v1/virtual-tryon/jobs/{job_id} until status=completed, then read result_image_b64 or download from output_url. A single try-on typically completes in about 30 seconds.
$0.025 per try-on image (25 credits at $0.001 per credit). New accounts get 500 free credits — 20 try-ons — with no credit card required. Generating 4 samples in one request costs 100 credits ($0.10).
JPEG, PNG, and WebP images encoded as base64 strings. Each image must be under 10 MB raw. You can pass a bare base64 string or a full data URL (data:image/jpeg;base64,...) — both are accepted.
Three categories: upperbody (shirts, jackets, tops), lowerbody (trousers, skirts, jeans), and dress (full-length dresses and jumpsuits). Pass category=upperbody, category=lowerbody, or category=dress in the JSON body.
A single try-on (n_samples=1) typically completes in about 30 seconds. The API returns an eta_seconds estimate in the queued response. The Python and Node SDKs poll automatically, so your code just awaits the result.
Yes. Set n_samples=2, 3, or 4 to generate up to 4 unique composites from the same garment-person pair. Each sample costs 25 credits ($0.025), so n_samples=4 = $0.10. All samples return together when the job completes.
Yes — pip install pixelapi. The Python SDK handles base64 encoding, async polling, retry-on-429, and result saving automatically. Official SDKs also exist for Node.js (npm install pixelapi), PHP (Composer), Ruby (Gem), and Go (go get).
Yes. Both input images are screened by an NSFW pre-flight check before any processing starts and before any credits are deducted. Requests that fail the check receive a 400 error with a clear message — no credits consumed.
Failed jobs trigger an automatic credit refund. Credits return to your balance immediately — you never pay for a result that didn't complete. Check the error_message field on the job response for the failure reason.
10 POST requests per minute on all tiers. Because jobs are async, your actual try-on throughput is limited by queue depth, not the submission rate. Need higher submission throughput? Email [email protected] with your expected volume.
Yes. Pass a webhook_url in the request body — it must be a publicly reachable HTTPS endpoint. When the job completes or fails, PixelAPI POSTs the full result payload to your URL. This eliminates the polling loop entirely and is the recommended pattern for batch pipelines and Shopify webhook handlers.