# editor.canvas.set

Source: https://docs.lightair.app/developers/remote-api/editor.canvas.set

> Changes a canvas: its size, frame rate, background, safe area, export preset or name, or the project's proxies.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Editor. Script plugins need the `project.write` permission.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `canvas` | `string` | no | A canvas's id or name, shown first. Default: the canvas shown. |
| `size` | `[number, number] | string` | no | [width, height] (16 or more), or `landscape`, `vertical`, `square`, `portrait`. |
| `fps` | `number` | no | 1 to 240. |
| `background` | `string | { blur: number, dim: number } | null` | no | `none`, "#RRGGBB", `blur`, `{blur, dim}` (each 0 to 1), or a backdrop's name from editor.looks.catalog. |
| `safe_area` | `string` | no | `none` or a safe area's name, such as `Broadcast` or `Social apps`. |
| `export_preset` | `string` | no | An export preset's name. |
| `proxies` | `boolean` | no | Whether the project uses proxies. |
| `name` | `string` | no | The canvas's name. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | no | Its name. |
| `size` | `[number, number]` | no | Its size. |
| `fps` | `number` | no | Its frame rate. |
| `background` | `object | null` | no | Its background. |
| `safe_area` | `string | null` | no | Its safe area. |
| `proxies` | `boolean` | no | The project's proxies. |

## Errors

Invalid params (-32602) with nothing to set, or a value out of range or unknown; the message lists what's allowed. A state error (-32005) when no Editor project is open, or the open one is read-only because a newer Lightair made it.

## Events

- `editor.changed`

## From an AI agent

The MCP server's `editor_canvases (action: set)` reaches this method.

## Example

```json
{ "jsonrpc": "2.0", "id": 1, "method": "editor.canvas.set", "params": { "background": "blur", "safe_area": "social" } }
```

Result:

```json
{ "name": "Vertical", "size": [1080, 1920], "fps": 30, "background": { "kind": "blur", "amount": 0.6, "dim": 0.3 }, "safe_area": "Social apps", "proxies": false }
```

## Related

- [editor.canvases.add](https://docs.lightair.app/developers/remote-api/editor.canvases.add.md)
- [editor.looks.catalog](https://docs.lightair.app/developers/remote-api/editor.looks.catalog.md)
