Skip to content

edit_video operations

edit_video takes a list of operations. Each one is an object with an op name and that operation’s arguments:

{
"job_id": "",
"operations": [
{ "op": "set_caption_style", "font_size": 64, "position": "bottom" },
{ "op": "set_track_enabled", "role": "bgm", "enabled": false }
]
}

There are 33 operations. They apply in order, atomically: if any one would leave the video invalid, the whole batch writes nothing.

Captions

Captions are edited through their shared style, not item by item.

set_caption_styleChange how the captions look — preset, font, size, colour, position.
ArgumentTypeDescription
style_idstringCaption style id (omit to change every caption style).
presetstringOne of: pop, glow, bounce, colorwave, boxed, highlight, typewriter, clean, classic.
font_familystringFont family name.
font_sizenumberIn video pixels.
font_weightstringOne of: normal, bold, 100, 200, 300, 400, 500, 600, 700, 800, 900.
text_transformstringOne of: none, uppercase, lowercase, capitalize.
fillstringText colour (hex).
positionstringOne of: top, bottom, center.
margin_vnumberDistance from its edge, in pixels.
max_linesnumberLines on screen at once (1-6).
background_colorstringBackground colour (hex), or null to clear it.
shadowboolean
karaoke_modestringOne of: word, syllable, none.
highlight_fillstringKaraoke highlight colour (hex).
scale_caption_sizeMake the captions bigger or smaller by a multiplier.
ArgumentTypeDescription
factor requirednumber1.25 = 25% bigger, 0.8 = smaller.
style_idstringCaption style id (omit to change every caption style).
set_captions_enabledTurn the captions on or off.
ArgumentTypeDescription
enabled requiredbooleanOn or off.
set_caption_textFix the wording of one caption.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
text requiredstringThe corrected caption line.
apply_caption_override_to_allGive every caption the same position and size tweak (after nudging one into place).
ArgumentTypeDescription
caption_xnumberHorizontal centre in video pixels.
caption_ynumberTop edge in video pixels.
caption_scalenumberMultiplier on the style's font size.
caption_max_widthnumberText box width cap, in video pixels.
except_item_idstringCaption to leave alone — usually the one already positioned.

Graphics

The overlay cards — their copy, their theme and how they display.

set_graphic_contentFix or reword the text inside a graphic.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
content requiredobjectField → new value, e.g. {"quote": "…", "speaker": "…"} or {"value": "58%", "label": "of readers"}.
set_graphics_themeChange the brand look of every graphic — colours, corners, font, animation speed.
ArgumentTypeDescription
brand_namestring
primary_colorstring
secondary_colorstring
accent_colorstring
background_colorstringBackground colour (hex), or null to clear it.
text_colorstring
font_familystringFont family name.
corner_stylestringOne of: sharp, rounded, pill.
shadow_presetstringOne of: none, subtle, medium, bold.
animation_speedstringOne of: fast, normal, slow.
set_graphic_codeLand revised Remotion code for a dynamic graphic.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
tsx_code requiredstringThe revised Remotion TSX, as returned by the graphic-revision capability.
editable_propsarrayEditable-prop descriptors that came back with the code.
set_graphic_displayChange how a graphic is presented — overlay or full-screen takeover, where it sits, its takeover backdrop.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
display_modestringOne of: takeover, overlay, speaker_pip.
graphic_positionstringOne of: center, lower_third, upper_third, full_screen.
takeover_background_colorstringBackdrop colour (hex) behind a takeover graphic.
box_xnumberGraphic box left edge, in video pixels.
box_ynumberGraphic box top edge, in video pixels.
box_widthnumberGraphic box width, in video pixels.
box_heightnumberGraphic box height, in video pixels.

Assets

The registry of files a video draws on.

add_assetRegister a file (a clip, image, or audio track) so it can be placed on the timeline.
ArgumentTypeDescription
url requiredstringAbsolute http(s) URL of the file.
asset_typestringMedia type of the file. One of: video, audio, image.
asset_idstringAsset id (e.g. broll_001), from the edit state — not an item id.
widthnumberWidth in pixels.
heightnumberHeight in pixels.
duration_secondsnumberLength of the source file in seconds.
replace_assetSwap the file behind an existing asset, keeping every placement that references it.
ArgumentTypeDescription
asset_id requiredstringAsset id (e.g. broll_001), from the edit state — not an item id.
url requiredstringAbsolute http(s) URL of the file.
asset_typestringMedia type of the file. One of: video, audio, image.
widthnumberWidth in pixels.
heightnumberHeight in pixels.
duration_secondsnumberLength of the source file in seconds.
set_asset_metaCorrect an asset's dimensions or duration (e.g. after probing the real file).
ArgumentTypeDescription
asset_id requiredstringAsset id (e.g. broll_001), from the edit state — not an item id.
widthnumberWidth in pixels.
heightnumberHeight in pixels.
duration_secondsnumberLength of the source file in seconds.

Tracks

Whole lanes — mute one, change its level, add or remove it.

