Functionaliteit · Ghost mannequin

Ghost mannequin API voor hollow-man-productfoto's

In één zin

Photta's ghost mannequin API neemt een foto van kleding-op-paspop en levert een onzichtbare-paspop-afbeelding met de binnenkant van het kledingstuk gereconstrueerd. Kies een 3d- of flat_lay-stijl, POST, poll elke 3 seconden, download wanneer voltooid.

  • Typische duur: 1.5–4 min
  • Credits: 4 credits bij 2K · 5 credits bij 4K
  • Verwerking: async, polling
  • Limieten: 600 requests/min
  • Authenticatie: Bearer key

Elk getal op deze pagina is afkomstig uit de Photta-API-documentatie · gecontroleerd

POST/api/v1/ghost-mannequin
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/ghost-mannequin \
  -H "Authorization: Bearer $PHOTTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "product_image": "https://cdn.yourstore.com/products/jacket-front.jpg",
  "back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
  "image_side": "front",
  "angle": "side",
  "style": "3d",
  "background_color": "white",
  "resolution": "2K",
  "aspect_ratio": "3:4",
  "user_instruction": "closed front, cream interior lining",
  "brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')
A garment shown without its mannequin by the ghost mannequin API
Voorbeelduitvoer

In één oogopslag

In één oogopslag

Endpoint
POST /api/v1/ghost-mannequin
Authenticatie
Bearer API key
Verwerking
Asynchroon — poll het status-endpoint
Typische duur
1.5–4 min
Credits
4 credits bij 2K · 5 credits bij 4K
Beeldverhoudingen
3:4 · 1:1 · 4:3 · 9:16 · 16:9
Invoerlimieten
Tot 10 MB per afbeelding; JPEG, PNG, WebP
Idempotent
Nee

Request en response

Request

RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/ghost-mannequin \
  -H "Authorization: Bearer $PHOTTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "product_image": "https://cdn.yourstore.com/products/jacket-front.jpg",
  "back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
  "image_side": "front",
  "angle": "side",
  "style": "3d",
  "background_color": "white",
  "resolution": "2K",
  "aspect_ratio": "3:4",
  "user_instruction": "closed front, cream interior lining",
  "brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')

202 Accepted / Completed

{
  "data": {
    "id": "gm_d4e5f6",
    "status": "processing",
    "style": "3d",
    "angle": "side",
    "background_color": "white",
    "resolution": "2K",
    "aspect_ratio": "3:4",
    "credits_used": 4,
    "created_at": "2026-04-10T16:00:00Z"
  },
  "request_id": "req_gm001"
}

Request-parameters

product_image

Type: stringVereist

URL or base64 data URI of the garment photo (front or back, on a mannequin or flat).

back_image

Type: string

URL or base64 data URI of the opposite side — helps the AI reconstruct the interior of the garment for a more realistic 3D effect.

image_side

Type: string

Which side product_image represents.

= front

Waarden: frontback
angle

Type: string

Camera angle for the output. "side" is worth calling out: the side view is reconstructed from the front photo (plus the back photo when provided), giving you a third catalog view without a third photoshoot — and it works well even on textured garments (crochet, lace, embroidery).

= straight

Waarden: straightbackside
style

Type: string

Output style: "3d" (ghost mannequin with 3D body shape) or "flat_lay" (garment laid flat, mannequin removed).

= 3d

Waarden: 3dflat_lay
background_color

Type: string

Background color.

= white

Waarden: whitegraybeigeblack
resolution

Type: string

Output resolution. "2K" costs 4 credits per image; "4K" costs 5 credits per image. 4K is produced natively in a single generation — pick it upfront; the resolution cannot be changed after creation. Note: 4K cannot be combined with aspect_ratio 1:1 — that combination returns 400.

= 2K

Waarden: 2K4K
aspect_ratio

Type: string

Output aspect ratio. Note: 1:1 is not available at 4K resolution — 1:1 combined with 4K returns 400.

= 3:4

Waarden: 3:41:14:39:1616:9
user_instruction

Type: string

Optional free-form note, max 400 characters (anything longer is silently truncated). A guarded steer for ambiguous rendering choices — e.g. "closed front", "cream interior lining", "buttoned up" — it never overrides the source garment, brand label, or structural reconstruction, and it is explicitly NOT a determinism/seed control.

brand_label_id

Type: string

Brand label UUID returned by the Brand Labels API. Applied to the generated garment when present. API v1 request fields use snake_case; use brand_label_id.

Errors

