Batch events after a cursor — JSON polling, or server-sent events with `Accept text/event-stream`
const url = 'http://localhost:8300/v1/studio/batches/example/events?since=0';const options = { method: 'GET', headers: {'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8300/v1/studio/batches/example/events?since=0' \ --header 'Authorization: Bearer <token>' \ --header 'x-api-key: <x-api-key>'Like the session events, numbered by a per-batch seq: JSON gives the events with seq > since (at most 500) and last_seq; SSE replays seq > since (or Last-Event-ID, which wins), then streams, id: = seq, event: = batch, row or chat, data: = the BatchEvent JSON, : keep-alive every 15 s. Studio appends a row event (the whole row) whenever a row changes and a batch event (the whole batch, counts included) whenever the batch’s status, control or counts change. Step progress of a row’s run is in the session’s events (session_id).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Batch UUID (malformed = 404)
Query Parameters
Section titled “Query Parameters”Cursor — the last seq the client has
Header Parameters
Section titled “Header Parameters”SSE resume: the last id: received (an integer)
Responses
Section titled “Responses”Events
object
object
Per-batch cursor
object
The title in the batch’s snapshot
The session its runs are in; null after that session was deleted
Queued: stored, the engine has not started it; running; waiting: the engine reports running but every row that has not ended is waiting on a gate (pick to continue); paused (reason says why: by you, three rows in a row failed with one error, or the engine restarted: press Resume); done: every row ended (some may have failed); failed: the engine could not run it at all (reason); stopped: by Stop. events, except queued.
What the owner asked for last (Pause, Resume, Stop); status follows once the engine confirms. While pause or paused, the dispatcher holds the batch’s queued runs
Why it is paused or failed; null otherwise
Rows by BatchRow.status; queued, running, waiting, succeeded, failed and cancelled add up to total
object
Rows parked on a gate (“waiting for a pick”)
The engine first reported running
Done, failed or stopped
A batch of a pipeline: the pipeline (it may be deleted since); absent or null for a batch of one workflow, whose workflow_* then describe it. For a pipeline batch workflow_id / workflow_title are its first step’s
With pipeline_id: the title in the batch’s snapshot
With pipeline_id: the version it was submitted with
With pipeline_id: the collection its output node names (the first output, by node id)
A pipeline batch: its worst case per row at Submit
object
Generation runs: Σ over steps of seeds × branches × visits (branches: a fanned-out step’s list max, else 1)
Judge, write and decide visits (each one ask run, at most 2 tries; a re-ask after a failed check is a second run)
Agent visits × max_tool_calls
Requests to remote providers (a re-ask included), per row; the director’s chat is per batch (egress)
Their token bound per row
With a director only, whatever its model source: its chat’s worst case per batch (not per row): calls max_wakes × max_turns × 2 (a re-ask included; local models: queue items), tokens max_wakes × max_tokens, tool_calls max_wakes × max_tool_calls
object
When an agent declares rows.add: the most rows agents may add to a batch (100), each with the per-row worst case
A pipeline batch: judge, write and decide node id → the ask workflow it runs (resolved at Submit, in the snapshot)
object
Made by “Run again” of this batch
A pipeline batch: what leaves the machine, as at Submit
One node whose calls leave this process for a model server: exactly what is sent (Submit shows it). fields: the parts of the prompt, by name: instruction, question, routes, each from source, items, tool:<tool> (tool results go back to the model), chat (the director’s chat), input:<field> (a custom node’s)
object
Server: a local server (its calls are queue items); remote: a remote provider; network: a custom node that calls the network
The worst case per row (a re-ask included)
object
A pipeline batch: local servers’ reserved memory
A local server the pipeline uses, and the memory the host reserves for it (always, while the provider is enabled)
object
object
The director agent node
Idle: asleep until a message or a row ends; waiting: its turn’s call is queued or held (Pause); thinking: a call or its tools run; off: the batch ended or max_wakes reached (POST …/chat is 409)
object
Requests sent (re-asks included; network retries not)
Tokens the providers reported
Transport failures (retried); counted apart from answers and verdicts
A sequence’s Re-render (pipeline_id null, pipeline_title “Re-render · pipeline_version = the revision); absent or null otherwise
object
object
1; +1 on every Retry
What the row runs with: the base inputs, then its own values, then its seed (a pipeline batch: <inputs node>.<input> keys)
object
Null only for a seed (random) or an image, media, span or voice param left empty
An Image value: a take of the caller, by id. The only way a client names an image; never an object key or URL. Studio checks it when it creates the run.
object
A Media value: a video or audio take of the caller, by id. in / out (seconds of the take’s own time; studio snaps them: a video’s frames, audio to the millisecond) only on a param with trim: the part it reads (absent: 0 / the take’s end). Never an object key or URL.
object
A span param’s value: a time range on the workflow’s one video media source, in that take’s own seconds (Retake: the stretch to regenerate)
object
A voice value: a saved voice the caller can use, by id: one of the caller’s own (a UUID) or a starter voice (<family>/<pack voice id>). Never a key, a URL or the voice’s fields; studio resolves it when it creates the run.
object
One item of a rows value: field (the param’s item) → value
object
Null only for a seed (random) or an image, media, span or voice param left empty
An Image value: a take of the caller, by id. The only way a client names an image; never an object key or URL. Studio checks it when it creates the run.
object
A Media value: a video or audio take of the caller, by id. in / out (seconds of the take’s own time; studio snaps them: a video’s frames, audio to the millisecond) only on a param with trim: the part it reads (absent: 0 / the take’s end). Never an object key or URL.
object
A Lora value (a rows item field of ref kind Lora): a LoRA the caller can use, by id; never a path, key or URL. Studio checks it when it creates the run.
object
A voice value: a saved voice the caller can use, by id: one of the caller’s own (a UUID) or a starter voice (<family>/<pack voice id>). Never a key, a URL or the voice’s fields; studio resolves it when it creates the run.
object
A batch of one workflow: the row’s looks (its cell, else BatchCreate.looks); absent or empty = none
Queued until its run starts (also while the run waits in the queue or is held), running while it runs, waiting while parked on a gate, then the row’s end
The current attempt’s run (a pipeline row: its latest run); null before it has one
The current attempt’s takes (deleted ones left out); a pipeline row: the takes its output received, once it succeeded
Set when failed
Its run reported running
Pipeline batches: the node the row is at now (parked on, or running); null when ended or not started
object
The gate node id
; absent = gate
A judge: its pick, pre-selected ([] when no take passed)
Which visit of the gate (1 + times its loop went round)
Pick 1 to keep of the candidates
The takes to pick from (the gate’s step’s latest takes)
Pipeline batches: the run table’s cells, one per node the row reached, in the order first reached; absent for a batch of one workflow
object
The pipeline node id
One per visit (loop attempts stacked), oldest first
object
A step attempt: its runs’ state (queued while none of them has started); a gate attempt: waiting, picked or rejected; an output: succeeded. write, decide: queued / running, then succeeded or failed; memory: succeeded
A step: its runs, by seed index
A step: its takes; a gate: the picked ones; an output: what it received
A gate: the takes it offered
A step: the seed of each run, by seed index
A step: the runs’ time on their hosts, summed (started to finished); null until one finished
A judge attempt (the run table’s judged cell: “picked 1 of 4”, the first failed criterion; the attempts side by side with each take’s reason)
object
The best take’s first false must; null when it passed
Suggest: the user’s pick equalled the suggestion; null before a pick and in Auto
object
Every criterion’s answer, musts then nices
A decide: the route taken
object
A fanned-out step: one attempt per (visit, branch); branch = the item index
An agent attempt (4 turns · 6 tools · 14 shots)
object
Its list’s length (0 without one)
A judge with a branch or a decide: its capped loop for the cell’s “retried
object
The node the cap sends the row to
One new chat message (the user’s, the director’s or a notice); the director’s state rides on batch events (Batch.director)
object
One message of a batch’s director chat
object
Notice: the director’s system line (a row it added or changed was rejected, with the reason; a cap ended its wake)
Director and notice: the wake it came from; null for the user’s
Director: the wake’s tool calls
One tool call an agent made, as run
object
object
Rows it added or changed in that wake
Next since (unchanged when the page is empty)
Example
{ "events": [ { "type": "batch", "data": { "status": "queued", "control": "run", "egress": [ { "where": "server", "thumbnails": 0 } ], "director": { "state": "idle" } } } ]}Missing or invalid x-api-key (Kong), or missing/invalid/expired/revoked bearer token
object
Example generated
{ "detail": "example"}Not found
object
Example generated
{ "detail": "example"}Invalid input
object
Example generated
{ "detail": "example"}Retryable
object
Example generated
{ "detail": "example"}