v1

latestOpenAPI 3.0.0raw.githubusercontent.com2026-05-043812.3 KB
Batches

Create a batch (Phase 1)

Phase 1 of 2-phase batch API. Creates a batch record and optionally blocks the parent run for batchTriggerAndWait. After creating a batch, stream items via POST /api/v3/batches/{batchId}/items.

post/api/v3/batches

Request body

runCountinteger required

Expected number of items in the batch. Must be a positive integer.

parentRunIdstring

Parent run ID (friendly ID) for batchTriggerAndWait.

resumeParentOnCompletionboolean

Whether to resume parent on completion. Set to true for batchTriggerAndWait.

idempotencyKeystring

Idempotency key for the batch. If provided and a batch with this key already exists, the existing batch will be returned.

Response

Batch successfully created

idstring required

The batch ID (friendly ID). Use this to stream items via POST /api/v3/batches/{batchId}/items.

runCountinteger required

The expected run count.

isCachedboolean required

Whether this response came from a cached/idempotent batch.

idempotencyKeystring

The idempotency key if provided.