Use the reference images only for this astronaut's face, short red hair, and white-and-orange flight suit. New scene: she steps into a vast alien crystal cave, giant luminous crystals refracting teal and violet light, she turns her head looking around in wonder. Camera follows behind her in one steady tracking shot. Audio: echoing footsteps and a low crystalline hum. Keep her identity consistent. No logos, no readable text, no watermark.
Gemini Omni Flash Reference to Video API
google/gemini-omni-flash/reference-to-videoGemini Omni Flash Reference to Video 根据恰好三张参考图与文本提示词生成 4–10 秒短片,支持锁定角色一致性、原生音画口型同步,以及 720p 至 4K 分辨率输出。它在新场景中延续面容、服饰与风格线索,同时增加定向运动、运镜语言与同步声音。
拖拽文件、粘贴剪贴板素材,或输入 URL。
3/3 个素材
示例
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/reference-to-video",
"input": {
"prompt": "Use the reference images only for this astronaut's face, short red hair, and white-and-orange flight suit. New scene: she steps into a vast alien crystal cave, giant luminous crystals refracting teal and violet light, she turns her head looking around in wonder. Camera follows behind her in one steady tracking shot. Audio: echoing footsteps and a low crystalline hum. Keep her identity consistent. No logos, no readable text, no watermark.",
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-flash/reference-to-video/v1/01/input-01.png",
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-flash/reference-to-video/v1/01/input-02.png",
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-flash/reference-to-video/v1/01/input-03.png"
]
}
}
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/reference-to-video",
"input": {
"prompt": "Use the reference images only for this astronaut's face, short red hair, and white-and-orange flight suit. New scene: she steps into a vast alien crystal cave, giant luminous crystals refracting teal and violet light, she turns her head looking around in wonder. Camera follows behind her in one steady tracking shot. Audio: echoing footsteps and a low crystalline hum. Keep her identity consistent. No logos, no readable text, no watermark.",
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-flash/reference-to-video/v1/01/input-01.png",
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-flash/reference-to-video/v1/01/input-02.png",
"https://cdn.vidgo.ai/apis/models/google/gemini-omni-flash/reference-to-video/v1/01/input-03.png"
]
}
}
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 个字符。 |
| image_urls | string[] | 是 | — | 恰好 3 个公开 HTTP(S) 图片 URL。 |
| duration | integer | 否 | 6 | 4、6、8 或 10 秒。 |
| 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 接收最终扁平任务对象;投递失败时仍可轮询。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 输入模式 | 提示词 + 3 张图 | 恰好三张公开参考静帧,加上场景与音频提示词。 |
| 输出 | 视频 | 返回异步任务 ID;完成后包含带原生音频的视频文件。 |
| 分辨率 | 720p / 1080p / 4k | 默认为 720p。 |
| 时长 | 4 / 6 / 8 / 10 秒 | 默认为 6 秒。 |
| 画面比例 | 16:9 / 9:16 | 默认为 16:9。 |
| 计费依据 | 按次生成 | 720p/1080p:4 秒=120、6 秒=150、8 秒=200、10 秒=220 积分。4k:4 秒=250、6 秒=300、8 秒=350、10 秒=450 积分。 |
相关模型
Gemini Omni Flash Reference to Video API 常见问题
Gemini Omni Flash Reference to Video API 是什么?
Gemini Omni Flash Reference to Video 是 Google DeepMind 用于多参考图生成视频的多模态模型。它根据恰好三张参考静帧与文本提示词生成 4–10 秒短片,具备锁定角色一致性、原生音画口型同步,以及 720p 至 4K 输出。基于 Gemini 统一多模态架构,它在增加定向运动与同步声音的同时,将面容、服饰与风格线索带入新场景。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Gemini Omni Flash Reference to Video 需要几张参考图?
image_urls 恰好提交 3 个公开图片 URL。常见组合是面容、服饰与产品或风格参考;在提示词中点明各自角色可加强一致性。
Gemini Omni Flash Reference to Video 如何保持角色一致性?
三张静帧提供外观视觉真值,提示词再重申面容、服装与品牌细节。系列化生成时复用同一组参考与相同外观措辞。
Gemini Omni Flash Reference to Video 支持原生口型同步吗?
支持。对白与环境声随画面生成并写入 MP4。补充语言与语气线索,锁定表演者的口型即可跟踪表达。
何时该选 Gemini Omni Flash Reference to Video 而非 Image to Video?
当单张静帧不够、需要用多图分别锁定面容、服饰与风格时,选 Reference to Video。若一张主视觉已承载全部外观,用 Image to Video 即可。
Gemini Omni Flash Reference to Video 能输出 4K 吗?
能。战役终稿需要更清晰纹理与光影时选 4K。先用 720p 或 1080p 验证一致性,再把选定镜头升到 4K。
Gemini Omni Flash Reference to Video 积分如何计算?
按次按时长与分辨率扣积分。720p/1080p 下 6 秒为 150 积分($0.75);同等时长 4K 为 300 积分($1.50)。完整费率见本页价格说明。















