Skip to content
Changelog

editor.captions.add

Adds caption lines you give to the captions track, without the speech model.

JSON-RPC 2.0project.write

Parameters

  • lines[number, number, string][]requiredEach line's start_ms, end_ms and words.
  • canvasstringA canvas's id or name, shown first. Default: the canvas shown.

Result

  • captionsnumberHow many lines were taken.

Errors

Invalid params (-32602) without lines. A state error (-32005) when no Editor project is open, or the open one is read-only because a newer Lightair made it.

Events

Subscribers to events get editor.changed.

From an AI agent

The MCP server's editor_captions (action: add) reaches this method.

Example

ws://localhost:4455/rpc
{
"jsonrpc": "2.0",
"id": 1,
"method": "editor.captions.add",
"params": {
"lines": [
[
0,
2400,
"Hi, I'm Sam."
],
[
2400,
5200,
"Today we build a desk."
]
]
}
}

Result

{ "captions": 2 }

editor.captions.make