Edit video
edit_videoChange an existing video clip with a text instruction to add, remove, replace, restyle, relight, or swap background, keeping all else unchanged.
Instructions
Change an existing clip with an instruction (add, remove or replace objects, restyle, relight, change the background) with Gemini Omni Flash, keeping everything else. Pass the jobId of a finished clip (Omni clips are edited in conversation) or a video file of at most 10 s. Asynchronous like generate_video; about $0.10 per second of video at 720p.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | No | A completed video job to edit. Omni clips are edited in conversation (Google keeps the context); other clips are sent as their saved file. Pass jobId or video. | |
| model | No | Model ID or alias; default omni (the only model that edits videos). | |
| video | No | Or a video file to edit: file path, gemini-media:// URI or data: URI. At most 10 seconds and 20 MB. | |
| prompt | Yes | The change, stated simply, ending with 'Keep everything else the same.' (e.g. 'Make the phone invisible. Keep everything else the same.') | |
| outputName | No | Optional base file name for the saved video. Defaults to the source name plus -edit. | |
| resolution | No | 360p, 720p (default), 1080p or 4k (1080p and 4k are upscaled). | |
| waitSeconds | No | Block up to this many seconds for the result (default 0 = return a job handle immediately). Keep under your client's tool timeout. | |
| approvedCostUsd | No | Only needed above the confirmation threshold: the cost in USD the user approved. | |
| referenceImages | No | Optional images to bring into the clip; refer to them as <IMAGE_REF_0>, <IMAGE_REF_1>... in the prompt. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cost | Yes | ||
| next | No | Suggested next step | |
| error | No | ||
| files | No | ||
| jobId | Yes | Opaque handle; pass it to get_video, extend_video or edit_video | |
| model | Yes | ||
| state | Yes | working, completed, failed or filtered | |
| warnings | No | ||
| elapsedSeconds | Yes | ||
| remoteExpiresAt | No | When Google deletes the server-side copy; extend before this time |