Run a workflow in the session
const url = 'http://localhost:8300/v1/studio/sessions/example/runs';const options = { method: 'POST', headers: { 'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"workflow_id":"example","inputs":{"prompt.text":"a red fox","echo.steps":20},"looks":["qwen-image/window-light"],"host":"example"}'};
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/sessions/example/runs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "workflow_id": "example", "inputs": { "prompt.text": "a red fox", "echo.steps": 20 }, "looks": [ "qwen-image/window-light" ], "host": "example" }'Resolves the graph (node schema defaults, then the workflow’s params, then inputs) and stores the run queued in lane interactive, attempt 1. The dispatcher releases it the fair order. 422 for an unknown workflow_id, an input key that is not a param of the workflow’s nodes, or a value of the wrong type, out of min/max or not in enum (the detail names the key, e.g. echo.steps: must be between 1 and 200). Image values (ImageRef, alone or in rows items) are 422 when the take is unknown, another user’s, deleted or a pending upload (encode.refs[2].image: take <id> not found, items numbered from 1 as in <image{n}>), not an image (… take <id> is not an image), without a size (… take <id> has no size), or its object is missing; a rows value outside min/max (encode.refs: at most 10 items), an item field not in item, or an image param left null (image.image: an image is required) is 422 too. of dev. speak.voice: a voice is required, speak.voice: voice (unknown, another user's, deleted, not a voice, or a starter voice no live host publishes),speak.voice: this workflow cannot use a designed voice(the voice fit's reason for that param),speak.voice: voice ; sends its clip, resolved like a media value even after its take was deleted (speak.voice: the clip of voice when its object is missing); in a workflow whose media is audio a mention in a prompt param isprompt.text: mentions are not read aloud; use a dialogue script. When no host is eligible (none live with the env and the workflow), the run is created already failedwith errorno live host for env (still 202) and nothing is sent. planned peak; body withhost(Create's Run on) is eligible on that host only: when it cannot take the run now the answer is 422 with the eligibility text and nothing is stored. on a host where the add-on is present: set to a host without it, 422; otherwise the run fails . addons, swapped by addons_withwhile a named input is wired or rows param holds a row: MiniMax H3'slora: turboneeds Turbo LoRA, with a reference Turbo Ref LoRA), with the same texts. 409 when the caller already has 100 runs queued or running (any session):You have 100 runs queued or running; wait for some to finish. A user workflow (workflow_ida UUID of the caller's; another user's is 422unknown workflow ) runs as it is stored now: studio checks it with the graph rules against the live palette and any problem is 422 workflow cannot run: <first problem’s message>; the run keeps that version (workflow_version) and the resolved graph as its snapshot, which the dispatcher sends however the workflow changes later. inputsmay also hold for a bypassable node; an input naming a param that is wired from upstream is 422 (sample.steps: wired from count.value; it cannot be set). @handlementions in the prompt params are expanded after every value is merged and checked, against the caller's elements now: 422prompt.text: unknown element @(each distinct one, joined by; ), encode.refs: at most 10 images; , prompt.text: at most 4000 characters once elements are added (. The resolved graph is what is checked for a host, stored as the run's snapshot, sent and recorded in the take; Run.inputs stays as requested. LoRA values (LoraRef, a Lora field of a rowsitem: thenode) are then resolved as the caller, items numbered from 1: 422lora.rows[2].lora: LoRA (unknown, another user's, deleted, pending or rejected, or a shared id no live host of the env lists: one message, nothing leaks),lora.rows[2].lora: LoRA (or(its model is unknown)), lora.rows[2].lora: LoRA ; strength and mode are checked by the run rules (lora.rows[1].strength: must be between 0 and 2), the row count by max (lora.rows: at most 8 items). A shared LoRA no live host of the env has at dispatch fails the run no live host for env . looksare applied in the same resolver as the mentions, after the values are merged and checked, and before the LoRA values are resolved, against the caller's looks and the live starter looks now;Run.lookskeeps them as requested. 422 (items from 1, in request order, each distinct one; with unknown handles those come first):looks[2]: unknown look (unknown, an element, another user's, deleted, or a starter look no live host publishes),looks[2]: look (the fit reasons, e.g.this workflow has no LoRA stack, LoRA , LoRA ), encode.refs: at most 10 images; 9 used, @fox +1, look Noir +1 do not fit, lora.rows: at most 8 LoRAs; 7 used, look Noir +2 do not fit, prompt.text: at most 4000 characters once elements and looks are added (. Video: a framesparam takes“auto”only when its schema declaresauto(elseduration.frames: auto length is not offered); an int with values/values_by takes only those (sample2.steps: must be one of 3); a rows param with an Image field and min ≥ 1 needs that many items at run (keyframes.images: at least 1 items); item fields left out take their defaults and the merged item is checked (encode.beats[1].text: must be between 1 and 500 characters); keyframe positions (position: seconds) are checked against the clip: keyframes.images[2].seconds: frame 50 is past the clip’s last frame 48, keyframes.images[2].seconds: frame 0 is already used by row 1; a LoRA a model's lora block lists as prefusedfor its variant:lora.rows[1].lora: LoRA ; a bake-only stack's mode: adapterfailsenum (lora.rows[1].mode: must be one of bake). with its wires first; a rows value while a not_withinput is wired is 422generate.refs: must stay empty while generate.first is wired; a media field of a rows item is resolved like a media param, items from 1: generate.videos[2].video: take , … take , generate.audios[1].audio: take , … take , … the part lasts 16.0 s; this input takes at most 15.0 s, … in must be before out, … out ; a missing media field generate.videos[1].video: a take is required; then the items together: generate.videos: the takes last 16.5 s in all; at most 15.0 s. The counts are the rows max (generate.videos: at most 3 items). the rows of media and before the voices are resolved, against the caller's elements and voices now; 422, each line's first problem, line order, joined by ; : dialogue.script line 3: write @name: text or @name (style): text, … line 3: nothing to say, … line 3: at most 600 characters (612), … line 3: the style is at most 200 characters (215), … line 3: unknown element @jon, … line 3: @jon has no voice(none, or one gone since),… line 4: voice Kai does not fit this workflow (this workflow cannot use a designed voice)(the voice fit of the lines' voice field, narrowed byonly); then dialogue.script: the script is empty(no line, and nolinesgiven),dialogue.lines: at most 40 lines, dialogue.lines: give the script or the lines, not both. Lines given directly (the Graph view, an agent) are resolved item by item like a voice param: dialogue.lines[2].voice: a voice is required, … voice , … this workflow cannot use a designed voice, … voice
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Session UUID (malformed = 404)
Request Bodyrequired
Section titled “Request Bodyrequired”object
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
The chosen looks, every group together, in the order the composer’s tiles list them (tile order, then pick order); missing = []. Resolved with the mentions
(Create’s Run on): run it on this host only, attempt 2 included; absent = automatic. A host that cannot take it now is a 422 at create
Responses
Section titled “Responses”The run: queued, or failed at once
object
As requested
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
The node id that is stepping
What the node is doing (loading transformer, sampling, decoding)
The id of one of the node’s NodeSchema phases it is in; only from a node with phases
Estimated seconds until the run finishes
Set when failed
By index; outputs whose take was deleted are left out
object
Object key, u/<owner_id>/runs/<run_id>/
Width and height null)
The image, or the MP4 of a video (served with Range)
Kind video only (absent for an image)
object
Frames / fps
The MP4 has an audio track (LTX: AAC 48 kHz stereo)
Signed, time-limited link; opaque
Kind audio only: its length and sample rate
object
An upload: as the client declared it
Absent for an upload (studio does not decode it)
A dialogue’s take only: one per line, in order; the stage draws them as line markers, the Timeline as ticks on the clip (sequence time = clip at + cue − clip in)
One dialogue line in its take (defs cue): line from 1, [start_s, end_s) in the take’s own seconds, the speaker’s voice id (a deleted voice’s id stays), the text as spoken
object
The seed it was made with; absent when the workflow has none
The take this output became (every output is a take)
Its take’s thumb_url (Take.thumb_url); absent without a take (or once it is deleted): use url
The host it was sent to (its current attempt’s); while queued, the host it is lined up for (the one the dispatcher would choose now, may change); null when none was eligible
The host attempt 1 was sent to, when that host stopped responding and the run was queued again; absent or null otherwise
Interactive (Create, POST …/runs) is dispatched before batch
1; 2 after its runner was lost once and it was queued again
Only while queued: 1 + the number of queued runs (anyone’s) the dispatcher would release on host before it, recomputed on every read; absent otherwise
Values the runner chose (a random seed, an auto length), sent with succeeded
object
<node>.<param> → the value the runner chose for a param set to "auto" (duration.frames: the predicted length); absent when none
object
<node>.<output> → a Text output the runner made that the user did not write (an enhancer’s prompt); absent when none
object
The runner reported running
The batch it runs a row of (lane batch); absent or null for a Create run
The batch row number; with batch_id
A user workflow: the version it ran (its graph is the run’s snapshot); absent or null for a template
The looks it was asked with (RunRequest.looks; a batch run: its row’s or step’s), as requested; absent or empty = none
A run of a text (ask) workflow (lane batch: a judge, write or decide call): its answer, stored on the run, never a take (outputs stays empty). Sent once it succeeded, and when it failed on the schema
object
The last try
Name = the hidden run that names its session (local namer, lane batch); only GET /v1/studio/queue lists one. Absent or null otherwise
Only while queued (computed on every read, like position): the pinned components the host memory admission would unload, as its last-resort victims, if the run were admitted on host now; they are loaded again, and pinned again, when next used. Absent when none
object
Its resident size: what reloading it costs
Example
{ "inputs": { "prompt.text": "a red fox", "echo.steps": 20 }, "status": "queued", "outputs": [ { "kind": "image", "url": "/files/u/7d1e.../runs/3c9a.../0.png?exp=1767225600&sig=ab12", "video": { "duration_s": 2.0416666666666665, "fps": 24, "frames": 49, "poster_url": "/files/u/7d1e.../runs/3c9a.../0.png?exp=1767225600&sig=ab12" }, "thumb_url": "/files/u/7d1e.../runs/3c9a.../0.png?exp=1767225600&sig=ab12" } ], "lane": "interactive", "resolved": { "params": { "duration.frames": 89 }, "texts": { "enhance.text": "A ginger cat asleep on a green velvet sofa, soft window light" } }, "looks": [ "qwen-image/window-light" ], "purpose": "name"}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"}