Funcionalidad · Maniquí invisible

API de maniquí invisible para fotos de producto con efecto maniquí invisible

En una frase

La API de maniquí invisible de Photta toma una foto de la prenda en un maniquí y devuelve una imagen de maniquí invisible con el interior de la prenda reconstruido. Elige un estilo 3d o flat_lay, haz POST, haz polling cada 3 segundos y descarga cuando esté completed.

  • Tiempo típico: 50–90 s
  • Credits: 4 credits a 2K · 5 credits a 4K
  • Procesamiento: asíncrono, polling
  • Límites: 600 requests/min
  • Autenticación: Bearer key

Cada cifra de esta página proviene de la documentación de la API de Photta · verificado

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",
  "detail_images": [
    "https://cdn.yourstore.com/products/jacket-zipper.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
Salida de ejemplo

De un vistazo

De un vistazo

Endpoint
POST /api/v1/ghost-mannequin
Autenticación
Bearer API key
Procesamiento
Asíncrono — realiza polling al endpoint de estado
Tiempo típico
50–90 s
Credits
4 credits a 2K · 5 credits a 4K
Relaciones de aspecto
3:4 · 1:1 · 4:3 · 2:3 · 3:2 · 4:5 · 5:4 · 9:16 · 16:9 · 21:9
Límites de entrada
Hasta 10 MB por imagen; JPEG, PNG, WebP
Idempotente
Sí

Petición y respuesta

Petición

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",
  "detail_images": [
    "https://cdn.yourstore.com/products/jacket-zipper.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 / Completado

{
  "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"
}

Parámetros de la petición

product_image

Tipo: stringObligatorio

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

back_image

Tipo: string

URL or base64 data URI of the other side of the garment (the back when `image_side` is `"front"`, the front when it is `"back"`) — helps the AI reconstruct the interior of the garment for a more realistic 3D effect.

detail_images

Tipo: array[string]

Up to 3 close-up photos of small details on the garment — a gem, a zipper pull, a button, a trim — each a URL or base64 data URI. Frame each so the detail fills the picture: a part only a few pixels wide in the main photo is otherwise drawn from the AI's own idea of it, and a close-up shows what it really looks like. No extra credits. More than 3 is rejected with a 400, not trimmed.

image_side

Tipo: string

Which side `product_image` shows — NOT which view is made (that is `angle`). It only matters when `back_image` is sent too: `"back"` then means your main photo is the back and `back_image` is the front, and the two are swapped so the front comes first. With one photo it changes nothing. To get a back view, send `angle: "back"`.

= front

Valores: frontback
angle

Tipo: string

The view that is made: "straight" (straight-on), "back" (the back view) or "side" (side profile). With a front and a back photo, "straight" is the front view; with one photo, it is a straight-on view of the side that photo shows. "side" is worth calling out: it 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

Valores: straightbackside
style

Tipo: string

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

= 3d

Valores: 3dflat_lay
background_color

Tipo: string

Background colour: one of the names below, or a hex value (`#F5F0E8`, `#fff`). Anything else is a 400 on `background_color`. Every colour is a seamless, even backdrop. `"transparent"` delivers the garment alone as a PNG with a transparent background (made on light grey and cut out), at no extra credits.

= white

Valores: whitelight_graygraycharcoalblackbeigecreamsandtransparent
resolution

Tipo: 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:

= 2K

Valores: 2K4K
aspect_ratio

Tipo: string

Output aspect ratio.

= 3:4

Valores: 3:41:14:32:33:24:55:49:1616:921:9
user_instruction

Tipo: 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

Tipo: 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.

Errores

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, or (background removal) a free account has used its three cut-outs. Branch on the code.
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 (500), or a check your request needs could not run right now (503, e.g. moderation_unavailable or background_removal_unavailable). Retry later with backoff.

Límites

  • 600 solicitudes por minuto por cuenta (Ventana fija; el límite es el mismo en todos los planes)
  • Un 429 incluye Retry-After: 30 segundos
  • Hasta 10 MB por imagen
  • Formatos: JPEG, PNG, WebP
  • Lotes simultáneos por plan: Free 1 · Hobby 2 · Seller 3 · Brand 4 · Studio 6
  • Solo polling — la API no envía webhooks.

Una foto de entrada, una foto de maniquí invisible de salida

Sube el origen, elige un estilo, envía, haz polling y descarga.

  1. Paso 1

    Genera una API key

    Ghost mannequin usa las mismas credenciales que cualquier otra capacidad de Photta: una key, un saldo de credits.

  2. Paso 2

    Sube la foto de origen

    Pasa una URL pública o un URI de datos base64 en `product_image`; añade `back_image` cuando tengas una vista posterior y hasta 3 fotos de primer plano en `detail_images` cuando un detalle pequeño, como una gema o el tirador de una cremallera, deba reproducirse fielmente. JPEG, PNG y WebP de hasta 10 MB por imagen.

  3. Paso 3

    Envía el trabajo de ghost mannequin por POST

    Haz POST a `/api/v1/ghost-mannequin` con `product_image`, `style` (`3d` o `flat_lay`) y, opcionalmente, `angle`, `background_color` y `resolution`. El polling es la única señal de finalización; la API no envía webhooks.

  4. Paso 4

    Haz polling hasta que el trabajo se complete

    Haz GET a `/api/v1/ghost-mannequin/:id` cada 3 segundos hasta que `data.status` sea `completed` o `failed`; el tiempo habitual de finalización es de 1.5 a 4 minutos.

  5. Paso 5

    Descarga y persiste

    El resultado es un JPEG con el color de fondo que elegiste, sin el maniquí y con el interior de la prenda reconstruido; si `background_color` se establece en `transparent`, el resultado es un PNG de la prenda sola, listo para usar con tu propio fondo. Es adecuado para imágenes de maniquí invisible en páginas de producto, galerías con efecto 3D e imágenes de prendas colocadas en plano.

Preguntas que los desarrolladores hacen antes de desplegar ghost mannequin

¿Qué es la fotografía con maniquí invisible?

Un tratamiento visual para PDP donde la prenda parece flotar sobre un cuerpo invisible, mostrando la forma y la confección interior a la vez. Históricamente se compone a partir de múltiples tomas de estudio; la API de Photta lo genera en una sola llamada a partir de una foto sobre maniquí.

¿Cuánto cuesta ghost mannequin?

4 credits en 2K, 5 credits en 4K — un credit más barato en cada nivel que try-on. Los trabajos fallidos se reembolsan automáticamente.

¿Cuál es la diferencia entre el estilo 3D y el flat-lay?

El estilo `3d` mantiene la forma tridimensional del cuerpo del maniquí: la prenda conserva el volumen, los hombros y las mangas se aprecian naturales y el interior se reconstruye. `flat_lay` aplana la prenda en una disposición 2D limpia, ideal para colecciones cápsula o listados de marketplace que esperan una silueta frontal consistente.

¿Puedo procesar varias fotos por lotes?

Sí. Haz POST a `/api/v1/ghost-mannequin/batch` con un array de imágenes de origen. La respuesta te devuelve un batch ID más los IDs de generación individuales. Haz polling a `/api/v1/ghost-mannequin/batch/:id` para un estado agregado o consulta cada elemento por separado.

¿Conserva las costuras y etiquetas interiores?

Sí: el modelo reconstruye el interior de la prenda (el interior del cuello, de los puños o el forro de la cintura) en lugar de alucinar una superficie genérica. Las etiquetas visibles en la foto original se mantienen siempre que sea posible.

¿Cómo hago polling para obtener el resultado?

Haz GET a `/api/v1/ghost-mannequin/:id` cada 3 segundos. Los trabajos por lotes consultan un endpoint padre que devuelve un estado agregado más el desglose por elemento.

Capacidades relacionadas

Cada cifra de esta página proviene de la documentación de la API de Photta · verificado

Prueba la API en cinco minutos

Genera una API key de Photta, pega el snippet de cURL de arriba y tendrás tu primera imagen con modelo antes de que termine de prepararse el café.

  • 50–90 s
  • 4 credits a 2K · 5 credits a 4K
  • asíncrono, polling
  • 600 requests/min
  • Bearer key