# Edit a canvas (https://docs.fuser.studio/docs/api/canvas-edit)

## Try it [#try-it]

## Example [#example]

    ```bash
    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"
          }
        ]
      }
    }'
    ```

    ```ts
    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](https://docs.fuser.studio/docs/api/sdk.md).

## Input [#input]

## Output [#output]

' },
  { path: 'warnings', type: 'string[]' },
  {
    path: 'overlaps',
    type: 'object[]',
    description:
      'Moved or resized nodes that now overlap another node. Lay them out with canvas_arrange, or move them.',
  },
  {
    path: 'overlaps[].nodeId',
    type: 'string',
    description: 'A node on the canvas, as canvas_get lists it.',
  },
  { path: 'overlaps[].overlapsWith', type: 'string' },
  { path: 'replayed', type: 'boolean' },
  {
    path: 'tools',
    type: 'object[]',
    description:
      'Saved tools placed with toolId and the sockets each takes. Inputs and edges you gave a toolId node in this edit were applied once it was placed.',
  },
  { path: 'tools[].ref', type: 'string' },
  {
    path: 'tools[].nodeId',
    type: 'string',
    description: 'A node on the canvas, as canvas_get lists it.',
  },
  { path: 'tools[].tool', type: 'object' },
  { path: 'tools[].tool.title', type: 'string' },
  {
    path: 'tools[].tool.mode',
    type: '&#x22;free&#x22; | &#x22;paid&#x22;',
    description:
      'free tools cost nothing to run; paid ones call AI helpers and cost credits per run.',
  },
  { path: 'tools[].tool.inputs', type: 'object[]' },
  { path: 'tools[].tool.inputs[].socket', type: 'string' },
  {
    path: 'tools[].tool.inputs[].kind',
    type: '&#x22;image&#x22; | &#x22;video&#x22; | &#x22;audio&#x22; | &#x22;mesh&#x22; | &#x22;text&#x22;',
  },
  { path: 'tools[].tool.inputs[].many', type: 'boolean' },
  { path: 'tools[].tool.inputs[].required', type: 'boolean' },
  { path: 'tools[].tool.controls', type: 'object[]' },
  { path: 'tools[].tool.controls[].socket', type: 'string' },
  { path: 'tools[].tool.controls[].label', type: 'string' },
  {
    path: 'tools[].tool.controls[].kind',
    type: '&#x22;slider&#x22; | &#x22;dropdown&#x22; | &#x22;switch&#x22;',
  },
  {
    path: 'tools[].tool.controls[].default',
    type: 'number | string | boolean',
  },
  { path: 'tools[].tool.controls[].min', type: 'number' },
  { path: 'tools[].tool.controls[].max', type: 'number' },
  { path: 'tools[].tool.controls[].options', type: 'string[]' },
  { path: 'tools[].tool.outputs', type: 'object[]' },
  { path: 'tools[].tool.outputs[].socket', type: 'string' },
  {
    path: 'tools[].tool.outputs[].kind',
    type: '&#x22;image&#x22; | &#x22;video&#x22; | &#x22;audio&#x22; | &#x22;text&#x22; | &#x22;json&#x22;',
  },
  { path: 'tools[].error', type: 'string' },
  {
    path: 'toolWiringError',
    type: 'string',
    description:
      &#x22;Only when a placed tool's inputs or edges were refused; the tools are on the canvas, unwired.&#x22;,
  },
]"
/>