set_track_enabledTurn a whole lane on or off (e.g. drop the music or the b-roll).
ArgumentTypeDescription
enabled requiredbooleanOn or off.
track_idstringTrack id, when addressing one specific lane.
rolestringLane role — the usual way to address a lane. One of: main, broll, graphics, branding, narration, voiceover, bgm, sfx, primary, translation, color, blur, lut, curves.
track_typestringAddress every track of a type. One of: visual, audio, captions, effects.
set_track_volumeSet the level of a whole audio lane.
ArgumentTypeDescription
volume requirednumber0 = silent, 1 = unchanged, up to 2.
track_idstringTrack id, when addressing one specific lane.
rolestringLane role — the usual way to address a lane. One of: main, broll, graphics, branding, narration, voiceover, bgm, sfx, primary, translation, color, blur, lut, curves.
track_typestringAddress every track of a type. One of: visual, audio, captions, effects.
set_track_soloSolo an audio lane in the mix.
ArgumentTypeDescription
solo requiredbooleanSolo an audio lane. Not exclusive — several can be soloed at once.
track_idstringTrack id, when addressing one specific lane.
rolestringLane role — the usual way to address a lane. One of: main, broll, graphics, branding, narration, voiceover, bgm, sfx, primary, translation, color, blur, lut, curves.
track_typestringAddress every track of a type. One of: visual, audio, captions, effects.
add_trackAdd an empty lane.
ArgumentTypeDescription
track_type requiredstringAddress every track of a type. One of: visual, audio, captions, effects.
role requiredstringLane role — the usual way to address a lane. One of: main, broll, graphics, branding, narration, voiceover, bgm, sfx, primary, translation, color, blur, lut, curves.
namestringUser-facing lane label, e.g. "B-roll 2".
remove_trackDelete a lane and everything on it.
ArgumentTypeDescription
track_id requiredstringTrack id, when addressing one specific lane.
rename_trackRelabel a lane.
ArgumentTypeDescription
track_id requiredstringTrack id, when addressing one specific lane.
name requiredstringUser-facing lane label, e.g. "B-roll 2".

Transitions

How one shot becomes the next.

set_transitionsRestyle the transitions already in the cut.
ArgumentTypeDescription
kind requiredstring"cut" removes the effect. One of: cut, crossfade, fade_through_black, whip_pan, zoom_punch, smooth_zoom, slide, wipe, clock_wipe, flip, glitch, light_leak, film_burn.
transition_secondsnumberHow long each transition runs.
track_idstringTrack id, when addressing one specific lane.
set_item_transitionSet the transition on one item — how it enters, how it leaves, or a cut between two.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
slotstringWhich end of the item. Ignored when pair_item_id is given (that is always out→in). One of: in, out, both.
pair_item_idstringThe item on the other side of a cut. Given, the same transition is written to this item's `out` and that item's `in`.
kindstring"cut" removes the effect. One of: cut, crossfade, fade_through_black, whip_pan, zoom_punch, smooth_zoom, slide, wipe, clock_wipe, flip, glitch, light_leak, film_burn.
transition_secondsnumberHow long each transition runs.
transition_directionstringOne of: left, right, up, down.
transition_easingstringOne of: linear, ease-in, ease-out, ease-in-out, spring.
transition_intensitynumber0 subtle → 1 strong.
remove_transitionTurn a transition back into a hard cut.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
slotstringWhich end of the item. Ignored when pair_item_id is given (that is always out→in). One of: in, out, both.
pair_item_idstringThe item on the other side of a cut. Given, the same transition is written to this item's `out` and that item's `in`.

Items

Individual clips on the timeline — their timing, source and levels.

add_itemPlace a registered asset on the timeline — b-roll, a logo, a music bed, or a sound effect.
ArgumentTypeDescription
asset_id requiredstringAsset id (e.g. broll_001), from the edit state — not an item id.
start_seconds requirednumberStart time on the finished video's timeline.
end_seconds requirednumberEnd time on the finished video's timeline.
source_start_secondsnumberWhere to start inside the source file. Vary it per placement so one long clip yields different shots.
rolestringLane role — the usual way to address a lane. One of: main, broll, graphics, branding, narration, voiceover, bgm, sfx, primary, translation, color, blur, lut, curves.
track_idstringTrack id, when addressing one specific lane.
volumenumber0 = silent, 1 = unchanged, up to 2.
descriptionstringShort note about what the shot shows.
item_idstringTimeline item id (e.g. broll_item_001), from the edit state.
remove_itemTake an item off the timeline.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
set_item_timingMove an overlay or graphic to a different moment, or change how long it holds.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
start_secondsnumberStart time on the finished video's timeline.
end_secondsnumberEnd time on the finished video's timeline.
set_item_sourceChoose which part of the source file an item plays (its in-point).
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
source_start_seconds requirednumberWhere to start inside the source file. Vary it per placement so one long clip yields different shots.
source_end_secondsnumberOptional out-point inside the source file.
set_item_volumeChange how loud one item is.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
volume requirednumber0 = silent, 1 = unchanged, up to 2.
set_item_fadeFade an item's audio in or out.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
fade_in_secondsnumberSeconds to ramp up from silence.
fade_out_secondsnumberSeconds to ramp down to silence.
set_item_dataUpdate an item's descriptive payload — a music bed's title/artist/loop, a shot's description.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
data requiredobjectField → new value, merged over the existing payload. e.g. {"title": "Hype Bed", "artist": "", "provider": "elevenlabs", "loop": true}.
set_item_transformMove or resize a visual item on screen (its box, not its timing).
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
xnumberLeft edge in video pixels.
ynumberTop edge in video pixels.
wnumberBox width in video pixels.
hnumberBox height in video pixels.
move_itemMove an item to a different moment on its own lane.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
start_seconds requirednumberStart time on the finished video's timeline.
ripplebooleanAlso slide the items after it, closing the gap left behind and opening one at the destination. Off by default; needs an explicit target.
duplicate_itemCopy an item, placing the copy immediately after it.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
start_secondsnumberStart time on the finished video's timeline.
split_itemCut an item in two at a given moment.
ArgumentTypeDescription
item_id requiredstringTimeline item id (e.g. broll_item_001), from the edit state.
split_seconds requirednumberWhere to cut, on the finished video's timeline.

Project

Settings that apply to the whole video.

set_metaRename the video.
ArgumentTypeDescription
titlestringThe video's title.
aspect_ratiostringOne of: 9:16, 16:9, 1:1.