Get Batch Execution Status

Beta
Aggregate lifecycle status of every run launched under a batch handle from `POST /aop/execute-batch`: counts per canonical run status, an `is_complete` flag, and a cursor-paged list of runs. Poll this once per batch instead of `GET /threads/{thread_id}/status` per thread; fetch a run's messages from the thread status endpoint only once it is terminal. This read never loads transcripts.

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

batch_idstringRequiredformat: "^batch_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

Batch handle returned by execute-batch

Query parameters

statusstringOptionalDefaults to terminal

Which runs to list: terminal (completed/failed/canceled), active (everything else) or all. Counts always cover the whole batch.

cursorstring or nullOptional

next_cursor from the previous page

limitintegerOptional1-1000Defaults to 200
Maximum runs to return in this page

Response

Batch status
batch_idstring
The batch handle that was checked
countsobject
Runs per canonical status
is_completeboolean
True when every run in the batch has finished
runslist of objects

One page of runs matching the status filter, ordered by cursor

terminalinteger

Runs that have finished (completed + failed + canceled)

totalinteger
Runs launched into the batch so far
next_cursorstring or nullOptional

Opaque cursor for the next page of runs; null when this page is the last one. Pass it as cursor on the next call.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error