Build and edit a graph
Use a Look and build key to create or change a graph. These operations alter the real project, but they do not generate media.
Discover, plan and apply
Section titled “Discover, plan and apply”Read describe_studio for current node types, fields and ports. Choose an existing project through list_projects, or deliberately create a new empty project with create_project. Read its graph before editing.
This example adds an exact text input. Replace based_on_revision with the revision you just read; 0 is only suitable for an unchanged new project.
{ "name": "apply_graph_ops", "arguments": { "project_id": "<url or id returned by list_projects>", "based_on_revision": 0, "ops": [ { "op": "add_node", "ref": "idea", "type": "avg/text_input" }, { "op": "set_field", "node": "idea", "key": "text", "value": "A blue paper boat crosses a quiet pond." } ] }}The batch-local ref lets later operations address a newly added node. Keep the returned refs mapping for its real ID. Read the graph again and verify the complete text, intended node and new revision.
Choose the appropriate operation
Section titled “Choose the appropriate operation”| Operation | Use |
|---|---|
add_node |
Add a current catalog type. |
set_field |
Change a supported editable parameter. |
connect |
Connect named compatible ports. |
apply_library_element |
Apply an accessible Element to a node that accepts library Elements. |
apply_skill |
Attach an applicable skill to an authoring node. |
apply_generator |
Apply an accessible ready-made configuration. |
rename |
Change the node’s title. |
edit_plan |
Change supported entries in a Decoration plan. |
edit_timeline |
Edit the timeline of a Montage node in one batch of steps: move a clip, set its edges, mute it, place the song with fades and volume, move the voice. Name a clip by the name of its input (видео 2), not by its number on the card. Edges need a clip that is already shot. One edit_timeline per node per batch; the studio can undo it in one step. |
pin_file |
Put an owned material or supported imported file on a media-source node. |
Use the generated tool reference for the exact fields of each operation. A title change uses rename; it is not an arbitrary set_field. An input takes one wire. Use the next numbered input in a repeatable row rather than connecting several sources to the same slot.
A writable project does not make every field editable. Studio-owned step instructions can refuse both set_field and apply_generator. Keep the protected step intact and use an ordinary editable node for your own prompt.
Handle a changed project
Section titled “Handle a changed project”On a revision conflict, read the graph again, compare the new state and rebuild the intended edit. Do not simply remove the revision or replay an old plan over changes you have not read.
expand_scenes builds branches from already written Prompt Scriptwriter scenes. Inspect its returned nodes, skipped entries and warnings. Expand selected scenes in ascending order because Montage follows input order. Wait for an active project run before expanding.
Continue with libraries and lore or running a node.
Last checked: 15 October 2026. Graph mutation examples are schema-checked; executing them creates actual project changes.
