Start exactly on the input image. The lighthouse beam rotates and sweeps across the darkening sea, waves crash against the rocks sending up white spray, clouds drift slowly across the dusk sky. Steady cinematic wide shot, no cuts. Audio: ocean waves and wind. Keep the same lighthouse, cliff, and colors. No logos, no readable text, no watermark.
Gemini Omni Flash Image to Video API
google/gemini-omni-flash/image-to-videoGemini Omni Flash Image to Video 将单张静帧图像转化为 4–10 秒动态视频,支持主体保留、原生音画口型同步,以及 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/image-to-video",
"input": {
"prompt": "Start exactly on the input image. The lighthouse beam rotates and sweeps across the darkening sea, waves crash against the rocks sending up white spray, clouds drift slowly across the dusk sky. Steady cinematic wide shot, no cuts. Audio: ocean waves and wind. Keep the same lighthouse, cliff, and colors. 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/image-to-video/v1/01/input-source.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/image-to-video",
"input": {
"prompt": "Start exactly on the input image. The lighthouse beam rotates and sweeps across the darkening sea, waves crash against the rocks sending up white spray, clouds drift slowly across the dusk sky. Steady cinematic wide shot, no cuts. Audio: ocean waves and wind. Keep the same lighthouse, cliff, and colors. 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/image-to-video/v1/01/input-source.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[] | 是 | — | 恰好 1 个公开 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 接收最终扁平任务对象;投递失败时仍可轮询。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 输入模式 | 提示词 + 1 张图 | 一张公开静帧,加上运动与音频提示词。 |
| 输出 | 视频 | 返回异步任务 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 Image to Video API 常见问题
Gemini Omni Flash Image to Video API 是什么?
Gemini Omni Flash Image to Video 是 Google DeepMind 用于将静帧图像动画化为视频的多模态模型。它根据一张参考静帧与文本提示词生成 4–10 秒短片,具备主体保留、原生音画口型同步,以及 720p 至 4K 输出。基于 Gemini 统一多模态架构,它在增加定向运动与同步声音的同时,保持源图身份与构图。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Gemini Omni Flash Image to Video 需要几张图片?
image_urls 恰好提交 1 个公开图片 URL。该静帧锚定身份与构图,运动与声音由提示词驱动。若需要多图一致性,请改用 Reference to Video。
Gemini Omni Flash Image to Video 能保留主体身份吗?
能。从清晰静帧出发,并在提示词中重申面容、服饰或产品标识,模型即可在增加运动时锚定外观。主体干净、无杂乱的源图更利于全程连贯。
Gemini Omni Flash Image to Video 支持原生口型同步吗?
支持。对白与环境声随画面生成并写入 MP4。需要说话表演时,补充语言与语气线索,口型即可跟踪表达。
Gemini Omni Flash Image to Video 何时适合用 4K?
终稿需要更清晰纹理与光影细节时选 4K。日常迭代先用 720p 或 1080p——时长选项相同、积分更低——再把选定镜头升到 4K。
Gemini Omni Flash Image to Video 如何控制运镜?
把 slow push-in、dolly、side tracking 等明确运镜单独成句,并与主体动作分开写。再配合光影线索,静帧构图会按意图演进。
Gemini Omni Flash Image to Video 积分如何计算?
按次按时长与分辨率扣积分。720p/1080p 下 6 秒为 150 积分($0.75);同等时长 4K 为 300 积分($1.50)。完整费率见本页价格说明。















