Remove the jogger from the video completely. Keep the fountain, path, trees, benches, sunlight, and the original locked camera unchanged. Seamless background inpainting, no new people or objects. No logos, no readable text, no watermark.
Gemini Omni Flash Video Edit API
google/gemini-omni-flash/video-editGemini Omni Flash Video Edit 通过自然语言指令修订单条源视频,支持对话式指定修改内容、原生音频更新,以及 720p 至 4K 分辨率输出。它在应用目标修改的同时,保留你指定的主体、运镜连贯与时间连续性。
拖拽文件、粘贴剪贴板素材,或输入 URL。
1/1 个素材
示例
REST API
快速开始
完成 API 鉴权,提交源视频与编辑提示词,再用任务 ID 取回修订片段。
连接 Vidgo API
创建 API 密钥,仅保存在服务端,并发送 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-flash/video-edit",
"input": {
"prompt": "Remove the jogger from the video completely. Keep the fountain, path, trees, benches, sunlight, and the original locked camera unchanged. Seamless background inpainting, no new people or objects. No logos, no readable text, no watermark.",
"resolution": "720p",
"aspect_ratio": "16:9",
"video_urls": [
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-flash/video-edit/v1/01/input-source.mp4"
]
}
}
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 接收 webhook 通知。
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-flash/video-edit",
"input": {
"prompt": "Remove the jogger from the video completely. Keep the fountain, path, trees, benches, sunlight, and the original locked camera unchanged. Seamless background inpainting, no new people or objects. No logos, no readable text, no watermark.",
"resolution": "720p",
"aspect_ratio": "16:9",
"video_urls": [
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-flash/video-edit/v1/01/input-source.mp4"
]
}
}
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 参数
下表列出可用输入参数、类型与默认值。请求示例还包含必填的顶层 model 字段。
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| prompt | string | 是 | — | 去除首尾空格后 1–20,000 个字符。 |
| video_urls | string[] | 是 | — | 必须提供恰好一个公开可访问的 HTTP(S) 视频 URL;缺失、空数组或多项均拒绝。不接收 duration,此端点不设置源视频时长限制。 |
| resolution | string | 否 | 720p | 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 | 任务创建时间,日期时间格式。 |
| 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 | status 为 failed 时的失败详情。 |
任务生命周期
在 status 为 not_started 或 running 时继续查询。到达 finished 或 failed 后结束轮询,并分别处理输出文件或错误详情。
not_started任务已受理,等待开始。
running生成进行中。继续用同一 task_id 轮询。
finished生成成功。从 data.files[].file_url 读取全部视频地址。
failed生成因错误停止。读取 data.error_message 并停止轮询。
轮询与错误
- 认证收到 401 时,检查 Authorization 中的 Bearer API 密钥,更新凭证后重试。
- 校验收到 400 时,根据响应详情核对必填字段、参数范围与可用积分,调整后重新提交。
- 网络与超时状态查询遇网络错误或超时,保留原 task_id 重试查询,再按返回的任务状态处理结果。
- 轮询间隔以 2 秒为基准间隔轮询状态,较长任务可逐步加大间隔。
- 终态仅在 not_started 或 running 时继续;一旦 finished 或 failed 立即停止。
- 回调选项可在请求顶层提供 callback_url 接收最终扁平任务对象;投递失败时仍可轮询。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 输入模式 | 提示词 + 1 条源视频 | 一条公开源片,加上自然语言编辑指令。 |
| 源视频 | MP4 / MOV / WebM | video_urls 中恰好 1 个公开 HTTP(S) 视频 URL。 |
| 输出 | 视频 | 返回异步任务 ID;完成后包含带原生音频的修订视频文件。 |
| 分辨率 | 720p / 1080p / 4k | 默认为 720p。 |
| 画面比例 | 16:9 / 9:16 | 默认为 16:9。 |
| 计费依据 | 按次生成 | 720p/1080p:300 积分。4k:400 积分。 |
相关模型
Gemini Omni Flash Video Edit API 常见问题
Gemini Omni Flash Video Edit API 是什么?
Gemini Omni Flash Video Edit 是 Google DeepMind 用于对话式视频修订的多模态模型。它通过自然语言指令编辑单条源片,在更新目标元素并同步原生音频的同时,保留你要求继续保留的画面与运镜连贯,并支持 720p 至 4K 输出。基于 Gemini 统一多模态架构,它将修改定位到指定目标,无需从零重建整镜。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Gemini Omni Flash Video Edit 如何指定保留区域?
在修改请求后另写保留指令,例如保留街道背景与原始运镜。用位置、颜色或服饰指向主体,模型即可知道哪些内容保持不动。
Gemini Omni Flash Video Edit 如何确定片段时长?
输出长度跟随你提交的源视频。提供 video_urls 与编辑提示词,再选择分辨率与画幅;积分按本页价格说明中的分辨率档位计算。
Gemini Omni Flash Video Edit 能刷新对白与配乐吗?
能。在提示词中描述新的台词、配乐情绪或环境声,声音修订会随画面写入输出 MP4。
Gemini Omni Flash Video Edit 接受哪些源片格式?
video_urls 恰好提交 1 个公开 HTTP(S) 视频 URL,格式为 MP4、MOV 或 WebM。该片段即为待修订素材;完整字段说明见本页参数区。
Gemini Omni Flash Video Edit 何时适合用 4K?
修订母带需要更清晰纹理与光影以便终稿交付时选 4K。日常编辑先用 720p 或 1080p——同一对话式流程、积分更低。
Gemini Omni Flash Video Edit 积分如何计算?
按次按分辨率扣积分:720p 与 1080p 为 300 积分($1.50),4K 为 400 积分($2.00)。详见本页价格说明。















