Batches
Batches group related executions together. In AutoRetouch, batches appear as “orders”.
Creating Batches
Section titled “Creating Batches”Batches are created implicitly by setting batch labels when creating executions:
{ "labels": { "autoretouch_batch_id": "29532657-c82b-427a-8b6a-ded598d696a9", "autoretouch_batch_name": "Spring Collection", "autoretouch_batch_createdAt": "2024-02-08T09:09:01.960Z" }}All executions with the same autoretouch_batch_id will be grouped together.
List Batches
Section titled “List Batches”Get all batches for an organization.
GET https://api.autoretouch.com/v1/batchQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
organization | string | - | Organization ID (recommended) |
batchId | string | - | Filter to a specific batch |
limit | integer | 50 | Maximum results per page |
offset | integer | 0 | Number of results to skip |
Request
Section titled “Request”# List all batchescurl -X GET "https://api.autoretouch.com/v1/batch?organization={organizationId}" \ -H "Authorization: Bearer {accessToken}"
# Get a specific batchcurl -X GET "https://api.autoretouch.com/v1/batch?organization={organizationId}&batchId={batchId}" \ -H "Authorization: Bearer {accessToken}"import requests
# List all batchesresponse = requests.get( "https://api.autoretouch.com/v1/batch", params={"organization": organization_id}, headers={"Authorization": f"Bearer {access_token}"})data = response.json()
for batch in data["entries"]: print(f"{batch['name']}: {batch['executions']} images, {batch['price']} credits")
# Get a specific batchresponse = requests.get( "https://api.autoretouch.com/v1/batch", params={ "organization": organization_id, "batchId": batch_id }, headers={"Authorization": f"Bearer {access_token}"})Success Response (200)
Section titled “Success Response (200)”{ "entries": [ { "id": "b243f2da-99a6-4d0c-8138-9186c19486bf", "name": "ORDER 2026-02-17 11:43:16", "author": "google-oauth2|118231812295695726244", "createdAt": "2026-02-17T10:43:16.574Z", "executions": 13, "price": 195, "workflowId": "482a88cb-9e49-4241-ad81-ce8648a8576b", "workflowName": "RMBG + Fill with Color" } ], "total": 1}Batch Object
Section titled “Batch Object”| Field | Type | Description |
|---|---|---|
id | string | Batch ID (UUID) |
name | string | Batch name |
author | string | User ID who created the batch |
createdAt | string | Creation timestamp (ISO 8601) |
executions | integer | Number of executions in the batch |
price | integer | Total credits charged |
workflowId | string | Workflow ID used for the batch |
workflowName | string | Workflow display name |
Best Practices
Section titled “Best Practices”Batch Labels
Section titled “Batch Labels”| Label | Required | Description |
|---|---|---|
autoretouch_batch_id | Yes | Unique identifier (UUID recommended) |
autoretouch_batch_name | Yes | Human-readable name |
autoretouch_batch_createdAt | Yes | ISO 8601 timestamp |
Grouping Strategies
Section titled “Grouping Strategies”- By SKU: Group all images for a single product together
- By session: Group images from a single photo shoot
- By order: Group images from a customer order
Benefits of Batching
Section titled “Benefits of Batching”- Organization: Related images appear together in the AutoRetouch UI
- Quality checks: QA is performed at the batch level
- Tracking: Monitor progress of related images together
- Bulk download: Download all results for a batch at once in AutoRetouch