Fuser

Undo recent edits

Reverses the latest edits made through this API (canvas_edit, canvas_arrange): nodes they added are removed, nodes they deleted come back (without their results), and moves, wiring, inputs and names return to how they were. Results are never regenerated. A node someone changed after the edit is left as it is and listed in skipped. Use it when the user says undo, revert or go back, or to fix your own mistake, instead of rebuilding by hand.

POST/v1/canvas_undo
MCP tool canvas_undo

Try it

POSTapi.fuser.studio/v1/canvas_undo
BodyJSON
ResponseExample
{
  "canvasId": "3f2b8c1e-7a4d-4e9b-9c2a-5d6e7f8a9b0c",
  "url": "https://media.fuser.studio/9c2a5d6e7f8a.png",
  "undone": 1,
  "changedNodes": 1,
  "recreated": [
    "example recreated"
  ],
  "skipped": [
    {
      "nodeId": "aB3dE5",
      "label": "Prompt"
    }
  ],
  "revision": 1
}

Example

curl -X POST https://api.fuser.studio/v1/canvas_undo \
  -H "x-api-key: $FUSER_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "canvasId": "3f2b8c1e-7a4d-4e9b-9c2a-5d6e7f8a9b0c"
}'
const result = await fuser.canvas.undo({
  canvasId: '3f2b8c1e-7a4d-4e9b-9c2a-5d6e7f8a9b0c',
});

See the TypeScript SDK.

Input

  • canvasIdstringrequired

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

  • stepsinteger

    How many edits to reverse, newest first; default 1. All the edits of one in-app agent turn count as one.

Output

  • canvasIdstring

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

  • urlstring
  • undonenumber

    Edits reversed.

  • changedNodesnumber
  • recreatedstring[]

    Deleted nodes brought back, by name; run them again for results.

  • revisionnumber

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

On this page