Skip to content
Alphahelmstudio is early software: things will change, and some will break.What's newReport an issue

Run one workflow once per row of inputs, as one unattended job

POST
/v1/studio/batches
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).

Media typeapplication/json
One of:

Exactly one of workflow_id (a batch of one workflow) or pipeline_id (a batch of a saved pipeline)

object
workflow_id
required
string
pipeline_id

One of the caller’s pipelines; its inputs are the columns

string format: uuid
session_id

Absent = a new session titled like the batch

string format: uuid
title

Trimmed; empty or missing = “ × ”

string
<= 200 characters
inputs

Base inputs for every row; missing = {}

object
key
additional properties
Any of:

Null only for a seed (random) or an image, media, span or voice param left empty

string | number | boolean | null
rows
One of:
object
lines
required

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
param
required
string
/^[a-z][a-z0-9_]*\.[a-z][a-z0-9_]*$/
values
required
Array<string>
>= 1 items <= 500 items
seeds

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
count
required
integer
>= 1 <= 8
start

Absent = drawn at random at Submit and stored

integer
<= 9007199254740991
looks

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)

Array<string>
<= 8 items

The batch, queued

Media typeapplication/json
object
id
required
string format: uuid
title
required
string
>= 1 characters <= 200 characters
workflow_id
required
string
workflow_title
required

The title in the batch’s snapshot

string
session_id
required

The session its runs are in; null after that session was deleted

string | null format: uuid
status
required

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.

string
Allowed values: queued running waiting paused done failed stopped
control
required

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

string
Allowed values: run pause stop
reason
required

Why it is paused or failed; null otherwise

string | null
counts
required

Rows by BatchRow.status; queued, running, waiting, succeeded, failed and cancelled add up to total

object
total
required
integer
>= 1 <= 500
queued
required
integer
running
required
integer
waiting

Rows parked on a gate (“waiting for a pick”)

integer
succeeded
required
integer
failed
required
integer
cancelled
required
integer
created_at
required
string format: date-time
started_at
required

The engine first reported running

string | null format: date-time
finished_at
required

Done, failed or stopped

string | null format: date-time
pipeline_id

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

string | null format: uuid
pipeline_title

With pipeline_id: the title in the batch’s snapshot

string | null
pipeline_version

With pipeline_id: the version it was submitted with

integer | null
>= 1
collection

With pipeline_id: the collection its output node names (the first output, by node id)

string | null
bounds

A pipeline batch: its worst case per row at Submit

object
runs
required

Generation runs: Σ over steps of seeds × branches × visits (branches: a fanned-out step’s list max, else 1)

integer
<= 64
llm_calls
required

Judge, write and decide visits (each one ask run, at most 2 tries; a re-ask after a failed check is a second run)

integer
<= 32
tool_calls

Agent visits × max_tool_calls

integer
remote_calls

Requests to remote providers (a re-ask included), per row; the director’s chat is per batch (egress)

integer
remote_tokens

Their token bound per row

integer
chat

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
calls
required
integer
tokens
required
integer
tool_calls
required
integer
added_rows

When an agent declares rows.add: the most rows agents may add to a batch (100), each with the per-row worst case

integer
>= 1 <= 100
models

A pipeline batch: judge, write and decide node id → the ask workflow it runs (resolved at Submit, in the snapshot)

object
key
additional properties
string
memory
One of:
object
examples
required
integer
notes
required
integer
taken_at
required
string format: date-time
again_of

Made by “Run again” of this batch

string | null format: uuid
same_decisions
boolean
egress

A pipeline batch: what leaves the machine, as at Submit

Array<object>

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
node
required
string
where
required

Server: a local server (its calls are queue items); remote: a remote provider; network: a custom node that calls the network

string
Allowed values: server remote network
provider
required
string | null
model
required
string | null
fields
required
Array<string>
<= 32 items
thumbnails
required
integer
0
per_row
required

The worst case per row (a re-ask included)

object
calls
required
integer
tokens
required
integer
chat
required
One of:
object
calls
required
integer
tokens
required
integer
reserved

A pipeline batch: local servers’ reserved memory

Array<object>

A local server the pipeline uses, and the memory the host reserves for it (always, while the provider is enabled)

object
provider
required
string
host
required
string
memory_gb
required
number
>= 0.5
director
One of:
object
node
required

The director agent node

string
state
required

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)

string
Allowed values: idle waiting thinking off
wakes
required
integer
max_wakes
required
integer
>= 1 <= 500
remote
One of:
object
calls
required

Requests sent (re-asks included; network retries not)

integer
tokens
required

Tokens the providers reported

integer
network_failures
required

Transport failures (retried); counted apart from answers and verdicts

integer
max_calls
required
integer
>= 1
max_tokens
required
integer
>= 1
timeline_id

A sequence’s Re-render (pipeline_id null, pipeline_title “Re-render · ”, pipeline_version = the revision); absent or null otherwise

string | null format: uuid

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

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Not found

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

The resource’s state forbids this

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Invalid input

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Retryable

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}