Reuse a canvas as a template
Change a canvas's inputs from code and run it again.
Build the canvas once in Fuser, then drive it from code: change its text or image inputs and rerun only what changed.
Read the canvas
canvas_get returns its nodes with their ids
and inputs, and its revision.
Change the inputs
{
"canvasId": "…",
"idempotencyKey": "copy-update-42",
"expectedRevision": 12,
"diff": {
"setInputs": [
{
"nodeId": "a1B2c3",
"inputId": "prompt",
"value": "Spring sale, 30% off"
}
]
}
}Sent to canvas_edit. With expectedRevision,
the edit is refused if someone changed the canvas since you read it.
Run the changed nodes
run_start with nodeIds runs just those nodes and what
depends on them.