如何通过 API 使用 Gemini Omni 1.2 Flash:在 Google Flow 和 Google Vids 中生成 15 秒视频(中文教程)
8 分钟阅读 • 2026 年 11 月 6 日
useapi.net 是第三方 API,与 Google 无关联,也未获得 Google 的认可。
目录
- 简介
- Google Flow 还是 Google Vids:Omni 1.2 Flash 一览
- 每条视频的价格
- 在 Google Flow 中使用 Omni 1.2 Flash:三次调用做出 30 秒场景
- 在 Google Vids 中使用 Omni 1.2 Flash:15 秒视频、延长和编辑
- 选哪一个
- 在 Claude Code、Cursor 或 Gemini CLI 中使用
- 常见问题
- 来源
- 结语
简介
Google 于 2026 年 11 月 5 日发布 Gemini Omni 1.2 Flash,可以生成 3 到 15 秒、带声音和对白的视频。useapi.net 通过两套 REST API 在你的 Google AI 订阅上调用它:Google Flow API 和 Google Vids API。在 Google AI Ultra 199.99 美元档上,一条 15 秒视频约合 0.30 美元的 Vids 月度额度,或 0.48 美元的 Flow 积分,而 Google 自己的 Gemini API 上 720p 15 秒为 1.04 美元(截至 2026 年 11 月)。不需要 Gemini API Key,也不需要 Google Cloud 项目。
1.2 的新变化(据 Google 的发布公告):单条视频最长 15 秒(此前为 10 秒),更贴合参考素材,口型更清晰。同一天,Google Vids 也升级到了 Omni 1.2 Flash。
本文先对比两种调用方式,再各走一遍真实流程:在 Google Flow 里用三次调用做出一段 30 秒、两种音色的场景,再在 Google Vids 里生成一段 15 秒视频,再延长并编辑全部 15 秒。所有请求都是真实请求,所有视频都是真实生成结果,来自发布文章 Google Flow: Omni 1.2 Flash 和 Google Vids: Omni 1.2 Flash(英文)。
本文由 useapi.net 维护者撰写,介绍的是我们自己的托管 API,示例代码开源在 GitHub。
开始之前,你需要:
- 一个 useapi.net API Token
- 用 Setup Google Flow、Setup Google Vids 或两者绑定的 Google 账号。同一个 Google 账号可以同时绑定两套 API,各自使用自己的额度。
Google Flow 还是 Google Vids:Omni 1.2 Flash 一览
| Google Flow API | Google Vids API | |
|---|---|---|
| 怎么选 Omni 1.2 | model: "omni-flash-1.2"(其他取值为 Omni 1.1 Flash 和 Veo 3.1) | 没有 model 字段:Vids 只有一个视频模型,自 11 月 5 日 Google 分批升级起为 Omni 1.2 |
| 时长 | 3 到 15 秒(首尾帧模式 3 到 10 秒) | 3 到 15 秒 |
| 分辨率 | 360p 或 720p,可放大到 1080p,Ultra 可到 4K | 720p 或 1080p,消耗相同,20 秒以内的视频可放大到 1080p |
| 输入 | 文本、首帧、首尾帧、最多 7 张参考图、已保存的角色,每次请求 1 到 4 条 | 文本、首帧图片,或最多 3 个参考(图片和数字人混用) |
| 音色 | 有参考图或角色时每条视频最多 5 个音色,每次延长最多 3 个。可用 30 个内置音色或你自己的音色 | 每个数字人使用 30 种音色之一,一条视频最多 3 个数字人 |
| 延长 | 每次 3 到 10 秒,可带自己的音色和参考,最长不到 40 秒,需付费套餐 | 每次 3 到 10 秒,源视频最长 24 秒,最终最长约 34 秒 |
| 用提示词编辑 | 生成或上传的视频,最多 15 秒 | Google 生成的视频,最多 15 秒 |
| 消耗什么 | Flow 积分:720p 前 10 秒每秒 3 个,超过 10 秒的部分每秒 6 个,360p 为 1 个和 2 个 | 每月 Vids 视频秒数,与 Flow 积分分开 |
| 免费 Google 账号 | 每天 50 个 Flow 积分,可生成最长 10 秒的视频 | 我们测试时没有 Vids 视频秒数 |
| 验证码 | Google 对每条 Flow 视频都要求验证码。API 会替你求解:首个账号赠送 300 次,之后通过你自己注册的打码服务求解,约每 1,000 次 0.80 到 3.00 美元 | 无 |
每条视频的价格
一条 15 秒 Omni 1.2 Flash 视频在 Google 自己的 Gemini API 和各个 Google AI 订阅上的价格(截至 2026 年 11 月)。每个订阅每月包含一定数量的 Flow 积分,另外还有单独的 Vids 视频秒数,所以一条视频的成本就是它占订阅费的份额。
| Omni 1.2 Flash,15 秒 | 官方 API | Plus $4.99/月 200 积分,60 秒/月 | Pro $19.99/月 1,000 积分,500 秒/月 | Ultra $99.99/月 10,000 积分,2,500 秒/月 | Ultra $199.99/月 25,000 积分,10,000 秒/月 |
|---|---|---|---|---|---|
| Google Flow 720p | $1.04 每秒约 $0.07 | $1.50 / 60 积分 每月 3 条 | $1.20 / 60 积分 每月 16 条 | $0.60 / 60 积分 每月 166 条 | $0.48 / 60 积分 每月 416 条 |
| Google Flow 360p | $0.35 每秒 $0.023 | $0.50 / 20 积分 每月 10 条 | $0.40 / 20 积分 每月 50 条 | $0.20 / 20 积分 每月 500 条 | $0.16 / 20 积分 每月 1,250 条 |
| Google Vids 720p 或 1080p | 720p $1.04 1080p $1.56 | $1.25 / 15 秒 每月 4 条 | $0.60 / 15 秒 每月 33 条 | $0.60 / 15 秒 每月 166 条 | $0.30 / 15 秒 每月 666 条 |
表格可以左右滑动查看更多套餐 →
- 套餐越高越划算。在 Plus 上,以及 Pro 上的 Flow,一条 720p 15 秒视频比 Gemini API 更贵。而在 Ultra 199.99 档上,Flow 不到 Gemini API 的一半,Vids 不到三分之一。
- Flow 超过 10 秒的部分按双倍计费,所以短视频每秒更便宜:720p 10 秒为 30 积分,在 Ultra 199.99 档上为 0.24 美元,Gemini API 为 0.70 美元。包含所有模型的完整 Flow 价格表见 Google Flow API 文档,包含图片和数字人的 Vids 价格表见 Google Vids API 文档。
- 两套 API 的延长都只计新增的秒数。Vids 编辑最多消耗所编辑的秒数(我们测试时编辑 15 秒只消耗了 10 秒),Flow 编辑与生成同样长度的视频价格相同。
- Flow 积分和 Vids 秒数是同一个套餐里两份独立的额度。在 Ultra 199.99 档上,一个 Google 账号同时绑定两套 API,每月在 Flow 中约可生成 416 条、在 Vids 中约 666 条 720p 15 秒视频,合计约 1,082 条。
- 套餐价格为 Google 美国区价格。各套餐的 Vids 秒数来自 Google 的 Gemini in Google Vids 页面,与我们在 Ultra 199.99 档上的测试一致。
在 Google Flow 中使用 Omni 1.2 Flash:三次调用做出 30 秒场景
先生成 10 秒视频,再延长两次,每次 10 秒,每次换一种音色。第 1 步用免费 Google 账号就能完成。第 2 步和第 3 步(延长)需要付费 Google AI 套餐。
每次调用都以异步任务运行:传 async: true,POST 会立即返回 jobid。然后轮询 GET /jobs/jobid 直到 status 为 completed,或者传 replyUrl,让完成的任务推送到你的 webhook:
curl --location 'https://api.useapi.net/v1/google-flow/jobs/<jobid>' --header 'Authorization: Bearer YOUR_API_TOKEN'
成品视频在 response.media[0].videoUrl 里,链接约 6 小时内有效,下一步要用的是完成任务里的 response.media[0].mediaGenerationId。如果你绑定了多个 Google 账号,API 会挑选一个已开通 Omni 1.2 的账号(Google 从 11 月 5 日起分几天陆续开通)。传 email 可以指定账号。
第 1 步:先生成 10 秒
调用 POST /videos,model: "omni-flash-1.2",duration: 10。Google 用了 56 秒返回结果。720p 10 秒视频消耗 30 个积分。
curl --location 'https://api.useapi.net/v1/google-flow/videos' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"model": "omni-flash-1.2",
"duration": 10,
"prompt": "Cinematic night, a narrow rainy alley in Tokyo glowing with neon signs reflected in the puddles. A street magician in a long dark coat faces the camera, fans out a deck of cards that glow faintly gold, and says with a grin: \"Pick a card. Any card.\" A sudden gust snatches one glowing card from his hand and it flutters away down the alley. Handheld camera, shallow depth of field, rain drops catching the light.",
"async": true
}'
完成的任务,来自 GET /jobs/jobid(节选)
{
"jobid": "j1106021223539251070v-u12345-email:[email protected]:google-flow",
"type": "video",
"status": "completed",
"response": {
"media": [
{
"video": {
"generatedVideo": {
"model": "macaron_cookie_t2v_10s",
"aspectRatio": "VIDEO_ASPECT_RATIO_LANDSCAPE"
},
"dimensions": { "length": "10s" }
},
"mediaGenerationId": "user:12345-email:…-video:b08556b9-…",
"videoUrl": "https://flow-content.google/video/b08556b9-…?Expires=…"
}
],
"remainingCredits": 877
}
}
第 2 步:延长 10 秒,加入音色
调用 POST /videos/extend,传入第一条视频的 mediaGenerationId、duration: 10,并把内置音色 Charon 作为 referenceAudio_1。提示词里用 @referenceAudio_1 标出魔术师说话的位置。延长默认使用 Omni 1.2,不需要传 model。返回的是一条 20 秒的完整视频:前 10 秒保持不变,后面接上新的 10 秒。用时 2 分 20 秒,消耗 30 个积分。
curl --location 'https://api.useapi.net/v1/google-flow/videos/extend' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"mediaGenerationId": "user:12345-email:…-video:b08556b9-…",
"duration": 10,
"referenceAudio_1": "Charon",
"prompt": "The magician runs after the glowing card through the rain, past a ramen stall and under paper lanterns, laughing and calling out in a deep voice @referenceAudio_1: \"Come back here! You are the ace of hearts!\" The camera follows him close behind.",
"async": true
}'
第 3 步:再延长 10 秒,换第二种音色
对 20 秒的视频再调用一次,咖啡馆里的女生用 Aoede 音色。结果就是完整的 30 秒场景,又用了 2 分钟和 30 个积分。
curl --location 'https://api.useapi.net/v1/google-flow/videos/extend' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"mediaGenerationId": "user:12345-email:…-video:113384cd-…",
"duration": 10,
"referenceAudio_1": "Aoede",
"prompt": "The glowing card drifts through the open door of a tiny warm café and lands on a table. A young woman in a yellow raincoat picks it up, looks at the out-of-breath magician in the doorway, and says with a smile @referenceAudio_1: \"Is this your card?\" He laughs. Warm light, rain outside the window.",
"async": true
}'
完成的任务(节选)
{
"jobid": "j1106021547955542178v-u12345-email:[email protected]:google-flow",
"type": "video",
"status": "completed",
"response": {
"media": [
{
"video": {
"generatedVideo": { "model": "macaron_cookie_extend_10s" },
"dimensions": { "length": "30s" }
},
"mediaGenerationId": "user:12345-email:…-video:db0201df-…",
"videoUrl": "https://flow-content.google/video/db0201df-…?Expires=…"
}
],
"remainingCredits": 817
}
}
上面的视频为网页播放重新编码,保持原始的 1280×720。整个场景消耗 90 个积分,在 Ultra 199.99 档上约 0.72 美元,按 Gemini API 的 720p 价格,30 秒约 2.10 美元(截至 2026 年 11 月)。
Google 只延长短于 30 秒的视频,所以这个场景不能再延长了:第四次延长会立即返回 400,不会求解验证码,也不消耗积分。25 秒的视频还可以再加 10 秒,最终达到 35 秒。
GitHub 上的 omni-extend/ 用一个 story.json 生成这个场景,提供 Node.js 和 Python 两个版本。omni-flash/ 可以按提示词列表批量生成 Omni Flash 视频。参考图、角色、首尾帧和编辑的用法见 Google Flow API 中文教程。
在 Google Vids 中使用 Omni 1.2 Flash:15 秒视频、延长和编辑
Vids 只有一个视频模型,Google 从 11 月 5 日起用几天时间把它升级为 Omni 1.2,所以不需要设置 model。请求体为 JSON,下面每次调用都以异步任务运行:轮询 GET /jobs/jobid 或传 replyUrl,然后在 24 小时内用 GET /media/mediaId 下载视频。下一步要用的是完成任务里的 result.mediaId。Vids 不需要验证码。
curl --location 'https://api.useapi.net/v1/google-vids/jobs/<jobid>' --header 'Authorization: Bearer YOUR_API_TOKEN'
第 1 步:一个提示词生成 15 秒视频
调用 POST /videos,duration: 15。Google 约 60 秒返回一条 1280×720 的视频,两句台词都按原文说出。消耗了 15 秒额度。
curl --location 'https://api.useapi.net/v1/google-vids/videos' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Cinematic single continuous shot, 15 seconds, 16:9. Golden hour on a Tokyo rooftop garden, city skyline glowing behind. A young chef in a crisp white apron finishes plating a steaming bowl of ramen, steam curling in the warm light. She looks up into the camera and says with a confident smile: \"Fifteen seconds. One prompt. No editing.\" She slides the bowl toward the camera as it slowly pushes in, wind chimes ringing softly and city traffic humming far below. She laughs and adds: \"Now that'\''s fast food.\"",
"duration": 15,
"aspectRatio": "landscape",
"resolution": "720p",
"async": true
}'
完成的任务,来自 GET /jobs/jobid(节选)
{
"status": "completed",
"result": {
"mediaId": "user:[email protected]:eyJ1Ijoi…",
"width": 1280,
"height": 720,
"duration": 15,
"resolution": "720p",
"aspectRatio": "landscape",
"model": "/flix/generate_videos_omni_t2v_psq/v1",
"quota": { "video": { "limit": 500, "left": 485, "resetAt": "2026-12-01T08:00:00.000Z" } }
}
}
quota 显示账号本月剩余的视频秒数和重置时间。这个测试账号是 Google AI Pro 套餐,所以上限是 500 秒。本文的价格按 Ultra 199.99 档计算。
第 2 步:延长 10 秒
调用 POST /videos/extend,传入第一条视频的 mediaId。结果是一条完整的 25 秒视频:原来的 15 秒加上新的 10 秒,用时约 100 秒。一位朋友走进画面尝了拉面,两句新台词都说了出来。
curl --location 'https://api.useapi.net/v1/google-vids/videos/extend' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"mediaId": "user:[email protected]:eyJ1Ijoi…",
"prompt": "Same shot continues on the Tokyo rooftop at dusk, the city lights now switching on. A friend in a denim jacket walks into frame, sits at the table and takes a first slurp of the ramen, eyes widening. He says: \"Wait, you made this in fifteen seconds?\" The chef folds her arms and grins: \"Fifteen more, and I'\''ll make dessert.\" They both laugh as string lights flicker on above them and soft city ambience fills the air.",
"duration": 10,
"async": true
}'
YouTube 视频:Gemini Omni 1.2 Flash in Google Vids: 15 seconds from one prompt, extended to 25。
API 每次延长接受 3 到 10 秒,更长的 duration 会返回 400:Google 最多只加 10 秒,却按请求的全部秒数计费。(这条视频来自更早一次用 duration: 15 的测试。)同样的请求用 duration: 10 会得到同样的 25 秒视频,只消耗 10 秒。Vids 只能延长 24 秒以内的视频,所以这条 25 秒的视频已经不能再延长。要做出最长约 34 秒的视频,请对 24 秒以内的视频再延长 10 秒。
第 3 步:编辑全部 15 秒
对第一条视频调用 POST /videos/edit,duration: 15。Omni 1.1 的编辑最多只返回 10 秒,现在整条 15 秒视频的每一帧都被编辑了,用时约 140 秒。
curl --location 'https://api.useapi.net/v1/google-vids/videos/edit' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"video": "user:[email protected]:eyJ1Ijoi…",
"prompt": "Make it a snowy winter evening: snow falling gently over the rooftop and the city, the chef wearing a red knit scarf. Keep everything else the same.",
"duration": 15,
"async": true
}'
Vids 只能编辑 Google 生成的视频,上传的视频会被 Google 以 422 拒绝。
单条视频直接用 1080p 生成,消耗与 720p 相同。要延长的视频用 720p 制作,最后只做一次 1080p:在 1080p 下每延长一次,Google 都会把整条视频重新处理一遍,之前的画面会被过度锐化(对比视频)。不超过 20 秒的视频最后放大一次(放大会再次消耗视频的秒数)。21 到 34 秒的视频只在最后一次延长时设置 resolution: "1080p"。
GitHub 上的 google-vids-api 有可直接运行的 Vids 示例(Node.js 和 Python),包括带配音的数字人。Google Vids API 中文教程一步步做出两个会说话的数字人。
选哪一个
以下情况选 Google Flow API:
- 想用 360p 出草稿,价格是 720p 的三分之一,或者一次请求生成最多 4 条
- 需要首尾帧、最多 7 张参考图或已保存的角色
- 想自己指定音色:有参考图或角色时每条视频最多 5 个,每次延长最多 3 个,可从 30 个内置音色或你自己的音色中选
- 要编辑上传的视频,或在 Ultra 上放大到 4K
- 想在同一套 API 里同时用 Veo 3.1 视频和 Nano Banana 图片
- 用免费 Google 账号生成最长 10 秒的 Omni 1.2 视频
以下情况选 Google Vids API:
- 不想处理验证码,也不想接打码服务
- 想用 1080p,且价格和 720p 一样(要延长或编辑的视频,见用哪种分辨率)
- 需要带配音的数字人,在不同视频之间保持同样的外貌和声音,一条视频最多 3 个
- 想在 Ultra 199.99 档上拿到最低的每秒价格:0.02 美元,Flow 的 15 秒视频为每秒 0.032 美元
- Flow 积分用完后继续生成 Omni 1.2 视频,因为 Vids 有自己的额度
也可以两者都用:把同一个 Google 账号绑定到两套 API,把任务分配到最合适的一边,两份额度可以叠加。
在 Claude Code、Cursor 或 Gemini CLI 中使用
两套 API 都有托管的 MCP 服务器,使用你的 useapi.net API Token,无需安装。在 Claude Code 中各一行命令:
claude mcp add --transport http useapi-google-vids https://api.useapi.net/v1/google-vids/mcp --header "Authorization: Bearer YOUR_API_TOKEN"
claude mcp add --transport http useapi-google-flow https://api.useapi.net/v1/google-flow/mcp --header "Authorization: Bearer YOUR_API_TOKEN"
在 Cursor 或 Gemini CLI 中,在 MCP 设置里添加同样的 URL 和同样的 Authorization 请求头即可。
- Google Vids MCP 服务器直接生成 Omni 1.2 视频:
vids_create_video和vids_edit_video最多 15 秒,vids_extend_video每次最多 10 秒,只延长 24 秒以内的视频。 - Google Flow MCP 服务器对接的是 Google Flow Agent,不直接调用 Omni 1.2 接口:你的 AI 助手与 Agent 对话,Agent 生成图片和视频按 Flow 的正常价格计费。如果想让 Claude Code 或 Codex 直接调用上面的 Omni 1.2 接口,可以安装 omni-flash-video 智能体技能。
- 两个仓库也都可以一步安装为 Claude Code 插件或 Gemini CLI 扩展:google-flow-api 和 google-vids-api。
常见问题
有 Gemini Omni 1.2 Flash API 吗?
通过 useapi.net 可以:它在你的 Google AI 订阅上运行 Gemini Omni 1.2 Flash,提供 Google Flow API(model: "omni-flash-1.2")和 Google Vids API 两套 REST API,不需要 Gemini API Key。Ultra 199.99 档的 Vids 额度折合每秒 0.02 美元起,Google 的 Gemini API 约每秒 0.07 美元。Flow 在有参考图或角色时每条视频最多可用 5 个音色,而 Google 的 API 音频参考需要申请白名单(截至 2026 年 11 月)。
Omni 1.2 Flash 每条视频多少钱?
通过 useapi.net,在 Google AI Ultra 199.99 档上,一条 15 秒 Omni 1.2 Flash 视频约合 0.30 美元的 Vids 额度,或 0.48 美元的 Flow 积分,Google 的 Gemini API 上 720p 为 1.04 美元(截至 2026 年 11 月)。Vids 的 1080p 与 720p 消耗相同秒数,所以 1080p 15 秒同样约 0.30 美元,而 Gemini API 上为 1.56 美元。各套餐价格见价格表。
Gemini Omni 1.2 Flash 可以免费用吗?
通过 useapi.net 的 Google Flow API 可以:免费 Google 账号用每天 50 个 Flow 积分生成最长 10 秒的 Omni 1.2 Flash 视频,每天可生成一条 720p 或五条 360p 的 10 秒视频,而 Google 的 Gemini API 只在付费层级提供 Omni 1.2 Flash(截至 2026 年 11 月)。更长的视频和用 Omni 1.2 延长需要付费 Google AI 套餐。
Omni 1.2 Flash 视频最长多长?
通过 useapi.net,Google Flow 和 Google Vids 单次都能生成 3 到 15 秒,延长每次加 3 到 10 秒并返回完整视频:Flow 最长不到 40 秒,每次延长都可以换新音色,Vids 只延长 24 秒以内的视频,最长约 34 秒。上面的 30 秒场景就是这样用三次调用做出来的。
Omni 1.2 Flash 和 Veo 3.1 怎么选?
通过 useapi.net,两者在同一套 Google Flow API、同一个套餐上运行:在 Ultra 199.99 档上,720p 8 秒的 Omni 1.2 Flash 视频为 0.19 美元,Veo 3.1 Fast 为 0.08 美元,Google 自己的 API 分别为 0.56 美元和 0.80 美元(截至 2026 年 11 月)。超过 8 秒、要自选最多 5 个音色、或要延长并换新音色时选 Omni 1.2 Flash,只要最便宜的 8 秒视频时选 Veo 3.1 Fast。Veo 的全部价格见 Veo 3.1 API 价格(英文)。
来源
- Google Cloud,Gemini Omni 1.2 Flash is generally available,2026 年 11 月 5 日
- Google Workspace Updates,Gemini Omni 1.2 Flash now in Vids,2026 年 11 月 5 日
- Google,Gemini API 价格,2026 年 11 月 6 日读取
- Google Cloud,Agent Platform 价格(Veo 3.1),2026 年 11 月 6 日读取
- Google,Google AI 套餐、Flow 积分和 Gemini in Google Vids,2026 年 11 月读取
- useapi.net 发布文章(英文):Google Flow: Omni 1.2 Flash, 15-Second Videos, and Extend with Voices 和 Google Vids: Omni 1.2 Flash, 15-Second Videos and 15-Second Edits,2026 年 11 月 6 日
结语
有问题欢迎加入我们的 Discord 服务器 或
Telegram 频道。
开始使用
每月 15 美元的订阅即可使用 useapi.net 上的所有 API:一个 Token,所有服务。每个服务最多绑定 3 个你自己的账号,useapi.net 负责 REST 接口、负载均衡和轮询。需要更多账号?每增加一个订阅每月 10 美元,每个服务再多 3 个账号。
没有国际信用卡?可以用加密货币订阅(加密货币付款不退款)。价格与批量方案见订阅页面。用 Stripe 付款,首次购买 14 天内、且成功生成少于 50 次可全额退款。已经订阅?请在 Stripe 客户门户 修改数量,无需重新购买。