Gemini Omni API:Google 带声音的视频、价格和代码
Google 的 Gemini Omni 模型可以根据提示词、首帧或参考图片生成带声音的视频,最高 4K。本指南介绍 Revana 上的三个版本、每个版本的每秒价格,以及如何调用它们。
Gemini Omni 视频模型
Gemini Omni 是 Google 基于 Gemini 构建的视频模型系列。这些模型可以根据提示词、首帧或参考图片生成带声音的视频。Revana 以同一种请求格式提供三个版本:
| 模型 | 模型 id | 功能 | 分辨率 | 时长 | 参考图 | 起价 | 线路 |
|---|---|---|---|---|---|---|---|
| Gemini Omni 1.1 Flash | gemini-omni-1.1-flash | 文生视频、图生视频、首尾帧、参考图 | 360p, 720p, 1080p, 4K | 4、6、8 或 10 秒 | 最多 10 张 | $0.04 / s | 两条线路 |
| Gemini Omni | gemini-omni | 文生视频、图生视频 | 720p, 1080p, 4K | 4、6、8 或 10 秒 | 一张首帧 | $0.10 / s | 一条线路 |
| Gemini Omni Flash Preview | gemini-omni-flash-preview | 文生视频、图生视频、参考图 | 720p | 模型默认值 | 最多 16 张 | $0.11 / s | 一条线路 |
大多数情况下,先从 Gemini Omni 1.1 Flash 开始。它功能最全(首尾帧、最多十张参考图),有两条线路,其 360p 档每秒 $0.04,是在正式渲染前低成本测试提示词的好办法。
Gemini Omni 价格(2026 年 10 月)
三者都按每秒输出计费,价格包含声音。
| 模型 | 分辨率 | 每秒 | 4 秒视频 | 8 秒视频 | 10 秒视频 |
|---|---|---|---|---|---|
| Gemini Omni 1.1 Flash | 360p | $0.04 | $0.16 | $0.32 | $0.40 |
| Gemini Omni 1.1 Flash | 720p 或 1080p | $0.10 | $0.40 | $0.80 | $1.00 |
| Gemini Omni 1.1 Flash | 4K | $0.23 | $0.92 | $1.84 | $2.30 |
| Gemini Omni | 720p 或 1080p | $0.10 | $0.40 | $0.80 | $1.00 |
| Gemini Omni | 4K | $0.23 | $0.92 | $1.84 | $2.30 |
| Gemini Omni Flash Preview | 720p | $0.11 | $0.44 | $0.88 | $1.10 |
在 Gemini Omni 和 1.1 Flash 上,720p 和 1080p 的价格相同,所以请直接选 1080p。Gemini Omni 和 1.1 Flash 的视频为 16:9 或 9:16。想了解这些价格与其他视频模型相比如何,请阅读最便宜的视频 API 指南;Google 的另一个视频模型请参阅 Veo 3.1 API 价格。
生成一段 Gemini Omni 1.1 Flash 视频
发送 POST /v1/generations,然后轮询,直到任务出现 succeeded 或 failed。这段 8 秒 1080p 竖版视频的费用为 $0.80。
export REVANA_API_KEY="sr_live_..."
# 1. Submit the job (returns 202 with the generation id)
curl https://api.revana.si/v1/generations \
-H "Authorization: Bearer $REVANA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-1.1-flash",
"input": {
"prompt": "A chef plates a dessert in a busy restaurant kitchen, then slides it across the pass toward the camera. Clatter of pans, a ticket printer, someone calls service.",
"resolution": "1080p",
"duration": 8,
"aspect_ratio": "9:16"
},
"max_cost_usd": 1
}'
# 2. Poll with the id from step 1 until status is "succeeded" or "failed"
curl https://api.revana.si/v1/generations/gen_01JC2V8K5T \
-H "Authorization: Bearer $REVANA_API_KEY"import os
import time
import requests
API = "https://api.revana.si/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['REVANA_API_KEY']}"}
resp = requests.post(f"{API}/generations", headers=HEADERS, json={
"model": "gemini-omni-1.1-flash",
"input": {
"prompt": "A chef plates a dessert in a busy restaurant kitchen, then slides it across the pass toward the camera. Clatter of pans, a ticket printer, someone calls service.",
"resolution": "1080p",
"duration": 8,
"aspect_ratio": "9:16",
},
"max_cost_usd": 1,
})
resp.raise_for_status()
job = resp.json()
while job["status"] in ("queued", "running"):
time.sleep(5)
job = requests.get(f"{API}/generations/{job['id']}", headers=HEADERS).json()
if job["status"] == "succeeded":
print(job["output"]["urls"], job["cost_usd"])
else:
print("Failed:", job["error"])// Node 18 or later. Save as generate.mjs and run: node generate.mjs
const API = "https://api.revana.si/v1";
const headers = {
Authorization: `Bearer ${process.env.REVANA_API_KEY}`,
"Content-Type": "application/json",
};
const res = await fetch(`${API}/generations`, {
method: "POST",
headers,
body: JSON.stringify({
model: "gemini-omni-1.1-flash",
input: {
prompt: "A chef plates a dessert in a busy restaurant kitchen, then slides it across the pass toward the camera. Clatter of pans, a ticket printer, someone calls service.",
resolution: "1080p",
duration: 8,
aspect_ratio: "9:16",
},
max_cost_usd: 1,
}),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
let job = await res.json();
while (job.status === "queued" || job.status === "running") {
await new Promise((r) => setTimeout(r, 5000));
job = await (await fetch(`${API}/generations/${job.id}`, { headers })).json();
}
if (job.status === "succeeded") console.log(job.output.urls, job.cost_usd);
else console.error("Failed:", job.error);{
"id": "gen_01JC2V8K5T",
"model": "gemini-omni-1.1-flash",
"status": "succeeded",
"output": {
"urls": [
"https://cdn.revana.si/g/gen_01JC2V8K5T/0.mp4"
],
"duration_s": 8,
"has_audio": true
},
"cost_usd": 0.8,
"attempts": 1,
"error": null,
"created_at": "2026-10-28T10:14:02Z",
"completed_at": "2026-10-28T10:15:31Z"
}从一帧开始,到另一帧结束
Gemini Omni 1.1 Flash 可以在你发送的两张图片之间过渡:起始图通过 image_url 传入,结束图通过 end_image_url 传入。这段 6 秒 720p 视频的费用为 $0.60:
{
"model": "gemini-omni-1.1-flash",
"input": {
"prompt": "The flower bud slowly opens into a full bloom as morning light moves across it.",
"image_url": "https://example.com/bud.jpg",
"end_image_url": "https://example.com/bloom.jpg",
"resolution": "720p",
"duration": 6,
"aspect_ratio": "16:9"
},
"max_cost_usd": 0.8
}这些模型始终随画面一起生成声音,且已包含在价格中,所以请不要传 audio 字段。时长不是 4、6、8 或 10 秒的请求,会在任何扣费之前被拒绝。
三个模型都在模型页面上,所有字段见文档,额度包见价格页面。获取 API 密钥即可开始。
常见问题
Gemini Omni API 的价格是多少?
2026 年 10 月,Gemini Omni 1.1 Flash 在 360p 下每秒 $0.04,720p 或 1080p 下 $0.10,4K 下 $0.23,价格已包含声音。
我应该用哪个 Gemini Omni 模型?
大多数情况下用 Gemini Omni 1.1 Flash:它支持文本、首帧、首尾帧或最多 10 张参考图,分辨率从 360p 到 4K。Gemini Omni Flash Preview 在 720p 下最多支持 16 张参考图。
Gemini Omni 的视频最长可以多长?
Gemini Omni 和 Gemini Omni 1.1 Flash 为 4、6、8 或 10 秒。
Gemini Omni 会生成声音吗?
会。声音随画面一起生成,且包含在价格中。
Gemini Omni 支持哪些宽高比?
横版为 16:9,竖版视频为 9:16。