Skip to main content
POST
/
gemini
/
video
/
object
/
insert
Insert object into video
curl --request POST \
  --url https://api.mountsea.ai/gemini/video/object/insert \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "videoId": "CAUSJD...",
  "prompt": "add a flying pig with black wings",
  "imageMask": "/9j/4AAQSkZJRg..."
}
'
{
  "taskId": "<string>"
}

Overview

Add an object to a previously generated video. You can control placement with an optional image mask.

Two Modes

ModeDescription
With imageMaskInsert at the masked area (white pixels = insertion zone)
Without imageMaskAI automatically determines optimal placement based on the prompt
Requires a valid videoId (mediaId) from a previously generated video.
The imageMask should be a base64-encoded JPEG image where white areas indicate where the object should be inserted.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
videoId
string
required

Video ID (mediaId) from a previously generated video

Example:

"CAUSJD..."

prompt
string
required

Prompt describing what to insert

Example:

"add a flying pig with black wings"

imageMask
string

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
taskId
string
required

task id, used to get task result later