Skip to main content

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.
Use 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 (including transition and depth on media and text overlays). Media and text overlay adds accept depth too, so new overlays can go behind the presenter without a second call. Text overlay adds also accept transition, so a new title can fade in without a follow-up update.
  • Blur and highlight adds and updates accept transition (smooth or hard_cut), as on the standalone tools. New blurs and highlights default to hard_cut.
  • update_media_overlay and update_text_overlay accept zIndex to change stacking order, as on update_overlay and update_text_overlay. Each zIndex applies 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 its operationId. A negative zIndex rejects the whole batch.
  • Media and text overlay adds and updates accept animation for 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 fontId for a font in your private or workspace library, instead of fontFamily. See Use a custom font; an unknown font rejects the whole batch before any edits are applied.
  • Zoom operations use zoomType for the zoom variant, because type selects the batch operation itself.
  • Cuts, transcript edits and clip settings are not batchable. For custom layout geometry or a layout’s crop, call add_layout or update_layout separately for each layout; apply_video_edits accepts 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 operationId in 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_argument naming 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 accept the same B-roll media field as add_layout and update_layout.
  • A time-ranged add_layout can provide media and omit layout to use the default full-frame B-roll layout. It trims, splits, or removes overlapping layouts to make room, exactly like the standalone call.
  • update_layout can 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_layout accepts base (or the operationId of a clip-spanning add), but the base layout accepts layout only. Updating base also changes every layout that reports followsBase: true, so one operation covers them.
  • remove_layout rejects base and any layout that reports followsBase: true, since removing it wouldn’t change what the clip shows. To change that range, add_layout over it (which keeps the camera style and pop-out) or update_layout base.

Retrying a batch

Without an idempotency key the call is not idempotent. Re-sending a batch after a success re-applies its adds as new resources, and its removes then fail validation because their targets are already gone — so the retried batch is rejected as a whole.
  • To resend safely after losing a response, include _meta.idempotencyKey and 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 unavailable error.
  • A revision in the response is proof the batch landed.

Examples

Two adds on one clip:
A mixed batch — add a zoom, update an existing text overlay, and remove a sound effect in one revision:
Last modified on October 30, 2026