Edit text layer
set_text[write] Change a text clip's words and/or style. preset replaces the style first; passed fields merge over it. ids restyles several at once. Use to fix wording or restyle titles. Not for caption lines (use edit_subtitle_line), the caption style (use set_subtitle_style) or placement (use set_clip_transform). Returns the changed clips' rows (with handles) and counts. Related: add_text, set_clip_transform, set_clip_animation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>"
},
"name": "set_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bg | No | Box behind, #rrggbb. | |
| id | No | get_timeline handle. | |
| ids | No | More handles. | |
| font | No | Font family. | |
| size | No | px at 1080p, 8–400. | |
| text | No | New words. | |
| align | No | Line alignment. | |
| color | No | #rrggbb. | |
| items | No | Many clips at once, max 60, each with this tool's fields. | |
| italic | No | Italic. | |
| preset | No | Base style. | |
| shadow | No | Softness, px at 1080p, 0–60. | |
| stroke | No | Outline, px at 1080p, 0–20. | |
| weight | No | 100–900. | |
| shadowX | No | Offset, px at 1080p, -60–60; with shadow 0, a hard shadow. | |
| shadowY | No | As shadowX, + = down. | |
| fitWidth | No | Fill this % of frame width (10–100) on one line; overrides size. | |
| maxWidth | No | Wrap width, % of frame, 20–100. | |
| bgOpacity | No | Box opacity, 0–1. | |
| uppercase | No | All caps. | |
| lineHeight | No | × size, 0.7–2.5. | |
| project_id | Yes | The AskEditor project this acts on (from list_projects). | |
| strokeColor | No | Outline colour, #rrggbb. | |
| letterSpacing | No | em, -0.1–0.5. |