Kapabilitas · Batch ghost mannequin
API batch ghost mannequin untuk seluruh katalog
Ringkasan singkat
Endpoint batch ghost mannequin Photta menerima array foto pakaian dan mengembalikan satu id batch ditambah satu id item per gambar. Credits untuk seluruh batch direservasi di muka; lakukan polling pada batch untuk status agregat.
- Waktu umum: 1.5–4 min per image
- Credits: 4 credits pada 2K · 5 credits pada 4K
- Pemrosesan: async, polling
- Batasan: 600 requests/min
- Autentikasi: Bearer key
Setiap angka di halaman ini bersumber dari dokumentasi API Photta · diperiksa
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/ghost-mannequin/batch \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_images": [
{
"image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/shirt-front.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/trousers-front.jpg",
"image_side": "front"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, buttoned up",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/ghost-mannequin/batch", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"product_images": [
{
"image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/shirt-front.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/trousers-front.jpg",
"image_side": "front"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, buttoned up",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/ghost-mannequin/batch",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"product_images": [
{
"image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/shirt-front.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/trousers-front.jpg",
"image_side": "front"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, buttoned up",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
},
)
data = res.json()["data"] # data["id"], data["status"]
Sekilas
Sekilas
- Endpoint
- POST /api/v1/ghost-mannequin/batch
- Autentikasi
- API key Bearer
- Pemrosesan
- Asinkron — lakukan polling ke endpoint status
- Waktu umum
- 1.5–4 min per image
- Credits
- 4 credits pada 2K · 5 credits pada 4K
- Rasio aspek
- 3:4 · 1:1 · 4:3 · 9:16 · 16:9
- Batas input
- Hingga 10 MB per gambar; JPEG, PNG, WebP
- Idempoten
- Tidak
Request dan response
Request
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/ghost-mannequin/batch \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_images": [
{
"image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/shirt-front.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/trousers-front.jpg",
"image_side": "front"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, buttoned up",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/ghost-mannequin/batch", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"product_images": [
{
"image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/shirt-front.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/trousers-front.jpg",
"image_side": "front"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, buttoned up",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/ghost-mannequin/batch",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"product_images": [
{
"image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/shirt-front.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/trousers-front.jpg",
"image_side": "front"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, buttoned up",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
},
)
data = res.json()["data"] # data["id"], data["status"]202 Accepted / Completed
{
"data": {
"batch_id": "gmb_x7y8z9",
"status": "processing",
"total": 3,
"completed": 0,
"failed": 0,
"items": [
{
"id": "gm_p1q2r3",
"status": "processing"
},
{
"id": "gm_s4t5u6",
"status": "processing"
},
{
"id": "gm_v7w8x9",
"status": "processing"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"credits_reserved": 12,
"created_at": "2026-04-10T16:05:00Z"
},
"request_id": "req_gmb001"
}{
"data": {
"batch_id": "gmb_x7y8z9",
"status": "completed",
"total": 3,
"completed": 3,
"failed": 0,
"processing": 0,
"credits_reserved": 12,
"credits_used": 12,
"credits_refunded": 0,
"items": [
{
"id": "gm_p1q2r3",
"status": "completed",
"output_url": "https://cdn.photta.app/generated/gm_p1q2r3.jpg",
"thumbnail_url": "https://cdn.photta.app/generated/gm_p1q2r3-thumb.jpg",
"credits_used": 4,
"completed_at": "2026-04-10T16:06:42Z",
"duration_ms": 102000
},
{
"id": "gm_s4t5u6",
"status": "completed",
"output_url": "https://cdn.photta.app/generated/gm_s4t5u6.jpg",
"thumbnail_url": "https://cdn.photta.app/generated/gm_s4t5u6-thumb.jpg",
"credits_used": 4,
"completed_at": "2026-04-10T16:08:18Z",
"duration_ms": 96000
},
{
"id": "gm_v7w8x9",
"status": "completed",
"output_url": "https://cdn.photta.app/generated/gm_v7w8x9.jpg",
"thumbnail_url": "https://cdn.photta.app/generated/gm_v7w8x9-thumb.jpg",
"credits_used": 4,
"completed_at": "2026-04-10T16:09:50Z",
"duration_ms": 92000
}
],
"created_at": "2026-04-10T16:05:00Z",
"completed_at": "2026-04-10T16:09:50Z"
},
"request_id": "req_gmbs002"
}Parameter request
product_imagesTipe: array[object]Wajib
Array of image objects. Each object contains "image" (URL or base64), optional "back_image", and optional "image_side". API batch caps (5× the dashboard limit): Free/Hobby/Hobby v2 5, Seller/Starter 10, Brand/Pro 25, Studio/Premium 50.
angleTipe: string
Applied to all images. "side" reconstructs the side view from each front photo (plus back_image when provided) — see the single-generate endpoint for details.
= straight
Nilai:straightbacksidestyleTipe: string
Applied to all images.
= 3d
Nilai:3dflat_laybackground_colorTipe: string
Applied to all images.
= white
Nilai:whitegraybeigeblackresolutionTipe: string
Applied to all images. "2K" = 4 credits each. "4K" = 5 credits each. 4K is produced natively in a single generation per item — 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
Nilai:2K4Kaspect_ratioTipe: string
Applied to all images. Note: 1:1 is not available at 4K resolution — 1:1 combined with 4K returns 400.
= 3:4
Nilai:3:41:14:39:1616:9user_instructionTipe: string
Batch-level: one note applied to every item. Optional free-form string, 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_idTipe: string
Applied to all images. Brand label UUID returned by the Brand Labels API. API v1 request fields use snake_case; use brand_label_id.
Error
- 400
invalid_request_error - The request is malformed or contains invalid parameters.
- 401
authentication_error - The API key is missing, invalid, or expired.
- 402
insufficient_credits_error - Your account does not have enough credits.
- 404
not_found_error - The requested resource does not exist.
- 409
conflict_error - The request conflicts with current state — e.g. your concurrent-batch cap is reached.
- 429
rate_limit_error - Too many requests. Slow down and retry.Retry-After: 30
- 500
api_error - An internal server error occurred. Retry later.
Batasan
- 600 request per menit per API key (Fixed window; batasannya sama di setiap paket)
- Respons 429 menyertakan Retry-After: 30 detik
- Hingga 10 MB per gambar
- Format: JPEG, PNG, WebP
- Batch konkuren per paket: Free 1 · Hobby 2 · Seller 3 · Brand 4 · Studio 6
- Hanya polling — API tidak mengirim webhook.
Satu request, sederet pakaian
Susun array, kirim sekali, lakukan polling batch, unduh setiap item.
Langkah 1
Buat API key
Batch ghost mannequin menggunakan kredensial yang sama dan saldo credit yang sama seperti setiap kapabilitas Photta lainnya.
Langkah 2
Susun array gambar
`product_images` menerima satu objek per pakaian: `image`, ditambah `back_image` dan `image_side` opsional. Batas batch API adalah 5 gambar pada Free dan Hobby, 10 pada Seller, 25 pada Brand, dan 50 pada Studio.
Langkah 3
POST batch
POST `/api/v1/ghost-mannequin/batch`. `angle`, `style`, `background_color`, `resolution`, dan `aspect_ratio` berlaku untuk setiap item, dan `user_instruction` menambahkan satu instruksi hingga 400 karakter untuk semuanya. Credits untuk seluruh batch direservasi sebelum item pertama dirender.
Langkah 4
Lakukan polling pada batch
GET `/api/v1/ghost-mannequin/batch/:id` setiap 3 detik. Body memuat `total`, `completed`, `failed`, dan rincian per item, sehingga Anda dapat mulai mengunduh sebelum pakaian terakhir selesai diproses.
Langkah 5
Unduh setiap hasil
Setiap item yang selesai membawa `output_url`, `credits_used`, dan durasinya sendiri. Item yang gagal akan mengembalikan credits yang telah direservasi dan dilaporkan dalam `credits_refunded`.
Endpoint yang sama dalam Node.js, Python, dan cURL
Node.js
API batch ghost mannequin di Node.js
Panggil aPI batch ghost mannequin Photta dari backend Node.js dengan fetch native. Tidak memerlukan SDK: simpan kunci Anda, kirim job, lakukan polling untuk hasilnya.
BacaPython
API batch ghost mannequin di Python
Panggil aPI batch ghost mannequin Photta di Python dengan library requests. Wrapper tiga puluh baris, ramah asinkron via httpx, bekerja di Django, FastAPI, dan Celery.
BacacURL
API batch ghost mannequin dengan cURL
Panggil aPI batch ghost mannequin Photta langsung dari shell menggunakan cURL. Kirim, lakukan polling, unduh — setiap cuplikan kode dapat dipadukan dengan jq untuk pipeline berbasis skrip.
Baca
Pertanyaan yang diajukan developer sebelum menjalankan batch
Apa nilai tambah dari endpoint batch?
Endpoint ini menerima array foto pakaian dalam satu request dan memprosesnya di latar belakang. Anda mendapatkan satu id batch untuk tampilan agregat dan satu id item per foto, alih-alih melacak puluhan tugas terpisah.
Berapa banyak gambar yang muat dalam satu batch?
Batas batch API adalah 5 gambar pada Free dan Hobby, 10 pada Seller, 25 pada Brand, dan 50 pada Studio — lima kali lipat batas dasbor. Batch yang lebih besar dari batas paket Anda akan mengembalikan 400.
Bagaimana credits ditagihkan untuk sebuah batch?
Seluruh batch direservasi di muka: jumlah gambar dikalikan dengan harga per gambar, 4 credits pada 2K atau 5 pada 4K. Jika saldo tidak mencukupi reservasi, request mengembalikan 402 dan tidak ada yang dirender.
Apa yang terjadi jika satu item gagal?
Sisa batch tetap dilanjutkan. Body batch melaporkan `failed` bersamaan dengan `completed`, dan credits yang direservasi untuk item yang gagal akan dikembalikan dalam `credits_refunded`.
Berapa banyak batch yang dapat berjalan bersamaan?
Batch berjalan konkuren dibatasi per paket: Free 1, Hobby 2, Seller 3, Brand 4, dan Studio 6. Mengirim melebihi batas akan mengembalikan 409 — lakukan polling pada batch yang aktif hingga selesai, lalu kirim ulang.
Bagaimana cara melakukan polling pada batch?
GET `/api/v1/ghost-mannequin/batch/:id` setiap 3 detik untuk status agregat, atau lakukan polling pada item tunggal mana pun di path status ghost mannequin standar ketika Anda membutuhkan detail per pakaian.
Kapabilitas terkait
Kapabilitas
Ghost mannequin API untuk foto produk hollow-man
Endpoint AI ghost mannequin. Hapus manekin dari foto pakaian dan pertahankan detail bagian dalam. 3D atau flat-lay, pemrosesan batch, 4 credits pada 2K.
Lihat endpointKapabilitas
Virtual try-on API untuk pakaian
REST API yang memakaikan pakaian pada manekin AI. Asinkron, waktu generasi 1.5–4 menit, 5 credits pada 2K, 6 pada 4K. Contoh cURL, Node.js, dan Python.
Lihat endpointBangun
Otomatiskan ekstraksi ghost mannequin untuk katalog Anda
Resep otomatisasi katalog harian: ambil pembaruan produk kemarin, kirim secara batch ke API ghost-mannequin Photta, lakukan polling pada parent batch, simpan ke database Anda.
Lihat endpointBandingkan
Photta vs Pixazo — pipeline first-party atau agregator model
Perbandingan Photta vs Pixazo: pipeline fashion pihak pertama vs agregator multi-model. Endpoint, latensi, paket gratis, dan kompromi. Bersumber dari data 2026-04-19.
Lihat endpointQuickstart
Gambar Photta pertama dalam waktu kurang dari lima menit.
Daftar, buat API key, jalankan pemanggilan cURL pertama Anda, lakukan polling hingga selesai, simpan hasilnya. Lima langkah, terdokumentasi end-to-end.
Lihat endpointReferensi
Error Photta API
Daftar lengkap tipe error Photta API beserta kode statusnya, format body error, dan kegagalan mana saja yang layak dicoba ulang.
Lihat endpointReferensi
Rate limit Photta API
Rate limit Photta API, window-nya, header Retry-After, interval polling, serta batas konkurensi per paket, seluruhnya dirujuk dari dokumentasi API.
Lihat endpoint
Setiap angka di halaman ini bersumber dari dokumentasi API Photta · diperiksa
Coba API dalam lima menit
Buat Photta API key, tempel cuplikan cURL di atas, dan Anda akan mendapatkan gambar on-model pertama sebelum kopi selesai diseduh.
- 1.5–4 min per image
- 4 credits pada 2K · 5 credits pada 4K
- async, polling
- 600 requests/min
- Bearer key