Edit a canvas
Apply a graph diff to a canvas all at once: add nodes and edges, change inputs, disconnect edges, delete nodes. Every change lands or none does. Keep each edit to about 30 new nodes; build a bigger canvas one section per edit, so a mistake costs one small resend.
/v1/canvas_editcanvas_editTry it
{
"canvasId": "3f2b8c1e-7a4d-4e9b-9c2a-5d6e7f8a9b0c",
"url": "https://media.fuser.studio/9c2a5d6e7f8a.png",
"revision": 1,
"createdNodeIds": {
"prompt": "aB3dE5"
},
"warnings": [],
"overlaps": [],
"replayed": false,
"tools": [
{
"ref": "example ref",
"nodeId": "aB3dE5",
"tool": {
"title": "Coral reef poster",
"mode": "free",
"inputs": [
{
"socket": "tool2_in_image",
"kind": "image",
"many": false,
"required": false
}
],
"controls": [
{
"socket": "tool2_in_image",
"label": "Prompt",
"kind": "slider",
"default": 1,
"min": 1,
"max": 1
}
],
"outputs": [
{
"socket": "tool2_in_image",
"kind": "image"
}
]
}
}
]
}Example
curl -X POST https://api.fuser.studio/v1/canvas_edit \
-H "x-api-key: $FUSER_API_KEY" \
-H "content-type: application/json" \
-d '{
"newCanvas": {
"name": "Coral reef poster"
},
"idempotencyKey": "edit-2026-11-09-001",
"diff": {
"nodes": [
{
"ref": "prompt",
"type": "TextNode",
"label": "Prompt",
"inputs": [
{
"id": "text",
"value": "A coral reef at golden hour"
}
]
},
{
"ref": "image",
"type": "OpenAIGPTImageNode",
"label": "Poster",
"inputs": []
}
],
"edges": [
{
"from": "prompt.text",
"to": "image.prompt"
}
]
}
}'const result = await fuser.canvas.edit({
newCanvas: {
name: 'Coral reef poster',
},
idempotencyKey: 'edit-2026-11-09-001',
diff: {
nodes: [
{
ref: 'prompt',
type: 'TextNode',
label: 'Prompt',
inputs: [
{
id: 'text',
value: 'A coral reef at golden hour',
},
],
},
{
ref: 'image',
type: 'OpenAIGPTImageNode',
label: 'Poster',
inputs: [],
},
],
edges: [
{
from: 'prompt.text',
to: 'image.prompt',
},
],
},
});See the TypeScript SDK.
Input
canvasIdstringCanvas to edit. Omit it and pass newCanvas to create one.
titlestringRename an existing canvas (with canvasId); not a description of the edit. A new canvas takes newCanvas.name. The diff may be empty when this is all you're changing.
idempotencyKeystringrequiredA fresh random value, such as a UUID, for each new edit; never reuse one from an earlier edit. Resend the same key only when retrying this same edit.
expectedRevisionintegerThe revision from your latest canvas_get or canvas_edit. If someone has edited the canvas since, the edit still applies unless it touches nodes they changed; then it is refused, naming them. Results arriving from runs never count.
Output
canvasIdstringThe canvas id. Pass it to canvas_get, canvas_edit and run_start.
urlstringrevisionnumberThe canvas revision after this call. Pass it as expectedRevision on your next canvas_edit.
createdNodeIdsRecord<string, string>warningsstring[]replayedbooleantoolWiringErrorstringOnly when a placed tool's inputs or edges were refused; the tools are on the canvas, unwired.
Read a canvas
A compact view of a canvas: a summary, then pages of nodes (id, type, label, socket keys, literal values, result links) and their edges. On a big canvas, find nodes with search or read specific ones with nodeIds instead of paging through everything.
Arrange nodes on a canvas
Lay out existing nodes with Fuser's layout instead of working out positions. Without layout it tidies them along their wiring, inputs to the left of what they feed; with layout it puts them in a row, column or grid in nodeIds order. To lay out a board of several blocks (a column of references, a grid of finals), pass blocks in one call instead of one call per block. Without an origin the block stays where the nodes are and slides clear of the nodes around it. canvas_edit already lays out the nodes it adds, so use this only when the user asks to rearrange, line up or tidy nodes, or after resizing nodes that now overlap. Arrange only the nodes the request is about; a whole-canvas re-layout (all) needs the user's explicit request and confirm. For wired nodes leave layout out: tidying keeps each wire short and gives fan-outs room. Rows, columns and grids are for unwired sets (references, finals); a row of nodes wired in sequence or to one shared node runs wires through each other. Keep work flowing left to right: a block sits left of the blocks it feeds (hero shots, then their crops, then videos); stack blocks top to bottom only when they don't feed each other. It changes positions only.