Remove object from video
curl --request POST \
--url https://api.mountsea.ai/gemini/video/object/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videoId": "CAUSJD...",
"imageMask": "/9j/4AAQSkZJRg...",
"prompt": "remove the white cloud"
}
'import requests
url = "https://api.mountsea.ai/gemini/video/object/remove"
payload = {
"videoId": "CAUSJD...",
"imageMask": "/9j/4AAQSkZJRg...",
"prompt": "remove the white cloud"
}
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...',
imageMask: '/9j/4AAQSkZJRg...',
prompt: 'remove the white cloud'
})
};
fetch('https://api.mountsea.ai/gemini/video/object/remove', 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/remove",
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...',
'imageMask' => '/9j/4AAQSkZJRg...',
'prompt' => 'remove the white cloud'
]),
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/remove"
payload := strings.NewReader("{\n \"videoId\": \"CAUSJD...\",\n \"imageMask\": \"/9j/4AAQSkZJRg...\",\n \"prompt\": \"remove the white cloud\"\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/remove")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoId\": \"CAUSJD...\",\n \"imageMask\": \"/9j/4AAQSkZJRg...\",\n \"prompt\": \"remove the white cloud\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/gemini/video/object/remove")
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 \"imageMask\": \"/9j/4AAQSkZJRg...\",\n \"prompt\": \"remove the white cloud\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}Video (Veo)
Remove Object from Video
Remove an object from a specific area of the video using a mask. White areas in the mask indicate the object to remove. imageMask is required for removal operations.
POST
/
gemini
/
video
/
object
/
remove
Remove object from video
curl --request POST \
--url https://api.mountsea.ai/gemini/video/object/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videoId": "CAUSJD...",
"imageMask": "/9j/4AAQSkZJRg...",
"prompt": "remove the white cloud"
}
'import requests
url = "https://api.mountsea.ai/gemini/video/object/remove"
payload = {
"videoId": "CAUSJD...",
"imageMask": "/9j/4AAQSkZJRg...",
"prompt": "remove the white cloud"
}
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...',
imageMask: '/9j/4AAQSkZJRg...',
prompt: 'remove the white cloud'
})
};
fetch('https://api.mountsea.ai/gemini/video/object/remove', 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/remove",
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...',
'imageMask' => '/9j/4AAQSkZJRg...',
'prompt' => 'remove the white cloud'
]),
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/remove"
payload := strings.NewReader("{\n \"videoId\": \"CAUSJD...\",\n \"imageMask\": \"/9j/4AAQSkZJRg...\",\n \"prompt\": \"remove the white cloud\"\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/remove")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoId\": \"CAUSJD...\",\n \"imageMask\": \"/9j/4AAQSkZJRg...\",\n \"prompt\": \"remove the white cloud\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/gemini/video/object/remove")
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 \"imageMask\": \"/9j/4AAQSkZJRg...\",\n \"prompt\": \"remove the white cloud\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}Overview
Remove an object from a specific area of a previously generated video using a mask image.imageMaskis required for removal operations- Requires a valid
videoId(mediaId) from a previously generated video
The
imageMask should be a base64-encoded JPEG image where white areas indicate the object to remove. The AI will fill in the removed area with contextually appropriate content.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..."
Base64 encoded JPEG image mask (required). White areas indicate the object to remove.
Example:
"/9j/4AAQSkZJRg..."
Prompt describing what to remove (can be empty string)
Example:
"remove the white cloud"
Response
201 - application/json
task id, used to get task result later
⌘I