Insert object into video
Gemini Video (Veo 2/3/3.1)
Insert Object into Video
Add an object to the video.
- With imageMask: insert at the masked area (white = insertion zone)
- Without imageMask: AI automatically determines placement based on prompt
POST
Insert object into video
Overview
Add an object to a previously generated video. You can control placement with an optional image mask.Two Modes
| Mode | Description |
|---|---|
With imageMask | Insert at the masked area (white pixels = insertion zone) |
Without imageMask | AI automatically determines optimal placement based on the prompt |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Video ID (mediaId) from a previously generated video
Example:
"CAUSJD..."
Prompt describing what to insert
Example:
"add a flying pig with black wings"
Base64 encoded JPEG image mask (optional). White areas indicate where to insert the object. If not provided, AI auto-determines placement.
Example:
"/9j/4AAQSkZJRg..."
Response
201 - application/json
task id, used to get task result later