Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.
Gemini Omni 1.2 Flash Reference to Video API
google/gemini-omni-1.2-flash/reference-to-videoGemini Omni 1.2 Flash Reference to Video API 融合最多 10 图与 3 视频生成 3–15 秒 4K 视频。它跨镜头保持角色外观一致,且仅按输出秒数计费。
拖拽文件、粘贴剪贴板素材,或输入 URL。 最多 10 张参考图片。
2/10 个素材
拖拽文件、粘贴剪贴板素材,或输入 URL。 最多 3 段参考视频,每段 ≤ 15 秒(单文件最大 100 MB)。
示例
REST API
快速开始
三步完成一次 Gemini Omni 1.2 Flash Reference to Video 请求,支持 360p 至 4K 多档分辨率。
连接 Vidgo API
在控制台创建 API Key 并仅在服务端通过 Bearer Token 发送。
- 端点
- POST
https://api.vidgo.ai/api/generate/submit - 认证
- Authorization: Bearer VIDGO_API_KEY
提交任务
向 /api/generate/submit 发送模型 ID 与对应模式参数。
curl --request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "google/gemini-omni-1.2-flash/reference-to-video",
"input": {
"prompt": "Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg",
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg"
],
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}'等待视频完成
轮询状态接口直至 finished 或 failed,成功后读取 data.files[].file_url。
查询状态
GET https://api.vidgo.ai/api/generate/status/{task_id}在 not_started 或 running 状态继续轮询,finished 后读取 data.files[].file_url。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "VUDK1P7TS5FURNPB",
"status": "not_started",
"created_time": "2026-11-25T11:17:30"
}
}{
"code": 200,
"data": {
"task_id": "VUDK1P7TS5FURNPB",
"status": "finished",
"files": [
{
"file_type": "video",
"file_url": "https://cdn.vidgo.ai/apis/models/google/gemini-omni-1.2-flash/reference-to-video/v1/01/output.mp4"
}
],
"created_time": "2026-11-25T11:17:30",
"error_message": null,
"progress": 100
}
}完整可运行示例
包含提交、轮询、终态判断与结果读取的完整脚本。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "google/gemini-omni-1.2-flash/reference-to-video",
"input": {
"prompt": "Slow cinematic tracking shot across the steaming basalt geothermal plain from the second reference image at dawn: the woman sound recordist from the first reference image kneels beside a mineral pool adjusting her headphones and aiming her furry microphone toward rising steam plumes under golden low-angle sunlight. Keep her face, dark curly hair, olive jacket, and audio gear consistent. Audio: gentle wind and steaming geothermal vents.",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-01.jpg",
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/edit/v1/01/input-02.jpg"
],
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}
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')
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
while true; do
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')
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 2
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
done请求参数
顶层传递 model 和可选 callback_url,模式参数放在 input 对象内。
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| model | string | 是 | — | 固定为 google/gemini-omni-1.2-flash/reference-to-video。 |
| callback_url | string (URL) | 否 | — | 任务完成或失败后接收结果的公开 HTTP(S) 地址。 |
| input.prompt | string | 是 | — | 结合参考素材的场景描述(1–20,000 字符)。 |
| input.reference_image_urls | string[] | 否 | — | 最多 10 张参考图片公开 URL。 |
| input.reference_video_urls | string[] | 否 | — | 最多 3 段参考视频,每段 ≤ 15 秒(单文件最大 100 MB)。 |
| input.duration | integer | 否 | 8 | 输出时长,3–15 的整数秒。 |
| input.resolution | string | 否 | 720p | 360p、720p、1080p 或 4k。 |
| input.aspect_ratio | string | 否 | 16:9 | 16:9 或 9:16。 |
响应字段
提交响应返回 task_id,状态接口在任务完成后返回视频文件或错误说明。
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 业务状态码,0 或 200 表示成功。 |
| data.task_id | string | 用于状态轮询的唯一任务 ID。 |
| data.status | string | not_started | running | finished | failed |
| data.progress | number | 0–100 进度值。 |
| data.files[].file_url | string | 生成的视频地址。 |
| data.files[].file_type | string | 视频结果为 video。 |
| data.error_message | string | null | 失败原因。 |
任务生命周期
仅在 not_started 和 running 时轮询,finished 与 failed 为终态。
not_started任务已入队,等待执行。
running视频正在生成,请继续轮询。
finished任务完成,从 data.files[].file_url 读取视频。
failed任务失败,读取 data.error_message 并停止轮询。
轮询与错误处理
- 认证401 表示 Bearer API Key 缺失或无效。
- 参数校验400 表示字段、时长(3–15 秒,带尾帧 ≤10 秒)或输入视频时长(≤15 秒)超限。
- 轮询建议每 5–10 秒查询一次,或通过 callback_url 接收推送。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 模型 | google/gemini-omni-1.2-flash/reference-to-video | 异步视频生成公开模型 ID。 |
| 分辨率 | 360p | 720p | 1080p | 4k | 默认 720p。 |
| 时长 | 3–15 s | 默认 8 秒。 |
| 画面比例 | 16:9 | 9:16 | 默认 16:9。 |
| 单秒费率 | 5.46 / 16.38 / 24.58 / 49.14 credits/s | 对应 360p / 720p / 1080p / 4k($0.0273 / $0.0819 / $0.1229 / $0.2457 每秒)。 |
Gemini Omni 1.2 Flash Reference to Video API 常见问题
Gemini Omni 1.2 Flash Reference to Video API 是什么?
Gemini Omni 1.2 Flash Reference to Video 是 Google 推出的 360p 至 4K 多参考视频生成模型。Gemini Omni 1.2 Flash Reference to Video API 结合最多 10 张参考图、3 段参考视频与提示词生成 3–15 秒视频,并严格按输出秒数计费。多参考输入能在跨镜头生成中稳定保留人物外观、道具细节与画面质感。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Gemini Omni 1.2 Flash Reference to Video API 最多传多少参考素材?
最多 10 张参考图(reference_image_urls)和 3 段参考视频(reference_video_urls),两者至少提供一项。
Gemini Omni 1.2 Flash 的每段参考视频最长可以多少秒?
每段参考视频均不得超过 15 秒,单文件不超过 100 MB。
传入参考视频会让 Gemini Omni 1.2 Flash 额外加价吗?
不会,Reference to Video 仅按 输出秒数 × 分辨率单价(5.46 / 16.38 / 24.58 / 49.14 积分/秒)计费。
Gemini Omni 1.2 Flash Reference to Video 支持多长输出?
支持 3–15 秒之间的任意整数秒,默认 8 秒。
Gemini Omni 1.2 Flash Reference to Video 可以只传参考视频吗?
可以,reference_image_urls 和 reference_video_urls 任选其一或同时传入均可。
Gemini Omni 1.2 Flash Reference to Video API 支持哪些分辨率和比例?
支持 360p、720p(默认)、1080p 与 4K,以及 16:9(默认)和 9:16。



