Fuser

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.

POST/v1/canvas_edit
MCP tool canvas_edit

Try it

POSTapi.fuser.studio/v1/canvas_edit
BodyJSON
ResponseExample
{
  "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

  • canvasIdstring

    Canvas to edit. Omit it and pass newCanvas to create one.

  • titlestring

    Rename 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.

  • idempotencyKeystringrequired

    A 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.

  • expectedRevisioninteger

    The 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

  • canvasIdstring

    The canvas id. Pass it to canvas_get, canvas_edit and run_start.

  • urlstring
  • revisionnumber

    The canvas revision after this call. Pass it as expectedRevision on your next canvas_edit.

  • createdNodeIdsRecord<string, string>
  • warningsstring[]
  • replayedboolean
  • toolWiringErrorstring

    Only when a placed tool's inputs or edges were refused; the tools are on the canvas, unwired.

On this page