400invalid_request_error
The request is malformed or contains invalid parameters.
401authentication_error
The API key is missing, invalid, or expired.
402insufficient_credits_error
Your account does not have enough credits.
404not_found_error
The requested resource does not exist.
409conflict_error
The request conflicts with current state — e.g. your concurrent-batch cap is reached.
429rate_limit_error
Too many requests. Slow down and retry.Retry-After: 30
500api_error
An internal server error occurred. Retry later.

Limieten

  • 600 verzoeken per minuut per API key (Vast venster; de limiet is identiek op elk abonnement)
  • Een 429 bevat Retry-After: 30 seconden
  • Tot 10 MB per afbeelding
  • Formaten: JPEG, PNG, WebP
  • Gelijktijdige batches per abonnement: Free 1 · Hobby 2 · Seller 3 · Brand 4 · Studio 6
  • Uitsluitend polling — de API stuurt geen webhooks.

Eén foto erin, één invisible-mannequin-foto eruit

Upload de bron, kies een stijl, verzend, poll, download.

  1. Stap 1

    Genereer een API-sleutel

    Ghost mannequin gebruikt dezelfde credentials als elke andere Photta-functionaliteit — één sleutel, één creditsaldo.

  2. Stap 2

    Upload de bronfoto

    Geef een publieke URL of een base64 data-URI mee in `product_image`; voeg `back_image` toe als je een achteraanzicht hebt. JPEG, PNG en WebP tot 10 MB per afbeelding.

  3. Stap 3

    POST de ghost-mannequin-taak

    POST naar `/api/v1/ghost-mannequin` met `product_image`, `style` (`3d` of `flat_lay`) en optioneel `angle`, `background_color`, `resolution`. Polling is het enige signaal voor voltooiing — de API stuurt geen webhooks.

  4. Stap 4

    Poll totdat de taak is voltooid

    GET `/api/v1/ghost-mannequin/:id` elke 3 seconden totdat `data.status` `completed` of `failed` is; typische verwerkingstijd is 1,5 tot 4 minuten.

  5. Stap 5

    Download en sla op

    De output is een PNG waarbij de mannequin is verwijderd en de binnenkant van het kledingstuk is gereconstrueerd. Ideaal voor PDP-ghost-shots, productgalerijen met een 3D-uitstraling en flat-lay-inserts.

Vragen die developers stellen voordat ze ghost mannequin in productie nemen

Wat is ghost-mannequin-fotografie?

Een PDP-behandeling waarbij het kledingstuk lijkt te zweven op een onzichtbaar lichaam, waardoor vorm en binnenconstructie tegelijkertijd zichtbaar zijn. Historisch gezien wordt dit samengesteld uit meerdere studio-opnames; Photta's API produceert dit in één enkele aanroep vanuit één foto op een mannequin.

Hoeveel kost ghost mannequin?

4 credits op 2K, 5 credits op 4K — één credit goedkoper op elk niveau dan try-on. Mislukte taken worden automatisch terugbetaald.

Wat is het verschil tussen 3D- en flat-lay-stijl?

De `3d`-stijl behoudt de driedimensionale lichaamsvorm van de mannequin — het kledingstuk behoudt volume, schouders en mouwen vallen natuurlijk en de binnenzijde wordt gereconstrueerd. `flat_lay` vlakt het kledingstuk af naar een strakke 2D-lay-out, ideaal voor capsule-collecties of marketplace-listings die een consistente vorm van voren vereisen.

Kan ik meerdere foto's in batch verwerken?

Ja. POST naar `/api/v1/ghost-mannequin/batch` met een array van bronafbeeldingen. De respons levert een batch-ID plus afzonderlijke generatie-ID's per item op. Poll `/api/v1/ghost-mannequin/batch/:id` voor een geaggregeerde status of elk item afzonderlijk.

Behoudt het de binnennaden en labels?

Ja — het model reconstrueert de binnenkant van het kledingstuk (binnenzijde halslijn, binnenzijde manchetten, voering van de tailleband) in plaats van een generiek oppervlak te hallucineren. Labels en geprinte merktekens die zichtbaar zijn op de originele foto worden waar mogelijk behouden.

Hoe poll ik voor het resultaat?

GET `/api/v1/ghost-mannequin/:id` elke 3 seconden. Batch-taken pollen een bovenliggend endpoint dat een geaggregeerde status plus een uitsplitsing per item retourneert.

Gerelateerde functionaliteiten

Elk getal op deze pagina is afkomstig uit de Photta-API-documentatie · gecontroleerd

Probeer de API in vijf minuten

Genereer een Photta API-sleutel, plak het bovenstaande cURL-fragment en je hebt je eerste afbeelding op een model voordat de koffie klaar is.

  • 1.5–4 min
  • 4 credits bij 2K · 5 credits bij 4K
  • async, polling
  • 600 requests/min
  • Bearer key