# editor.clip.add

Source: https://docs.lightair.app/developers/remote-api/editor.clip.add

> Puts a medium from the project on the timeline as a clip.

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

A video's sound comes apart as a linked clip.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `media` | `string` | yes | The medium's id or name. |
| `at_ms` | `number` | no | A moment on the canvas's timeline. Default: the playhead. |
| `track` | `number` | no | A track's index. |
| `canvas` | `string` | no | A canvas's id or name, shown first. Default: the canvas shown. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `clips` | `string[]` | no | The clips made. |

## Errors

Not found (-32004) for an unknown medium. 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_clip (action: add)` reaches this method.

## Example

```json
{ "jsonrpc": "2.0", "id": 1, "method": "editor.clip.add", "params": { "media": "intro", "at_ms": 0 } }
```

Result:

```json
{ "clips": ["019ad3f6-5e6f-7071-8283-9e0f1a2b3c4d", "019ad3f6-6f70-7182-9394-0f1a2b3c4d5e"] }
```

## Related

- [editor.media.add](https://docs.lightair.app/developers/remote-api/editor.media.add.md)
- [editor.clip.move](https://docs.lightair.app/developers/remote-api/editor.clip.move.md)
