Skip to main content
POST
Start a batch

Authorizations

X-API-Key
string
header
required

Your AI calling API key (vak_call_…). Authorization: Bearer <key> also works.

Headers

Idempotency-Key
string

Retrying the same request with the same key returns the first response (200, idempotent_replay: true) instead of queueing the calls again; a different request is refused (409 idempotency_key_reused), and a retry while the first request is still running gets 409 request_in_progress. At most 251 characters. Honoured for 24 hours.

Maximum string length: 251

Body

application/json
agent_id
string
required

Default agent for every row.

calls
object[]
required
Required array length: 1 - 1000 elements
test
boolean
default:false

Response

Replay: a batch with this Idempotency-Key already exists; the first response's calls and rejected rows are returned (idempotent_replay: true) and nothing is placed.

id
string
Example:

"batch_2b9e0c1d4f6a8e7c5b3a1d0f"

object
string
Allowed value: "batch"
agent_id
string
test
boolean
accepted_count
integer
rejected_count
integer
calls
object[]
rejected
object[]
idempotent_replay
boolean

true when this is the batch created by an earlier request with the same Idempotency-Key.