> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genlook.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Batch

> Submit up to 500 try-ons at half a credit each.

Submits up to 500 try-ons that run within 4 hours at half a credit each. See [Batches](/docs/tryon-api/batches) for pricing and limits. Returns `202` with the batch and its first page of items.

## Body

<ParamField body="items" type="BatchItem[]" required>
  1 to 500 try-ons. Each item is a [Create Try-On](/docs/tryon-api/endpoints/create-try-on#body) body (`products`, `person`, `externalUserId`, `output`), JSON only, plus:
</ParamField>

<ParamField body="items[].customId" type="string">
  Your own id for the item, up to 200 characters. Returned with its result.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  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/..." } } }
        }
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 202 theme={null}
  {
    "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
  }
  ```
</ResponseExample>

## 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. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.