Cut and structure
27 tools: remove_pauses, cut_source_range, restore_cuts, nudge_cut_boundary…
remove_pauses
Cut silences out of a main clip using the real audio waveform (RMS), falling back to transcript gaps when audio can't be decoded. Needs a transcript first. Additive on existing cuts. Returns a report: durationBefore/After, removedSec, captionLines, warnings — show the new length to the user.
| Input | Type | |
|---|---|---|
clipId | string | Required |
cut_source_range
Non-destructively cut a source-time range [start,end] in seconds out of a main clip. Snaps to word-gap midpoints by default; pass snap:false for a manual boundary.
| Input | Type | |
|---|---|---|
clipId | string | Required |
start | number | Required |
end | number | Required |
snap | boolean |
restore_cuts
Remove every cut on a main clip (restore the whole clip).
| Input | Type | |
|---|---|---|
clipId | string | Required |
nudge_cut_boundary
Fine-tune one edge of a text-cut join when autocut landed off the real audio. Pass atSrc inside/near the cut gap, edge left|right, and deltaSec (positive = later). No gap snap.
| Input | Type | |
|---|---|---|
clipId | string | Required |
atSrc | number | Required |
edge | one of left | right | Required |
deltaSec | number | Required |
seek_to_word
Seek the playhead to a SOURCE second on a main clip (and scroll the timeline). Use before/after cutting to verify by ear.
| Input | Type | |
|---|---|---|
clipId | string | Required |
srcSec | number | Required |
review_cut_join
Review a text-cut join for headless agents: returns join timings + a short mix WAV around the cut + JPEG frames just before/after. Pass index to cycle (0, 1, 2…). Listen for a click or mid-word cut; look at the frame pair for a jump. Also plays in the live Studio tab when focused.
| Input | Type | |
|---|---|---|
index | number |
trim_clip
Trim a clip's in or out edge to a source-time value in seconds.
| Input | Type | |
|---|---|---|
clipId | string | Required |
edge | one of in | out | Required |
to | number | Required |
split_clip
Split a clip into two at a source-time point in seconds.
| Input | Type | |
|---|---|---|
clipId | string | Required |
atSrc | number | Required |
reorder_main
Reorder the main track. Pass ALL main clip ids in the new order (a full permutation).
| Input | Type | |
|---|---|---|
ids | array of string | Required |
remove_clips
Delete clips by id.
| Input | Type | |
|---|---|---|
ids | array of string | Required |
move_clip
Move a clip: { track:'main', index } reorders Video 1; { tlStart } sets absolute timeline start for main (sticker), overlay, audio, or title. Prefer snap_to_beats / arrange_on_beats when landing on music.
| Input | Type | |
|---|---|---|
clipId | string | Required |
to | object | Required |
assemble_from_plan
Build the main track from the submitted edit plan in one step: one clip per beat, in order, with that beat's source window. Replaces existing main clips. Prefer this when the plan spans multiple takes or needs a reorder — instead of split + keep_time_windows + rearrange. Requires submit_edit_plan first. Returns clips + script — confirm the script still reads as one story, then polish.
keep_time_windows
Set keep islands on a main clip in one shot (SET_CLIP_KEEP). windows = [{start,end}] in SOURCE seconds. policy 'keep' (default) = keep ONLY those windows; 'cut' = remove those spans from the current keep. When a transcript exists, edges snap to word boundaries (a word must be ≥50% inside or its midpoint in the window — prevents neighbour words leaking into captions). Returns a report: durationBefore/After, removedSec, windowsApplied, captionLines, warnings — show the new length and resulting lines to the user. Requires live Studio tab. Max 80 windows; each ≥ ~2 frames. For a multi-beat plan across takes, prefer assemble_from_plan.
| Input | Type | |
|---|---|---|
clipId | string | Required |
windows | array of object | Required |
policy | one of keep | cut |
suggest_highlight_windows
Suggest high-confidence sports highlight windows from pose ∪ high-motion scenes. Does NOT apply keep — you still call keep_time_windows after verifying with get_frame. Requires live Studio tab.
| Input | Type | |
|---|---|---|
mediaId | string | Required |
kind | one of sports | |
start | number | |
end | number | |
minConfidence | number |
set_clip_speed
Set constant Speed on a video or audio clip. rate is the multiplier (1 = 100%, 0.5 = 50%, 2 = 200%) — same as the Studio Speed row. Non-1× uses on-device smooth frame synth when ready (preview cache + export); live playhead is still playbackRate. keepPitch (default true) keeps the voice's pitch while retiming — pass false for the classic resample where pitch rides the rate. For ramps use animate(prop:'speed', keyframes:[{t,v}]) with v as rate; a ramp always resamples. Pass reset:true for 1×. Requires live Studio tab.
| Input | Type | |
|---|---|---|
clipId | string | Required |
rate | number | |
keepPitch | boolean | |
reset | boolean |
snap_to_beats
Snap existing clips onto the board beat grid. clipIds = main, overlay, audio, and/or titles. edges: in | out | both (default). which / mediaId / trackId filter the grid like get_timeline_beats. Prefer checkpoint first.
| Input | Type | |
|---|---|---|
clipIds | array of string | Required |
edges | one of in | out | both | |
which | one of strong | weak | all | |
mediaId | string | |
trackId | string | |
fromTl | number | |
toTl | number |
arrange_on_beats
Montage pack: place clipIds in order on successive board beats (default which=strong, beatsPerClip=1). Works for main, overlay, audio, titles. Optional startAtTl / mediaId / trackId. One undo step. Prefer checkpoint first. Craft: get_guide('cutting-to-music').
| Input | Type | |
|---|---|---|
clipIds | array of string | Required |
which | one of strong | weak | all | |
beatsPerClip | number | |
startAtTl | number | |
mediaId | string | |
trackId | string |
split_on_beats
Split a main, audio, or overlay clip on the board beat grid (timeline hits from all / filtered audio tracks). which: strong (default) | weak | all. Optional mediaId/trackId/fromTl/toTl/maxCuts. Prefer checkpoint first. For packing many clips use arrange_on_beats. Craft: get_guide('cutting-to-music').
| Input | Type | |
|---|---|---|
clipId | string | Required |
which | one of strong | weak | all | |
mediaId | string | |
trackId | string | |
fromTl | number | |
toTl | number | |
maxCuts | number |
place_main_clip
Put a Video 1 clip at an exact timeline second (startSec), optionally at a new position in the order (index). By default every other clip keeps its time (a gap may open); keepOthers:false slides the touching clips along with it instead.
| Input | Type | |
|---|---|---|
clipId | string | Required |
startSec | number ≥ 0 | Required |
index | integer ≥ 0 | |
keepOthers | boolean |
set_main_gap
Leave gapBeforeSec seconds of empty picture before a Video 1 clip (0 closes the gap).
| Input | Type | |
|---|---|---|
clipId | string | Required |
gapBeforeSec | number ≥ 0 | Required |
shift_main_clips
Slide several Video 1 clips together by deltaSec (negative = earlier), leaving every other clip where it is.
| Input | Type | |
|---|---|---|
clipIds | array of string | Required |
deltaSec | number | Required |
add_overlay
Lay a bin video or image ON TOP of the picture as an overlay (picture-in-picture, B-roll over the speaker, a logo). tlStart (default playhead), durationSec (video: up to its length; image: default to the end of the picture), lane (default a new row on top), x / y (centre offset, −0.5..0.5, y negative = up) and scale (1 = 35% of the canvas width, the PiP default; scale = wantedWidthPx / (0.35 × canvas width)). Returns clipId — refine with set_transform, animate, set_transition. mediaId from list_media.
| Input | Type | |
|---|---|---|
mediaId | string | Required |
tlStart | number | |
durationSec | number | |
lane | integer ≥ 0 | |
x | number | |
y | number | |
scale | number |
place_overlay
Move an overlay clip to another row (lane, 0 = bottom overlay row) and/or another start (tlStart, timeline seconds). Rows emptied by the move disappear.
| Input | Type | |
|---|---|---|
clipId | string | Required |
lane | integer ≥ 0 | Required |
tlStart | number ≥ 0 | Required |
place_audio_clip
Move an audio clip to a new start (tlStart) and optionally onto another track (trackId from get_project_digest). Omit trackId and pass trackName to put it on a NEW track.
| Input | Type | |
|---|---|---|
clipId | string | Required |
tlStart | number ≥ 0 | Required |
trackId | string | |
trackName | string |
move_layer_row
Move a whole timeline row to another height in the stack: the row at lane goes to row index to (0 = bottom). Everything on that row moves with it. For one object use set_layer_order.
| Input | Type | |
|---|---|---|
lane | integer ≥ 0 | Required |
to | integer ≥ 0 | Required |
delete_overlay_row
Delete one overlay row (lane) with every clip on it; the rows above move down. One undo step.
| Input | Type | |
|---|---|---|
lane | integer ≥ 0 | Required |
delete_audio_track
Delete an audio track and every clip on it (an empty track too). One undo step.
| Input | Type | |
|---|---|---|
trackId | string | Required |