Skip to main content
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.

Inputs

Edit operations

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

setSettings

editWord

Fix a caption word, or take it out.

setWordHighlight

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

setLineBreak

Break the captions after a 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).

setMusic

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

removeMusic

No other fields.

restoreLaneAI

removeItem

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

restoreItem

moveItem

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

trimItem

Trim a zoom, or one edge of a shot.

moveShotBoundary

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.

setShotVariant

Another look for a shot; a look with a picture the shot lacks is swap_picture’s (with its variant).

setShotStyle

setTransition

detachLane

addItem

setCaptionPage

applyCaptionPageToAll

resetCaptionPage

A refusal is a result with isError: true and structuredContent.error = {code, message, next}: see Limits and errors.