Guide · Virtual try-on
What is a virtual try-on API? and what it returns
In one sentence
A virtual try-on API takes a garment photograph and returns an image of that garment worn by a model. You POST the photo with a mannequin and a pose, poll the job, then download the result.
- Typical time: 1.5–4 min
- Credits: 5 credits at 2K · 6 credits at 4K
- Processing: async, polling
Every figure on this page comes from the Photta API docs · checked
The short answer
A virtual try-on API is an HTTP endpoint that renders a garment onto a model. You send a photograph of the product — usually the flat or on-mannequin shot you already have — and the service returns an image of that garment being worn. No studio, no model booking, no reshoot when the colourway changes.
The call is asynchronous because rendering takes longer than a request should wait. You POST the garment with the model and pose you want, the API accepts the job and hands back an id, and you poll a status endpoint until the job reports that it is complete. The finished image arrives as a URL you download and store yourself.
The usual callers are catalogue teams that need on-model imagery for products that never reach a studio, marketplaces that receive flat photographs from sellers, and apps that let a shopper see a garment on a body other than the brand’s single fit model.
The endpoint that does it
Read from the Photta API documentation, not written by hand.
At a glance
- Endpoint
- POST /api/v1/tryon/apparel
- Authentication
- Bearer API key
- Processing
- Asynchronous — poll the status endpoint
- Typical time
- 1.5–4 min
- Credits
- 5 credits at 2K · 6 credits at 4K
- Aspect ratios
- 3:4 · 1:1 · 4:3 · 9:16 · 16:9
- Input limits
- Up to 10 MB per image; JPEG, PNG, WebP
- Idempotent
- No
What to look for in any try-on API
What you send
A garment photograph as an https URL or a base64 data URI, plus the model and pose you want. Photta accepts JPEG, PNG and WebP up to 10 MB per image.
How long it takes
Long enough that it cannot be done inside a web request. Photta publishes a typical completion time per endpoint and expects polling every 3 seconds — there are no webhooks.
What it costs
Photta charges credits per call, 5 at 2K and 6 at 4K for apparel try-on, deducted when the job starts and refunded automatically when it fails.
What limits apply
A published rate limit of 600 requests per minute per key, and a per-plan cap on how much can render at once. Both are worth reading before a catalogue-sized run.
The first request
The same call in cURL, Node.js and Python.
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/tryon/apparel \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_type": "top",
"product_images": [
"https://cdn.yourstore.com/products/shirt-front.jpg"
],
"product_back_image": "https://cdn.yourstore.com/products/shirt-back.jpg",
"product_category": "t_shirt",
"mannequin_id": "mnk_f3a9b1",
"pose_id": "pose_c2d4e5",
"background": "https://cdn.yourstore.com/backgrounds/studio-loft.jpg",
"lock_background": true,
"resolution": "2K",
"aspect_ratio": "3:4",
"body_size": "M",
"expression": "neutral",
"user_instruction": "Keep the collar pattern crisp and centered."
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/tryon/apparel", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"product_type": "top",
"product_images": [
"https://cdn.yourstore.com/products/shirt-front.jpg"
],
"product_back_image": "https://cdn.yourstore.com/products/shirt-back.jpg",
"product_category": "t_shirt",
"mannequin_id": "mnk_f3a9b1",
"pose_id": "pose_c2d4e5",
"background": "https://cdn.yourstore.com/backgrounds/studio-loft.jpg",
"lock_background": true,
"resolution": "2K",
"aspect_ratio": "3:4",
"body_size": "M",
"expression": "neutral",
"user_instruction": "Keep the collar pattern crisp and centered."
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/tryon/apparel",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"product_type": "top",
"product_images": [
"https://cdn.yourstore.com/products/shirt-front.jpg"
],
"product_back_image": "https://cdn.yourstore.com/products/shirt-back.jpg",
"product_category": "t_shirt",
"mannequin_id": "mnk_f3a9b1",
"pose_id": "pose_c2d4e5",
"background": "https://cdn.yourstore.com/backgrounds/studio-loft.jpg",
"lock_background": True,
"resolution": "2K",
"aspect_ratio": "3:4",
"body_size": "M",
"expression": "neutral",
"user_instruction": "Keep the collar pattern crisp and centered."
},
)
data = res.json()["data"] # data["id"], data["status"]Questions about virtual try-on APIs
What does a try-on API return?
An image of the garment worn by the model you chose, delivered as a URL in the completed job. Download and store it — a delivery URL is not permanent hosting.
Do I need a photo of a model?
No. Photta ships a mannequin catalogue you pick from, and you can generate your own model from attributes or upload one. The garment photograph is the only image you must supply.
How is this different from a virtual fitting room?
A fitting room is a shopper-facing feature. A try-on API is the render step underneath it: one call in, one image out. You can build a fitting room on top, or use it purely to produce catalogue photography.
What does a try-on call cost?
With Photta, 5 credits at 2K and 6 at 4K. Failed jobs are refunded, so the cost of a retry is the retry itself.
How long does one image take?
The endpoint publishes its typical completion time, and the job reports its own status. Poll every 3 seconds rather than assuming a duration.
Read next
Capabilities
Virtual try-on API for apparel
REST API that places apparel on AI mannequins. Asynchronous, 1.5–4 minute generation, 5 credits at 2K, 6 at 4K. cURL, Node.js and Python examples.
ReadCompare
Photta vs FASHN — AI fashion API, side by side
Photta and FASHN compared: endpoints, credit pricing, plan tiers, concurrency limits. Sourced from each company's own pricing page on 2026-04-19. No invented numbers.
ReadReference
Photta API pricing
What each Photta API endpoint costs in credits at 2K and 4K, how charging and refunds work, and which endpoints are free. No per-image money price.
ReadReference
Photta API rate limits
The Photta API rate limit, its window, the Retry-After header, the polling interval and the per-plan concurrency caps, all read from the API documentation.
ReadQuickstart
First Photta image in under five minutes.
Sign up, generate an API key, run your first cURL call, poll until it completes, persist the result. Five steps, documented end-to-end.
Read
Every figure on this page comes from the Photta API docs · checked
Try it on your own product photo
One request, one poll, one image.
- 1.5–4 min
- 5 credits at 2K · 6 credits at 4K
- async, polling