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..."
}
'import requests
url = "https://api.mountsea.ai/gemini/video/object/insert"
payload = {
"videoId": "CAUSJD...",
"prompt": "add a flying pig with black wings",
"imageMask": "/9j/4AAQSkZJRg..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
videoId: 'CAUSJD...',
prompt: 'add a flying pig with black wings',
imageMask: '/9j/4AAQSkZJRg...'
})
};
fetch('https://api.mountsea.ai/gemini/video/object/insert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mountsea.ai/gemini/video/object/insert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'videoId' => 'CAUSJD...',
'prompt' => 'add a flying pig with black wings',
'imageMask' => '/9j/4AAQSkZJRg...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mountsea.ai/gemini/video/object/insert"
payload := strings.NewReader("{\n \"videoId\": \"CAUSJD...\",\n \"prompt\": \"add a flying pig with black wings\",\n \"imageMask\": \"/9j/4AAQSkZJRg...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mountsea.ai/gemini/video/object/insert")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoId\": \"CAUSJD...\",\n \"prompt\": \"add a flying pig with black wings\",\n \"imageMask\": \"/9j/4AAQSkZJRg...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/gemini/video/object/insert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"videoId\": \"CAUSJD...\",\n \"prompt\": \"add a flying pig with black wings\",\n \"imageMask\": \"/9j/4AAQSkZJRg...\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}Video (Veo)
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
/
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..."
}
'import requests
url = "https://api.mountsea.ai/gemini/video/object/insert"
payload = {
"videoId": "CAUSJD...",
"prompt": "add a flying pig with black wings",
"imageMask": "/9j/4AAQSkZJRg..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
videoId: 'CAUSJD...',
prompt: 'add a flying pig with black wings',
imageMask: '/9j/4AAQSkZJRg...'
})
};
fetch('https://api.mountsea.ai/gemini/video/object/insert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mountsea.ai/gemini/video/object/insert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'videoId' => 'CAUSJD...',
'prompt' => 'add a flying pig with black wings',
'imageMask' => '/9j/4AAQSkZJRg...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mountsea.ai/gemini/video/object/insert"
payload := strings.NewReader("{\n \"videoId\": \"CAUSJD...\",\n \"prompt\": \"add a flying pig with black wings\",\n \"imageMask\": \"/9j/4AAQSkZJRg...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mountsea.ai/gemini/video/object/insert")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoId\": \"CAUSJD...\",\n \"prompt\": \"add a flying pig with black wings\",\n \"imageMask\": \"/9j/4AAQSkZJRg...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/gemini/video/object/insert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"videoId\": \"CAUSJD...\",\n \"prompt\": \"add a flying pig with black wings\",\n \"imageMask\": \"/9j/4AAQSkZJRg...\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}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 |
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
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
⌘I