Apparel · Capability

Virtual Try-On API — Photta

One REST call turns a flat-lay apparel photo into a campaign-ready on-model image. Asynchronous, 1.5–4 minutes per generation, 5 credits at 2K or 7 credits at 4K.

In one sentence

Photta's virtual try-on API accepts a flat-lay apparel image, a mannequin ID and a pose ID, then returns a 2K or 4K on-model photo. You authenticate with `Authorization: Bearer photta_live_xxx`, POST to `/api/v1/tryon/apparel`, poll the same endpoint with the returned generation ID every 3–5 seconds, and download the result when status flips to `completed`.

POST/api/v1/tryon/apparel
cURL
curl -X POST https://ai.photta.app/api/v1/tryon/apparel \
  -H "Authorization: Bearer $PHOTTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_type": "dress",
    "product_images": ["https://example.com/dress.jpg"],
    "mannequin_id": "mnq_athena_ts",
    "pose_id": "pose_standing_front",
    "resolution": "2K",
    "aspect_ratio": "3:4"
  }'

What to expect

Typical completion

1.5–4min

2K / 4K credits

5 / 7

Aspect ratios

5

Product types

6

How it works

Four API calls, one product photo

Pick a mannequin and a pose, submit the job, poll until it's done, download the result.

  1. 01

    Step 1

    Generate an API key

    Sign up at ai.photta.app, open the Developers tab, click Generate API key. Live keys start with `photta_live_`. Put the key in `PHOTTA_API_KEY` — never commit it.

  2. 02

    Step 2

    Pick a mannequin and a pose

    GET `/api/v1/mannequins` and `/api/v1/poses` to list available options. Pick IDs that match your brand — body size, expression, ethnicity and pose category are all filterable.

  3. 03

    Step 3

    POST the try-on job

    Send a POST to `/api/v1/tryon/apparel` with `product_type`, `product_images`, `mannequin_id`, `pose_id`, `resolution`, `aspect_ratio`. The API returns 202 Accepted with a generation ID.

  4. 04

    Step 4

    Poll until the job completes

    GET `/api/v1/tryon/apparel/:id` every 3 seconds. When `data.status` flips to `completed`, the payload includes `output_url` and `thumbnail_url`. Put an upper bound so a stuck job can't hang your request.

  5. 05

    Step 5

    Download and persist

    Fetch the bytes from `output_url` and store them in your own object storage. The CDN URL is stable but your product shouldn't depend on it for rendering.

Questions other developers ask

Questions developers ask before shipping apparel try-on

What is Photta's virtual try-on API?+

A REST endpoint that takes a flat-lay product image and a pair of IDs (mannequin + pose) and returns a photorealistic on-model image. Same pipeline as Photta's consumer app. Six product types are supported: top, bottom, top+bottom, dress, one-piece, jumpsuit.

How much does it cost per call?+

5 credits for a 2K result, 7 credits for 4K. Credits come with your subscription and can be topped up. Failed generations don't cost credits — they're refunded.

How long does a generation take?+

Typical completion is 1.5 to 4 minutes, measured end to end. The POST returns a generation ID in under a second; the GPU work happens in the background while you poll.

What product types are supported?+

Six: `top`, `bottom`, `top_and_bottom`, `dress`, `one_piece`, `jumpsuit`. Each expects a different `product_images` shape — for example `top_and_bottom` wants both `top_image` and `bottom_image` URLs.

Can I use my own mannequin?+

Yes. Upload a mannequin photo to `/api/v1/mannequins/upload` or generate a new AI mannequin with `/api/v1/mannequins/generate-model`. The returned ID plugs straight into the try-on request.

How do I poll for the result?+

GET `/api/v1/tryon/apparel/:id` every 3 to 5 seconds until `data.status` is `completed` or `failed`. Put an upper bound on attempts — 120 × 3s covers the documented window with room to spare.

Apparel · Capability

Create an account and get an API key

Photta's virtual try-on API accepts a flat-lay apparel image, a mannequin ID and a pose ID, then returns a 2K or 4K on-model photo. You authenticate with `Authorization: Bearer photta_live_xxx`, POST to `/api/v1/tryon/apparel`, poll the same endpoint with the returned generation ID every 3–5 seconds, and download the result when status flips to `completed`.

Virtual Try-On API for Apparel | Photta | Photta