跳转到主要内容
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>"
}

概述

在之前生成的视频中添加物体。您可以使用可选的图像蒙版控制放置位置。

两种模式

模式描述
imageMask在蒙版区域插入(白色像素 = 插入区域)
imageMaskAI 根据提示词自动确定最佳放置位置
需要来自之前生成视频的有效 videoId(mediaId)。
imageMask 应为 base64 编码的 JPEG 图像,其中白色区域表示应插入物体的位置。

授权

Authorization
string
header
必填

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

请求体

application/json
videoId
string
必填

Video ID (mediaId) from a previously generated video

示例:

"CAUSJD..."

prompt
string
必填

Prompt describing what to insert

示例:

"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.

示例:

"/9j/4AAQSkZJRg..."

响应

201 - application/json
taskId
string
必填

task id, used to get task result later