> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solaraai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# apply_edit

> Solara AI MCP tool: Edit a video

Use this to change an edit like a person in the editor, as ONE undo step: the style, caption style, accent, pause length, speed, format, music, caption words by their ids in get\_preview (fix, add, take out, highlight, a line or page break after one; each op reads the words as the ops before it left them), and any timeline item by its id from get\_preview: move or trim a shot, zoom or sound, take one out or put it back, split a caption page at a time, a shot variant (one of its looks), palette or transition, add a zoom, a caption page's position and size. setSettings captions sets the Captions panel, e.g. a higher wordsPerPage keeps a phrase split across two caption pages on one. Limits, as the editor keeps them: a look covers its whole shot (the editor's Split cuts only the footage, so a part of a shot never takes its own look: change the whole shot, or tell the person it is not possible); a sound moves at most 10 s from where the AI put it; a zoom lasts at least 300 ms, never overlaps another, and not where the speaker is off screen; a look with a picture the shot lacks is swap\_picture's; cutting the footage and trimming the video's first start or last end are the person's, in the editor. A change to the captions' size or position answers captions: \{ fontSize, positionY } as every line draws now. Free; never renders. The person sees it live in the editor.

| | |
| - | - |
| Permission | Edit (`mcp:edit`) |
| Read-only | No |
| Safe to repeat | No |
| Overwrites, spends or posts | Yes |
| Reaches outside Solara | No |

## Inputs

| Name | Type | Required | Description |
| - | - | - | - |
| `video_id` | UUID | Yes | The video's id, from create\_video. |
| `ops` | operation\[] | Yes | See the edit operations below. 1 to 20 items. |

## Edit operations

Each entry of `ops` is one of these, chosen by its `type`. Ids and times come from `get_preview`.

### setSettings

| Name | Type | Required | Description |
| - | - | - | - |
| `settings` | object | Yes | |
| `settings.editStyle` | string | No | A style id from list\_styles. |
| `settings.captionPreset` | string | No | A caption style id from list\_styles; empty: the style's own. |
| `settings.accentColor` | string | No | #rrggbb; empty: the style's own. |
| `settings.palette` | string | No | |
| `settings.captions` | object or null | No | The Captions panel's settings, as get\_preview settings.captions reads them (wordsPerPage is Words on screen); null on one: the caption style's own; captions null: all of them. `null` resets it. |
| `settings.captions.fontFamily` | string or null | No | One of `oswald`, `poppins`, `space-mono`, `abril-fatface`, `inter`, `montserrat-italic`, `great-vibes`, `montserrat`, `lato`, `open-sans`, `raleway`, `nunito`, `ubuntu`, `bebas-neue`, `playfair-display`, `playfair-display-italic`, `dm-sans`, `archivo-black`, `luckiest-guy`, `instrument-sans`, `instrument-serif-italic`, `yellowtail`, `kaushan-script`. `null` resets it. |
| `settings.captions.fontWeight` | integer or null | No | From 100 to 900. `null` resets it. |
| `settings.captions.fontSize` | number or null | No | From 30 to 150. `null` resets it. |
| `settings.captions.textCase` | string or null | No | One of `none`, `upper`, `lower`, `title`. `null` resets it. |
| `settings.captions.textColor` | string or null | No | `null` resets it. |
| `settings.captions.highlightColor` | string or null | No | `null` resets it. |
| `settings.captions.strokeColor` | string or null | No | `null` resets it. |
| `settings.captions.shadowColor` | string or null | No | `null` resets it. |
| `settings.captions.boxColor` | string or null | No | `null` resets it. |
| `settings.captions.keywordHighlight` | boolean or null | No | |
| `settings.captions.animation` | string or null | No | One of `none`, `fade`, `pop`, `slide`, `impactSlam`, `softBlur`. `null` resets it. |
| `settings.captions.speed` | number or null | No | From 0.25 to 4. `null` resets it. |
| `settings.captions.activeWord` | string or null | No | One of `color`, `box`, `none`. `null` resets it. |
| `settings.captions.emojiMotion` | string or null | No | One of `animated`, `bounce`, `still`. `null` resets it. |
| `settings.captions.positionY` | number or null | No | From 0.1 to 0.9. `null` resets it. |
| `settings.captions.wordsPerPage` | integer or null | No | From 1 to 12. `null` resets it. |
| `settings.captions.emoji` | string or null | No | One of `off`, `auto`, `top`. `null` resets it. |
| `settings.captions.linesPerPage` | integer or null | No | From 1 to 3. `null` resets it. |
| `settings.captions.hidePunctuation` | boolean or null | No | |
| `settings.autoTrim` | boolean | No | |
| `settings.pauseMs` | number or null | No | Kept pause length; null: Natural. From 50 to 500. `null` resets it. |
| `settings.speed` | number or null | No | Playback speed; null: 1x. From 0.25 to 4. `null` resets it. |
| `settings.aspect` | string | No | One of `9:16`, `16:9`. |
| `settings.enhanceVoice` | boolean | No | |
| `settings.voiceGainDb` | number | No | Voice volume, dB off the speaker's voice as it was made: -12 to 6 in steps of 0.5 (0: as made); louder is limited in the export, never clipped. With enhanceVoice on the loudest is 2: a louder value plays as 2. From -12 to 6. |
| `settings.zoomLevel` | string | No | One of `none`, `medium`, `high`. |
| `settings.zoomCurve` | string | No | One of `instant`, `ease`, `linear`. |
| `settings.soundEffects` | boolean | No | |
| `settings.voice` | boolean | No | false mutes the speaker. |
| `settings.speakerPoster` | boolean | No | The painted poster of the speaker, on a style that opens on one (neon-coast): false switches it off for this video, true back on. |

