# editor.text.add

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

> Adds a title to the timeline in one of the text styles.

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 |
|---|---|---|---|
| `text` | `string` | yes | Its words. |
| `at_ms` | `number` | no | A moment on the canvas's timeline. Default: the playhead. |
| `duration_ms` | `number` | no | Its length, at least 100. Default 3000. |
| `style` | `string` | no | `Title`, `Subtitle`, `Lower third`, `Label`, `Neon` or `Quote`. Default `Title`. |
| `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 |
|---|---|---|---|
| `clip` | `string` | no | The title's clip id. |

## Errors

Invalid params (-32602) without `text`. 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_text` reaches this method.

## Example

```json
{ "jsonrpc": "2.0", "id": 1, "method": "editor.text.add", "params": { "text": "Chapter one", "at_ms": 4000, "style": "Lower third" } }
```

Result:

```json
{ "clip": "019ad3f6-5e6f-7071-8283-9e0f1a2b3c4d" }
```

## Related

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