Skip to content

Canvas

The canvas builds a video from connected nodes. You send the whole graph as JSON; the studio checks it, prices it and runs its nodes in order.

GET /flows/nodes the node types this account may place
GET /flows/models {"models": {"<kind>": [{"provider", "model", "name", "credits", "per"}]}}

Each node type has type (for example input.text, generate.image, generate.video, story.scene, edit.concat, output.save), inputs and outputs ports, a config JSON schema, and most (how many one flow may hold). Port types: text, story, image, video, audio. A link joins an output to an input of the same type. A many input takes several links.

A setting with "widget": "model" picks the node’s model: leave it {"provider": "", "model": ""} for the automatic pick. A setting with "widget": "style" takes a style key.

A single input fed a list runs its node once per item. A story.scene node is a box: give inner nodes "parent": "<scene id>", link the inner video to its clip input, and chain scenes from film to before.

{"nodes": [{"id": "p1", "type": "input.text", "config": {"text": "..."}, "parent": "s1", "position": {"x": 0, "y": 0}}],
"edges": [{"source": "p1", "source_port": "text", "target": "v1", "target_port": "prompt"}]}

Ids are lowercase a-z, 0-9, _ and -, up to 40. At most 80 nodes and 200 links, no cycles.

Two scenes with a shared reference image, joined and kept:

{"nodes": [
{"id": "cast", "type": "input.image", "config": {"asset": "<upload path>"}},
{"id": "s1", "type": "story.scene"},
{"id": "p1", "type": "input.text", "parent": "s1", "config": {"text": "A lighthouse keeper climbs the stairs at dusk."}},
{"id": "v1", "type": "generate.video", "parent": "s1", "config": {"seconds": 5}},
{"id": "s2", "type": "story.scene"},
{"id": "p2", "type": "input.text", "parent": "s2", "config": {"text": "He lights the lamp; a cat watches."}},
{"id": "v2", "type": "generate.video", "parent": "s2", "config": {"seconds": 5}},
{"id": "cut", "type": "edit.concat"},
{"id": "result", "type": "output.save"}],
"edges": [
{"source": "p1", "source_port": "text", "target": "v1", "target_port": "prompt"},
{"source": "cast", "source_port": "image", "target": "v1", "target_port": "references"},
{"source": "v1", "source_port": "video", "target": "s1", "target_port": "clip"},
{"source": "p2", "source_port": "text", "target": "v2", "target_port": "prompt"},
{"source": "cast", "source_port": "image", "target": "v2", "target_port": "references"},
{"source": "v2", "source_port": "video", "target": "s2", "target_port": "clip"},
{"source": "s1", "source_port": "film", "target": "s2", "target_port": "before"},
{"source": "s2", "source_port": "film", "target": "cut", "target_port": "videos"},
{"source": "cut", "source_port": "video", "target": "result", "target_port": "video"}]}
POST /flows/upload/{image|video|audio} multipart "file" {"path", "media"}
POST /flows/check <graph> free: {"ok", "issues", "order"}
POST /flows {"title", "kind": "free", "graph"}
PUT /flows/{id} {"title", "graph"}
POST /flows/{id}/estimate {"ok", "credits", "nodes"}
POST /flows/{id}/runs {} or {"scope": "node" | "from", "node": "<id>"}
GET /flows/runs/{run_id}
GET /flows/runs/{run_id}/events
POST /flows/runs/{run_id}/cancel

kind: free, story or series. One run at a time per flow. A partial run bills only what runs. Media outputs look like {"media": "/agentic/api/v1/media/vgm_..."}.

A series flow reads each episode from its input.episode node: save "episodes": [{"title", "brief"}] with PUT /flows/{id}, then POST /flows/{id}/runs {"episodes": [0, 1, 2]}.

output.publish uploads the video it is fed to a connected channel: config account (a connection id), title, optional description and privacy.

List, read and delete: GET /flows?kind=story, GET /flows/{id}, DELETE /flows/{id}. An account keeps up to 100 flows.