Guide · Migration

Migrating from FASHN to Photta what changes, what does not

In one sentence

Moving a try-on integration to Photta means a new bearer key, a new request body and a new status path. The shape of the integration — submit, poll, download, store — does not change.

  • 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

Teams move between try-on APIs for the ordinary reasons: the output suits their catalogue better, the price per image works out differently at their volume, or they need a capability the current vendor does not publish — batch ghost mannequin, detail close-ups, generated models reused across a season.

Three things: the credential, the request body and the status path. Photta authenticates with a bearer key on every call, takes its own field names, and reports job state on a per-capability status endpoint. Every value your code sends is documented as an enum or an id you can list first.

The architecture. Both are asynchronous APIs you submit to and poll, so your queue, your worker, your retry policy and your storage all keep working. In practice a migration is a new client module and a new set of field names, not a new pipeline.

The endpoint you are moving to

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

The four things that actually change

  • Authentication

    One bearer key on every endpoint, created in your Photta dashboard. No per-endpoint scopes and no token exchange step.

  • The request body

    Photta takes snake_case fields with documented enums, and ids for the model, pose and background that you list from the resource endpoints and cache.

  • Polling

    Poll the capability’s status endpoint every 3 seconds until it reports completed or failed. There are no webhooks, so nothing new needs to be exposed publicly.

  • How you are charged

    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.

The new 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')

Questions about migrating

How long does a migration take?

It is one client module: a new key, new field names, a new status path. If your worker already submits and polls, the surrounding code does not move.

Do I have to change my queue?

No. Both APIs are asynchronous, so whatever you use today — Celery, BullMQ, Inngest, a cron table — keeps its shape. Only the calls inside the task change.

What happens to images I already generated?

They are files in your own storage and nothing about them changes. Migrating affects what you render next, not what you have already published.

How do the prices compare?

The comparison page sets Photta’s credit cost per call against what FASHN publishes on its own pricing page, with the date each figure was read. Your own volume decides which works out better.

Can I run both at once?

Yes, and it is the safest way to switch. Send a slice of your catalogue through the new endpoint, compare the output on real products, then move the rest.

Run both, then switch

Point a copy of your queue at the new endpoint and compare the output yourself.

  • 1.5–4 min
  • 5 credits at 2K · 6 credits at 4K
  • async, polling