apply_video_edits
ChatGPT’s tool list does not include
apply_video_edits. Use the individual tools linked under Supported operations instead. Claude and other clients that do not identify themselves as OpenAI-hosted clients keep this tool.apply_video_edits in a client that lists it whenever you need two or more timeline edits. It takes up to 200 mixed operations across any clips in one video, validates the whole request, and applies it as a single editor revision — substantially faster than repeated single-edit calls. For one edit, the standalone tool is still the convenient choice.
All times are milliseconds on the clip’s playback timeline — the video as watched, with cuts applied. It is the same timeline as
get_transcript, thumbnails, and previews, so nothing needs converting. A start at or past the end of the clip is rejected with a 400.string
required
Video ID
object[]
required
1–200 operations, run in array order. Each one carries
type, a unique operationId, a clipId, and the same fields as the standalone tool it mirrors, except that layout adds and updates cannot use kind: "custom" or crop.Supported operations
- Updates and removes take the target resource ID and the
clipId; updates also take only the fields being changed (includingtransitionanddepthon media and text overlays). Media and text overlay adds acceptdepthtoo, so new overlays can go behind the presenter without a second call. Text overlay adds also accepttransition, so a new title can fade in without a follow-up update. - Blur and highlight adds and updates accept
transition(smoothorhard_cut), as on the standalone tools. New blurs and highlights default tohard_cut. update_media_overlayandupdate_text_overlayacceptzIndexto change stacking order, as onupdate_overlayandupdate_text_overlay. EachzIndexapplies to the stack as earlier operations in the batch left it: adds join the front, removes leave the stack, and you can restack an overlay added earlier in the same batch by itsoperationId. A negativezIndexrejects the whole batch.- Media and text overlay adds and updates accept
animationfor entrance and exit effects. See Animate overlays and Animate text overlays. Invalid animation values reject the whole batch before any edits apply. - Text overlay adds and updates accept
fontIdfor a font in your private or workspace library, instead offontFamily. See Use a custom font; an unknown font rejects the whole batch before any edits are applied. - Zoom operations use
zoomTypefor the zoom variant, becausetypeselects the batch operation itself. - Cuts, transcript edits and clip settings are not batchable. For custom layout geometry or a layout’s crop, call
add_layoutorupdate_layoutseparately for each layout;apply_video_editsaccepts named layout kinds only.
How a batch runs
- Results match by
operationId. Adds return the created resource ID; updates and removes return the affected one. - Later operations can reference earlier adds. Pass an add’s
operationIdin place of the resource ID — for example, add a zoom and re-time it later in the same batch. - Validation is all-or-nothing. Schema, resource existence, timeline bounds, and cross-references are checked upfront. One invalid operation rejects the whole call with
invalid_argumentnaming that operation, before anything is applied. - Removed resources stay removed. Removing a resource that doesn’t exist (or was already removed) is an error, and later operations in the batch can no longer target it.
Layout operations
Layout operations
Layout operations accept the same B-roll
media field as add_layout and update_layout.- A time-ranged
add_layoutcan providemediaand omitlayoutto use the default full-frame B-roll layout. It trims, splits, or removes overlapping layouts to make room, exactly like the standalone call. update_layoutcan replace either media slot while keeping the other, and can reshape media-bearing layouts.- An add without a range sets the clip’s base layout and returns the ID
base.update_layoutacceptsbase(or theoperationIdof a clip-spanning add), but the base layout acceptslayoutonly. Updatingbasealso changes every layout that reportsfollowsBase: true, so one operation covers them. remove_layoutrejectsbaseand any layout that reportsfollowsBase: true, since removing it wouldn’t change what the clip shows. To change that range,add_layoutover it (which keeps the camera style and pop-out) orupdate_layoutbase.
Retrying a batch
- To resend safely after losing a response, include
_meta.idempotencyKeyand reuse the same key — see Retrying tool calls safely. - Otherwise, retry only when the previous call definitely did not apply, such as after a rate limit or a pre-execution
unavailableerror. - A
revisionin the response is proof the batch landed.