Run one workflow once per row of inputs, as one unattended job
const url = 'http://localhost:8300/v1/studio/batches';const options = { method: 'POST', headers: { 'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"workflow_id":"example","pipeline_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","session_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","title":"example","inputs":{"prompt.text":"a red fox","echo.steps":20},"rows":{"lines":{"param":"prompt.text","values":["example"]}},"seeds":{"count":1,"start":1},"looks":["qwen-image/window-light"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8300/v1/studio/batches \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "workflow_id": "example", "pipeline_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "session_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "title": "example", "inputs": { "prompt.text": "a red fox", "echo.steps": 20 }, "rows": { "lines": { "param": "prompt.text", "values": [ "example" ] } }, "seeds": { "count": 1, "start": 1 }, "looks": [ "qwen-image/window-light" ] }'Submit checks everything before anything runs (any failure is 422 and nothing is stored): - workflow_id is a known workflow (unknown workflow <id>). - Rows are built from rows (lines, table or grid, below), then each is repeated seeds.count times; the result has 1 to 500 rows (a batch has 1 to 500 rows; this one has <n>). - Each row’s inputs = inputs (base), then the row’s values, then its seed; checked with the same rules as RunRequest.inputs. The detail names the input row (a line, a table row or a grid combination, from 1, before seed repetition): row 3: echo.steps: must be between 1 and 200. - Mentions resolve in every row against the caller’s elements now; the rows that cannot are all listed, in row order (at most 10, then ; and <n> more rows), joined by ; : row 3: prompt.text: unknown element @wolf; row 7: encode.refs: at most 10 images; 9 used, @fox +2 do not fit. A pipeline batch checks only unknown handles here, in every step’s graph as each input row’s run will resolve it (its row values, the step’s inputs and preset, the step workflow’s own params): row 3: step_1: prompt.text: unknown element @wolf; the rest is checked when each run is made (that row fails invalid). Studio keeps a copy of every element the batch mentions: its runs, Retry included, resolve against that copy, never against later edits or deletes. - Looks: a row’s looks are its looks cell (table column or grid axis looks; null = looks), else looks; they resolve with the mentions, the failing rows listed the same way (row 2: looks[1]: unknown look <id>). A pipeline batch takes its looks from its steps: looks or a looks column is 422 looks: a pipeline batch takes its looks from its steps; unknown or unfitting step looks are pipeline problems (unknown_look, look_fit: pipeline cannot run: …). Studio keeps a copy of every look a row or step uses, like the elements. - A live host has the workflow’s env and publishes the workflow (no live host for env <env>). use fewer or shorter rows). 409 when the caller already has 5 batches queued, running or paused (You have 5 unfinished batches; wait for one to finish.). The interactive cap of 100 open runs does not count batch-lane runs and does not stop a batch. 404 for a session_idthat is unknown or another user's.workflow_idmay name one of the caller's workflows: it must pass the graph rules (else 422workflow cannot run: …) and the snapshot is its version now (nodes with bypass, no positions, no studio). pipeline_id(instead ofworkflow_id) runs one of the caller's pipelines: unknown or another user's is 422 unknown pipeline ; any pipeline problem is 422 pipeline cannot run: <first problem’s message>. The columns are the pipeline's inputs, addressed ininputs, lines.param, table.columnsandgrid.axes[].param; every input needs a value in each row (row 3: inputs.prompt: a value is required) except a Seed (drawn); seeds repeats rows over the pipeline's one Seed input. The snapshot is the pipeline document now plus every workflow it uses; a live host is needed for every step's env; the 768 KB limit counts the snapshot too. On success studio stores the batch (queued, control: run) with its snapshot (the workflow as published now: the batch never runs a later version), every row (queued`, attempt 1, seeds drawn), a new session titled answers 202. once row 1 has succeeded, failed or been cancelled, every other row is released into the dispatcher’s batch lane (after interactive runs, round-robin between users).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Exactly one of workflow_id (a batch of one workflow) or pipeline_id (a batch of a saved pipeline)
object
One of the caller’s pipelines; its inputs are the columns
Absent = a new session titled like the batch
Trimmed; empty or missing = “
Base inputs for every row; missing = {}
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
object
Pasted lines: one row per value, set as param (a string, text or enum param; or an image param, or a rows param whose item has one Image field and no other required field: then each value is a take id and becomes {take_id}, or the one-item list [{<field>: {take_id}}]; else 422); clients drop blank lines. Gallery multi-select “Use in…” makes its batch this way
object
object
A CSV parsed by the client or the CLI: each cell typed by its param (clients convert CSV text with node_schemas); a null cell leaves that input unset for the row (a seed: random)
object
Param paths; looks (a batch of one workflow only) is the row’s looks: a cell is a list of look ids (null = BatchCreate.looks)
Each as long as columns (else 422)
object
Rows = the cartesian product of the axes, the first axis varying slowest
object
object
A param path, or looks (a batch of one workflow only: each value a list of look ids, the row’s looks)
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
Look ids, in order; a repeated id counts once (its first place)
Repeat each row count times with consecutive seeds start, start+1, … in the workflow’s one seed-type param (422 when it has none or several); these replace any value of it from inputs or the rows. Repeats sit next to each other (input row 1’s repeats are rows 1..count).
object
Absent = drawn at random at Submit and stored
A batch of one workflow: the looks of every row whose own looks cell (table column or grid axis looks) is absent or null; missing = []. A pipeline batch takes its looks from its steps (422 here)
Exactly one of workflow_id (a batch of one workflow) or pipeline_id (a batch of a saved pipeline)
object
One of the caller’s pipelines; its inputs are the columns
Absent = a new session titled like the batch
Trimmed; empty or missing = “
Base inputs for every row; missing = {}
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
object
Pasted lines: one row per value, set as param (a string, text or enum param; or an image param, or a rows param whose item has one Image field and no other required field: then each value is a take id and becomes {take_id}, or the one-item list [{<field>: {take_id}}]; else 422); clients drop blank lines. Gallery multi-select “Use in…” makes its batch this way
object
object
A CSV parsed by the client or the CLI: each cell typed by its param (clients convert CSV text with node_schemas); a null cell leaves that input unset for the row (a seed: random)
object
Param paths; looks (a batch of one workflow only) is the row’s looks: a cell is a list of look ids (null = BatchCreate.looks)
Each as long as columns (else 422)
object
Rows = the cartesian product of the axes, the first axis varying slowest
object
object
A param path, or looks (a batch of one workflow only: each value a list of look ids, the row’s looks)
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
Look ids, in order; a repeated id counts once (its first place)
Repeat each row count times with consecutive seeds start, start+1, … in the workflow’s one seed-type param (422 when it has none or several); these replace any value of it from inputs or the rows. Repeats sit next to each other (input row 1’s repeats are rows 1..count).
object
Absent = drawn at random at Submit and stored
A batch of one workflow: the looks of every row whose own looks cell (table column or grid axis looks) is absent or null; missing = []. A pipeline batch takes its looks from its steps (422 here)
Responses
Section titled “Responses”The batch, queued
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
Example
{ "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"}The resource’s state forbids this
object
Example generated
{ "detail": "example"}Invalid input
object
Example generated
{ "detail": "example"}Retryable
object
Example generated
{ "detail": "example"}