Update clips (batch)
update_clipsUpdate clips in ONE call (always batch): background, transition, duration, title, hidden, position, voiceover_volume, video_styling (video clips), after_clip, subtitle_settings.
duration: sets the clip's length WITHOUT rescaling anything (unlike generating speech, which rescales the whole clip). A shrink clamps every end_time past the new end to it; a grow carries an element that ended at the old end to the new end and leaves the rest where they were. A placed trim animation keeps its animation_duration: it holds its last frame on a grow and is cut on a shrink; only a stretch animation placed to fit keeps filling its window at the same speed. Keyframes keep their timestamps. Each clip's result lists what moved as extended / clamped. Audio tracks do not follow: the result's audio_tracks_affected lists the music/SFX tracks left misaligned.
voiceover_volume: 0 = SILENT clip, keeping text and word timings (no delete-voiceover tool). Read the current value (get_clip/get_project) to restore it later.
background_color: hex, keeps the pattern/image. background: replaces it: an object from find(type='backgrounds'), or any image/video { src (URL or upload id), media_type?: 'image'|'video', color?, padding? (% 0-100), border_radius? (px), shadow? (0-100), volume? (video audio 0-100, default 100) }.
transition plays at the END of clip_index into the next (set it on the outgoing clip).
position: moves apply FIRST (array order), then property patches: keep reorders in a separate call.
subtitle_settings { showSubtitles?, size? (px), style?, subtitlesStyle?, segmentStyles? ([] clears per-segment styles a clip inherited; they override a clip-wide subtitlesStyle) }; omitted showSubtitles/size reset to true/24. style = caption library id: basic_shadow (default: white, soft shadow, words fade in), basic (+ box), gradient, box_karaoke (frosted box, word brightens when spoken), karaoke, box_highlight, box_highlight_bg, color_word, highlight_word, paragraph_builder, word_by_word. subtitlesStyle with style overrides it (e.g. { style: 'gradient', subtitlesStyle: { text: { fontSize: 60 } } }); without style it is a SubtitlesStyle copied from a clueprint, template or the clip; missing fields come from the default style, and a field that fails validation is dropped on its own (named in a warning) while the rest is kept (invalid id → default + warning; unmappable keys dropped + warning). Fields: text.{font, fontSize, fontColor, gradientSetting, strokeGradientSetting (outline)}; background {show, style: {color, opacity 0–100, line_style 'split'|'combo', sidePadding {top,right,bottom,left}, cornerRadii {topLeft,topRight,bottomRight,bottomLeft} (a single number for either sets all four)}}; background_gradient_setting (box), background_stroke {color, width, opacity} + background_stroke_gradient_setting (box border); a gradient is {show, type 'linear'|'radial', angle?, color_stops [{color, position 0–1, opacity? 0–100}]}; animation.{entry_type/exit_type 'slide'|'lift_fade'|'fade'|'none', entry_duration/exit_duration ms (Normal 400/250, Slow 800/500, Fast 150/100), transition_scope 'caption'|'line'|'word' + stagger ms 0–200, color_current_word|color_upcoming_words {show, color, opacity}}; position {x, y} fractions (caption centre).
Concurrency: one save per call; parallel calls fine on DIFFERENT clips. Not concurrently with element/voiceover edits on the same clip or whole-project writes (add_clips, add_audio, update_project). Resizing clips + adding audio: update_clips first.
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>",
"updates": "<updates>"
},
"name": "update_clips"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| updates | Yes | One entry per clip to update. | |
| project_id | Yes | Project ID |