curl -X POST "https://api.genlook.app/tryon/v1/batches" \
-H "x-api-key: gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"customId": "look-1",
"products": [{ "externalId": "shirt-42" }],
"person": { "image": { "source": { "id": "ephemeral/customer/ttl-7d/..." } } }
},
{
"customId": "look-2",
"products": [{ "externalId": "dress-7" }],
"person": { "image": { "source": { "id": "ephemeral/customer/ttl-7d/..." } } }
}
]
}'
{
"batchId": "c4b1s2...",
"status": "RUNNING",
"itemCount": 2,
"completedCount": 0,
"failedCount": 0,
"reservedCredits": 1,
"chargedCredits": null,
"createdAt": "2026-10-07T09:00:00.000Z",
"expiresAt": "2026-10-07T13:00:00.000Z",
"items": [
{ "customId": "look-1", "generationId": "g1...", "status": "PENDING" },
{ "customId": "look-2", "generationId": "g2...", "status": "PENDING" }
],
"nextCursor": null
}
Batches
Create Batch
Submit up to 500 try-ons at half a credit each.
POST
/
tryon
/
v1
/
batches
curl -X POST "https://api.genlook.app/tryon/v1/batches" \
-H "x-api-key: gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"customId": "look-1",
"products": [{ "externalId": "shirt-42" }],
"person": { "image": { "source": { "id": "ephemeral/customer/ttl-7d/..." } } }
},
{
"customId": "look-2",
"products": [{ "externalId": "dress-7" }],
"person": { "image": { "source": { "id": "ephemeral/customer/ttl-7d/..." } } }
}
]
}'
{
"batchId": "c4b1s2...",
"status": "RUNNING",
"itemCount": 2,
"completedCount": 0,
"failedCount": 0,
"reservedCredits": 1,
"chargedCredits": null,
"createdAt": "2026-10-07T09:00:00.000Z",
"expiresAt": "2026-10-07T13:00:00.000Z",
"items": [
{ "customId": "look-1", "generationId": "g1...", "status": "PENDING" },
{ "customId": "look-2", "generationId": "g2...", "status": "PENDING" }
],
"nextCursor": null
}
Submits up to 500 try-ons that run within 4 hours at half a credit each. See Batches for pricing and limits. Returns
202 with the batch and its first page of items.
Body
BatchItem[]
required
1 to 500 try-ons. Each item is a Create Try-On body (
products, person, externalUserId, output), JSON only, plus:string
Your own id for the item, up to 200 characters. Returned with its result.
curl -X POST "https://api.genlook.app/tryon/v1/batches" \
-H "x-api-key: gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"customId": "look-1",
"products": [{ "externalId": "shirt-42" }],
"person": { "image": { "source": { "id": "ephemeral/customer/ttl-7d/..." } } }
},
{
"customId": "look-2",
"products": [{ "externalId": "dress-7" }],
"person": { "image": { "source": { "id": "ephemeral/customer/ttl-7d/..." } } }
}
]
}'
{
"batchId": "c4b1s2...",
"status": "RUNNING",
"itemCount": 2,
"completedCount": 0,
"failedCount": 0,
"reservedCredits": 1,
"chargedCredits": null,
"createdAt": "2026-10-07T09:00:00.000Z",
"expiresAt": "2026-10-07T13:00:00.000Z",
"items": [
{ "customId": "look-1", "generationId": "g1...", "status": "PENDING" },
{ "customId": "look-2", "generationId": "g2...", "status": "PENDING" }
],
"nextCursor": null
}
Errors
| Code | When |
|---|---|
BATCH_NOT_ALLOWED | The account has never bought credits or a plan. |
INSUFFICIENT_CREDITS | Not enough credits to hold half a credit per item. Nothing is created. |
INVALID_IMAGE_INPUT | A file upload in an item. The message names the item. |
VALIDATION_FAILED | The body does not match, or more than 500 items. |
Was this page helpful?

