Extract several PDP photographs, sharing models and locations between them
const url = 'https://example.com/v1/pdp-batch-extractions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"photos":[{"pdp_image_public_id":"01JUPLOAD0000000000000000A","product_name":"Emerald Silk Saree"},{"pdp_image_public_id":"01JUPLOAD0000000000000000B","product_name":"Ivory Cotton Kurta"},{"pdp_image_public_id":"01JUPLOAD0000000000000000C"},{"pdp_image_public_id":"01JUPLOAD0000000000000000D"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/pdp-batch-extractions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "photos": [ { "pdp_image_public_id": "01JUPLOAD0000000000000000A", "product_name": "Emerald Silk Saree" }, { "pdp_image_public_id": "01JUPLOAD0000000000000000B", "product_name": "Ivory Cotton Kurta" }, { "pdp_image_public_id": "01JUPLOAD0000000000000000C" }, { "pdp_image_public_id": "01JUPLOAD0000000000000000D" } ] }'Dispatch a batch PDP extraction: the same read-a-photograph-back-into-its-parts journey as POST /v1/pdp-extractions, over several photographs from one shoot.
Before extracting, one pass works out which of your photographs show the same model and which were shot in the same place. Each shared model and each shared location is then extracted once and reused, instead of once per photograph — so a shoot of eight photographs across two sets with two models costs four extractions of those parts rather than sixteen. The garment and the photography recipe are still read from every photograph, because those are what differ.
Send at most ten photographs. Charged per photograph at the single-extraction rate: the saving is in what we spend, and the price is the one you were quoted. Supply grouping yourself to override what we would work out.
Returns 202 with the PARENT job_id. Each photograph also gets its own child job, so GET /v1/jobs shows per-photograph progress. Partial success is normal at both levels: one arm of one photograph can produce nothing while everything else lands, and one photograph failing does not fail its siblings.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”POST /v1/pdp-batch-extractions — several photographs from one shoot (TRI-49).
POST /v1/pdp-extractions reads one photograph into four entities. This does
the same for a batch, and first works out which photographs share a model or a
location so each of those is extracted ONCE rather than once per photograph. A
shoot of eight photographs across two sets with two models costs four
extractions of those parts instead of sixteen.
Charged per photograph, at the single-extraction rate. The saving is in what we spend, and the price is the one you were quoted before you submitted.
Order matters only in that it fixes the indices grouping refers to. Send at
most ten photographs per batch: the grouping pass compares every photograph
against every other in a single call, and that is the input limit of the model
doing the comparing.
Ownership is absent by design and extra="forbid" keeps it that way.
object
A caller-supplied grouping, which REPLACES the automatic one.
Two independent groupings rather than one list with flags, because the axes genuinely differ: several photographs can share a studio while only two of them share a model.
Send this when you already know how your own shoot was organised, or to correct what we proposed. It is taken at face value — you are the authority on your own photographs.
object
One group of photograph indices that share a person or a place.
object
0-based indices into photos.
Why they were grouped. Free text; not interpreted.
One group of photograph indices that share a person or a place.
object
0-based indices into photos.
Why they were grouped. Free text; not interpreted.
Examples
Four photographs from one shoot
{ "photos": [ { "pdp_image_public_id": "01JUPLOAD0000000000000000A", "product_name": "Emerald Silk Saree" }, { "pdp_image_public_id": "01JUPLOAD0000000000000000B", "product_name": "Ivory Cotton Kurta" }, { "pdp_image_public_id": "01JUPLOAD0000000000000000C" }, { "pdp_image_public_id": "01JUPLOAD0000000000000000D" } ]}Responses
Section titled “Responses”Accepted — parent job queued. Poll /v1/jobs/{job_id}.
Returned synchronously from any POST /v1/{name} (202).
object
26-char ULID — correlates with the row in credit_operations.
Studio’s job status at submit time. Almost always NOT_STARTED in this 202.
Credits deducted from the calling client. Refunded automatically on any failure path.
Example
{ "request_id": "01JREQREQREQREQREQREQREQ00", "job_id": "01JOBJOBJOBJOBJOBJOBJOBJOB0", "status": "NOT_STARTED", "credits_cost": 10}Insufficient credit balance — the request cost exceeds the client’s balance. No job created.
Example
{ "error": { "code": "INSUFFICIENT_BALANCE", "message": "Account balance is below the cost of this request.", "request_id": "01JREQREQREQREQREQREQREQ00" }}Request body failed validation (missing/invalid fields). No credits charged.
Example
{ "error": { "code": "VALIDATION_ERROR", "message": "Request body or parameters failed validation.", "request_id": "01JREQREQREQREQREQREQREQ00" }}Per-credential rate limit exceeded. Retry after a short backoff.
Example
{ "error": { "code": "RATE_LIMITED", "message": "Rate limit exceeded; try again shortly.", "request_id": "01JREQREQREQREQREQREQREQ00" }}