### editWord

Fix a caption word, or take it out.

| Name | Type | Required | Description |
| - | - | - | - |
| `wordId` | string | Yes | An id from get\_preview transcript\_words: w7, or w7+1 for the first word added after w7. |
| `text` | string | No | Its new text; several words: the first replaces it, the rest go in right after it. |
| `removed` | boolean | No | true takes it out of the captions. |

### setWordHighlight

Highlight a transcript word (a word added after one takes none).

| Name | Type | Required | Description |
| - | - | - | - |
| `wordId` | string | Yes | An id from get\_preview transcript\_words: w7, or w7+1 for the first word added after w7. |
| `highlight` | string | Yes | One of `primary`, `second`, `third`, `none`. |

### setLineBreak

Break the captions after a word.

| Name | Type | Required | Description |
| - | - | - | - |
| `wordId` | string | Yes | An id from get\_preview transcript\_words: w7, or w7+1 for the first word added after w7. |
| `lineBreak` | boolean | No | A new caption line after the word. |
| `pageBreak` | boolean | No | A new caption page after the word. |

### addWord

Put words into the captions right after a word, as typing them in the editor does (at most 10 after one transcript word).

| Name | Type | Required | Description |
| - | - | - | - |
| `afterWordId` | string | Yes | An id from get\_preview transcript\_words: w7, or w7+1 for the first word added after w7. |
| `text` | string | Yes | The word or words to put in; they share its time. |

### setMusic

Turn the music on or off, its mood, its volume.

| Name | Type | Required | Description |
| - | - | - | - |
| `enabled` | boolean | No | true turns the music on, false off; absent: as it is. |
| `mood` | string | No | One of `auto`, `calm`, `upbeat`, `inspiring`, `cinematic`, `playful`. |
| `volumeDb` | number | No | The Music panel's Volume: 0 the default level, -6 quiet, +6 loud. From -6 to 6. |

### removeMusic

No other fields.

### restoreLaneAI

| Name | Type | Required | Description |
| - | - | - | - |
| `lane` | string | Yes | One of `zooms`, `sfx`. |

### removeItem

Take out a shot, zoom, sound or caption page.

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |

### restoreItem

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |

### moveItem

Move a zoom, or a sound (at most 10 s from where the AI placed it).

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |
| `startMs` | number | Yes | ms on the video clock. |

### trimItem

Trim a zoom, or one edge of a shot.

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |
| `startMs` | number | No | ms on the video clock. |
| `endMs` | number | No | ms on the video clock. |

### moveShotBoundary

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |
| `edge` | string | Yes | One of `start`, `end`. |
| `ms` | number | Yes | ms on the video clock. |

### splitItem

Split a caption page at atMs, as the editor's Split. A shot is not split by agents: in the editor its Split cuts the footage and the shot keeps one look across its pieces, so a look covers the whole shot.

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |
| `atMs` | number | Yes | ms on the video clock. |

### setShotVariant

Another look for a shot; a look with a picture the shot lacks is swap\_picture's (with its variant).

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |
| `variant` | string | Yes | One of the shot's looks in get\_preview. |

### setShotStyle

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |
| `palette` | string | No | |
| `use` | string | No | |

### setTransition

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |
| `transition` | string | Yes | |

### detachLane

| Name | Type | Required | Description |
| - | - | - | - |
| `lane` | `"zooms"` | Yes | |

### addItem

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `"zoom"` | Yes | |
| `startMs` | number | Yes | ms on the video clock. |
| `endMs` | number | No | ms on the video clock. |
| `level` | string | No | One of `medium`, `high`. |
| `curve` | string | No | One of `instant`, `ease`, `linear`. |

### setCaptionPage

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |
| `look` | object | Yes | |
| `look.size` | string | No | One of `S`, `M`, `L`. |
| `look.scale` | number | No | From 0.5 to 2. |
| `look.posX` | number | No | From 0 to 1. |
| `look.posY` | number | No | 0 top, 1 bottom. From 0 to 1. |
| `look.rotation` | number | No | From -45 to 45. |

### applyCaptionPageToAll

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |
| `look` | object | Yes | |
| `look.size` | string | No | One of `S`, `M`, `L`. |
| `look.scale` | number | No | From 0.5 to 2. |
| `look.posX` | number | No | From 0 to 1. |
| `look.posY` | number | No | 0 top, 1 bottom. From 0 to 1. |
| `look.rotation` | number | No | From -45 to 45. |

### resetCaptionPage

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | string | Yes | An id from get\_preview timeline. |
| `scope` | string | No | One of `line`, `all`. |

A refusal is a result with `isError: true` and `structuredContent.error` = `{code, message, next}`: see [Limits and errors](https://docs.solaraai.com/guides/limits-and-errors.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.