Replace only the woman's burgundy jacket with the mustard-yellow raincoat shown in the reference image. Match its mustard fabric, brown toggle fastenings, lower patch pockets and folded hood; the hood stays down. Make the coat fit her naturally throughout the moving shot. Preserve her exact face, dark curly hair, hands, dark trousers, walking action and timing. Preserve the coastal path, cliffs, ocean, overcast light and original camera movement. Keep the existing wind, surf and footsteps without adding speech or music. No new people, text, logos or advertising.
Gemini Omni 1.1 Flash Video Edit API
google/gemini-omni-1.1-flash/video-editGemini Omni 1.1 Flash(Video Edit)通过自然语言编辑 3–10 秒源视频,支持参考图片引导、原生音频和 360p 至 4K 输出。明确需要修改的对象与保留的画面内容,为已有片段调整人物、物体、视觉风格或声音,制作新的创意版本。
拖拽文件、粘贴剪贴板素材,或输入 URL。
1/1 个素材
拖拽文件、粘贴剪贴板素材,或输入 URL。
1/5 个素材
示例
REST API
快速开始
完成 API 认证,提交素材与生成指令,再通过任务 ID 获取视频结果。
连接 Vidgo API
创建 API Key,仅保存在服务端,并发送 Authorization: Bearer VIDGO_API_KEY。
- 接口
- POST
https://api.vidgo.ai/api/generate/submit - 认证
- Authorization: Bearer VIDGO_API_KEY
提交一次生成任务
按请求示例填写当前端点的素材与设置,提交后保存 task_id,用于后续查询生成进度和结果。
REQUEST_BODY=$(cat <<'JSON'
{
"model": "google/gemini-omni-1.1-flash/video-edit",
"input": {
"prompt": "Replace only the woman's burgundy jacket with the mustard-yellow raincoat shown in the reference image. Match its mustard fabric, brown toggle fastenings, lower patch pockets and folded hood; the hood stays down. Make the coat fit her naturally throughout the moving shot. Preserve her exact face, dark curly hair, hands, dark trousers, walking action and timing. Preserve the coastal path, cliffs, ocean, overcast light and original camera movement. Keep the existing wind, surf and footsteps without adding speech or music. No new people, text, logos or advertising.",
"reference_video_urls": [
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-1.1-flash/video-edit/v2/01/input-source.mp4"
],
"resolution": "720p",
"aspect_ratio": "16:9",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-1.1-flash/video-edit/v2/01/input-reference.webp"
]
}
}
JSON
)
RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
CODE=$(printf '%s' "$RESPONSE" | jq -r '.code // empty')
if [ "$CODE" != "0" ] && [ "$CODE" != "200" ]; then
printf 'API error: %s
' "$RESPONSE" >&2
exit 1
fi
printf '%s
' "$RESPONSE"等待结果
用 task_id 查询,not_started/running 继续,finished/failed 停止。成功后读取 data.files[].file_url。
查询状态
GET https://api.vidgo.ai/api/generate/status/{task_id}以 2 秒为基准间隔轮询状态,长时间任务可适当拉长间隔。仅在 not_started 或 running 时继续,遇到 finished 或 failed 立即停止。也可以在同一请求中配置 callback_url 接收回调通知。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "running",
"created_time": "2026-09-15T10:00:00Z"
}
}{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "finished",
"files": [
{
"file_url": "https://storage.vidgo.ai/generated/video.mp4",
"file_type": "video"
}
],
"created_time": "2026-08-22T10:00:00Z",
"progress": 100,
"error_message": null
}
}完整可运行示例
展开后可查看包含 HTTP 与业务码检查、task_id 校验、轮询、终态处理和超时边界的完整脚本。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "google/gemini-omni-1.1-flash/video-edit",
"input": {
"prompt": "Replace only the woman's burgundy jacket with the mustard-yellow raincoat shown in the reference image. Match its mustard fabric, brown toggle fastenings, lower patch pockets and folded hood; the hood stays down. Make the coat fit her naturally throughout the moving shot. Preserve her exact face, dark curly hair, hands, dark trousers, walking action and timing. Preserve the coastal path, cliffs, ocean, overcast light and original camera movement. Keep the existing wind, surf and footsteps without adding speech or music. No new people, text, logos or advertising.",
"reference_video_urls": [
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-1.1-flash/video-edit/v2/01/input-source.mp4"
],
"resolution": "720p",
"aspect_ratio": "16:9",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-1.1-flash/video-edit/v2/01/input-reference.webp"
]
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
BUSINESS_CODE=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Submit failed:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
START_TIME=$(date +%s)
POLL_DELAY=2
while true; do
if [ $(( $(date +%s) - START_TIME )) -ge 600 ]; then
printf 'Timed out after 600 seconds
' >&2
exit 1
fi
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
BUSINESS_CODE=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Status request failed:
%s
' "$STATUS_RESPONSE" >&2
exit 1
fi
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep "$POLL_DELAY"
if [ "$POLL_DELAY" -lt 10 ]; then POLL_DELAY=$((POLL_DELAY + 1)); fi
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
doneinput 参数
下表列出 input 对象的可用参数、类型与默认值;请求示例同时展示顶层必填字段 model。按当前任务准备素材并配置输出。
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| prompt | string | 是 | — | 去除首尾空格后为 1–20,000 个字符。 |
| reference_video_urls | string[] | 是 | — | 恰好 1 个公开视频 URL。源视频时长必须是 3–10 秒。 |
| reference_image_urls | string[] | 否 | — | 可省略或传空数组;最多 5 个公开图片 URL,用于目标外观或风格参考。 |
| resolution | string | 否 | 720p | 360p、720p、1080p 或 4k。 |
| aspect_ratio | string | 否 | 16:9 | 16:9 或 9:16。 |
响应字段
提交成功后返回任务 ID;状态查询提供任务进度、输出文件,以及任务失败时的错误详情。
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 业务结果码;成功响应使用 0 或 200。 |
| message | string | 可读说明或错误详情。 |
| data.task_id | string | 用于状态查询路径的任务 ID。 |
| data.status | string | not_started、running、finished 或 failed。 |
| data.created_time | string | 任务创建时间,date-time 格式。 |
| data.progress | integer | 任务进度(0–100),以查询结果为准。 |
| data.files[] | array | 成功任务的全部输出文件,按响应顺序返回。 |
| data.files[].file_url | string | 生成视频的公开 URL。 |
| data.files[].file_type | string | 文件类型,例如 video。 |
| data.error_message | string | null | 状态为 failed 时的失败详情。 |
任务生命周期
在 not_started 或 running 状态下继续查询;收到 finished 或 failed 后结束轮询,并分别处理输出文件或错误详情。
not_started任务已接受,等待开始。
running正在生成。继续使用同一 task_id 轮询。
finished生成成功。从 data.files[].file_url 读取视频地址。
failed生成失败。读取 data.error_message 并停止轮询。
轮询与错误
- 认证收到 401 时,检查 Authorization 中的 Bearer API Key,更新凭据后重试。
- 校验收到 400 时,依据响应说明核对必填素材、参数取值与可用积分,完成相应调整后重新提交。
- 网络与超时状态查询遇到网络错误或超时时,保留原 task_id 并重试查询,再根据返回的任务状态处理结果。
- 轮询间隔以 2 秒为基准间隔发起状态查询;如任务耗时较长,可逐步增加查询间隔。
- 终态仅在 not_started 或 running 时继续。遇到 finished 或 failed 立即停止。
- 回调选项可在请求顶层提供 callback_url 接收终态任务对象;投递失败时仍可轮询。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 输入模式 | 提示词 + 1 条源视频 | 结合一段源视频与编辑指令,可添加最多 5 张参考图片指导目标外观。 |
| 源视频 | MP4 / MOV / WebM | 恰好一条,3–10 秒,最大 100 MiB。 |
| 输出 | 带原生音频的视频 | 提交后返回异步任务 ID。 |
| 分辨率 | 360p / 720p / 1080p / 4k | 默认 720p。 |
| 画面比例 | 16:9 / 9:16 | 默认 16:9。 |
| 计费依据 | 按次生成 | 360p、720p、1080p 为 120 积分。4k 为 180 积分。 |
相关模型
Gemini Omni 1.1 Flash Video Edit API 常见问题
Gemini Omni 1.1 Flash Video Edit API 是什么?
Gemini Omni 1.1 Flash Video Edit 是 Google 研发的指令式视频编辑模型。它基于 3–10 秒源视频与自然语言指令进行局部修改,支持配合最多 5 张参考图精确定制外观,并同步重构与动作匹配的原生音频。基于 Gemini 多模态对话式交互架构,它以源视频的人物、镜头轨迹与时序节奏为参考,对目标元素进行编辑。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Gemini Omni 1.1 Flash 视频编辑支持修改哪些画面元素?
支持人物服饰材质与颜色替换、画面中特定物体增删、背景环境与天气变换,以及整体艺术风格迁移。通过明确的自然语言指令,即可指定局部修改区域,而无需繁琐的人工打遮罩。
Gemini Omni 1.1 Flash 视频编辑能单独替换背景音乐吗?
能。模型支持在编辑画面元素的同时或单独对音频通道进行重塑。例如在提示词中输入“保留原本的脚步环境音,将背景轻音乐替换为紧张的交响乐变奏”,模型即可输出重新配乐且与画面动作精准对齐的成片。
Gemini Omni 1.1 Flash 视频编辑支持上传参考图片吗?
支持。最多可上传 5 张参考图片作为编辑目标的外观指导。例如在指令中要求“将画面中的背包换成参考图中的皮质双肩包”,结合参考图片能大幅提高外观改造的精准度。
Gemini Omni 1.1 Flash 视频编辑能保持原视频镜头运动吗?
能。模型在处理局部编辑时,以原视频的摄影机轨迹、运镜速度与时间节奏为参考,对指定内容进行修改,帮助保持镜头节奏连贯。
用于编辑的源视频在 Gemini Omni 1.1 Flash 中有时长限制吗?
源视频时长建议在 3 到 10 秒之间,文件支持 MP4、MOV 或 WebM 格式。时长在范围内的短片能获得最稳定的时空连续性分析与编辑处理效率。
如何通过自然语言减少 Gemini Omni 1.1 Flash 视频编辑的误改?
建议采用“修改项 + 保留项”的双重描述结构。例如先写“将男士外套改为深灰色风衣”,紧接着补充“保持原有的面容发型、运镜路径与背景行人不变”,清晰的分句界限能有效约束模型的修改边界。















