One continuous 8-second cinematic shot. Slow push-in down a wet-asphalt night avenue lined with neon storefronts; rain beads on the pavement and a metal awning. No people in close-up, no shops selling products, no readable signs. Lighting: high-contrast neon magenta and teal bouncing off black puddles. Camera: locked-axis slow dolly-in at chest height, no cuts. Native audio: rain on metal, distant traffic hiss, and a low analog music pulse. No logos, no readable text, no products, no packaging, no prices, no CTA, no advertising, no watermark, no brand marks.
Gemini Omni 1.1 Flash Text-to-Video API
google/gemini-omni-1.1-flash/text-to-videoGemini Omni 1.1 Flash(Text-to-Video)将文本提示词转化为带原生音频的短视频,支持镜头与光线控制,以及 360p 至 4K 输出。用同一套创作指令编排场景、动作和声音,为产品概念、故事分镜与社交内容制作 4–10 秒视听片段。
示例
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/text-to-video",
"input": {
"prompt": "One continuous 8-second cinematic shot. Slow push-in down a wet-asphalt night avenue lined with neon storefronts; rain beads on the pavement and a metal awning. No people in close-up, no shops selling products, no readable signs. Lighting: high-contrast neon magenta and teal bouncing off black puddles. Camera: locked-axis slow dolly-in at chest height, no cuts. Native audio: rain on metal, distant traffic hiss, and a low analog music pulse. No logos, no readable text, no products, no packaging, no prices, no CTA, no advertising, no watermark, no brand marks.",
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}
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/text-to-video",
"input": {
"prompt": "One continuous 8-second cinematic shot. Slow push-in down a wet-asphalt night avenue lined with neon storefronts; rain beads on the pavement and a metal awning. No people in close-up, no shops selling products, no readable signs. Lighting: high-contrast neon magenta and teal bouncing off black puddles. Camera: locked-axis slow dolly-in at chest height, no cuts. Native audio: rain on metal, distant traffic hiss, and a low analog music pulse. No logos, no readable text, no products, no packaging, no prices, no CTA, no advertising, no watermark, no brand marks.",
"duration": 8,
"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')
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 个字符。 |
| duration | integer | 否 | 8 | 4、6、8 或 10,单位为秒。 |
| 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 接收终态任务对象;投递失败时仍可轮询。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 输入模式 | 纯文本 | 提示词用于描述场景、运镜、光线、情绪和声音。 |
| 输出 | 带原生音频的视频 | 提交后返回异步任务 ID;完成后包含视频文件。 |
| 分辨率 | 360p / 720p / 1080p / 4k | 默认 720p。 |
| 时长 | 4 / 6 / 8 / 10 秒 | 默认 8 秒。 |
| 画面比例 | 16:9 / 9:16 | 默认 16:9。 |
| 计费依据 | 按次生成 | 360p–1080p:4 秒=45、6 秒=60、8 秒=75、10 秒=90 积分。4k:4 秒=105、6 秒=120、8 秒=135、10 秒=150 积分。 |
相关模型
Gemini Omni 1.1 Flash Text-to-Video API 常见问题
Gemini Omni 1.1 Flash Text-to-Video API 是什么?
Gemini Omni 1.1 Flash Text-to-Video 是 Google 研发的文本生成视频模型。它根据文本提示词生成最高 4K 分辨率、包含对白、音乐与环境声的短视频,支持精准的镜头运动、光影和场景氛围控制。基于 Gemini 多模态智能架构,它在严格遵循提示词物理规律与画面连贯性的同时,呈现具有影视质感的动态叙事。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Gemini Omni 1.1 Flash 文生视频能生成对白和音乐吗?
可以。模型原生具备全模态音画联合生成能力,无需后期合成音轨。在提示词中分别描述对白内容、配乐情绪或环境音效(例如脚步声、雨滴声),模型即可在输出 MP4 中直接内嵌精准对齐动作的原生音频。
Gemini Omni 1.1 Flash 文生视频一次最长能生成多久?
单次调用支持生成最长 10 秒的独立视频片段,可选 4、6、8 或 10 秒(体验区默认预设 8 秒)。对于需要更长时间跨度的情节,可在提示词中按时序清晰组织镜头节拍,或通过场景延续机制逐步延伸镜头叙事。
Gemini Omni 1.1 Flash 文生视频支持 4K 分辨率吗?
支持。模型提供从 360p、720p、1080p 到 4K 的多档原生及超分辨率输出选项。4K 模式适合用于高质量广告大片和商业交付,细腻保留光影反射与材质纹理;日常测试则推荐使用 720p 平衡画质与响应速度。
可以用 360p 快速验证 Gemini Omni 1.1 Flash 文生视频创意吗?
可以。360p 分辨率专为低延迟快速迭代设计,相比高清生成能大幅缩短等待时间并降低积分消耗。建议在创意构思阶段先用 360p 校验主体的构图走位与运镜节奏,确认效果符合预期后再切换至 1080p 或 4K 渲染成片。
如何用镜头语言控制 Gemini Omni 1.1 Flash 文生视频?
在提示词中建议将主体动作与摄影机运动分置于独立分句。使用明确的运镜词汇,如“推镜头跟拍”、“360度平稳环绕”或“低机位仰拍”,并指定光线类型(如暖色侧光、霓虹反射),即可获得符合影视规律的镜头运动。
Gemini Omni 1.1 Flash 文生视频适合制作 9:16 竖屏内容吗?
适合。模型提供 16:9 横屏和 9:16 竖屏两种标准画幅。选择 9:16 比例时,建议在提示词中优先规划垂直纵深构图与主体人物走位,模型会自动适配竖屏视角下的视觉焦点与环境展现。















