Gemini Omni 1.2 Flash
google/gemini-omni-1.2-flashGemini Omni 1.2 Flash is Google's natively multimodal Omni model, served through the Gemini Interactions API (/v1beta/interactions). It accepts text, image and video input and returns text and video output, including video generation, editing and extension.
规格
- 模态
- 文本视频
- 输入 / 输出价格
- $1.50美元 / 100 万 token$9.00美元 / 100 万 token/M
- 上下文 / 最大输出
- 不适用
- 发布时间
- 2026年11月5日
试用该模型
Gemini 原生 API
此模型通过 Gemini Interactions API 生成视频,不可在 Chat Completions 或 Playground 中使用。请使用下面的请求示例和您的 SandBase API key。
此模型通过 Gemini Interactions API 生成视频,不可在 Chat Completions 或 Playground 中使用。请使用下面的请求示例和您的 SandBase API key。
开始构建
发送您的第一条请求
具备 SandBase API 密钥身份验证和使用情况跟踪的 Gemini 原生端点。
curl -X POST "https://api.sandbase.ai/v1beta/interactions" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-omni-1.2-flash",
"input": "A five-second video of ocean waves at sunset"
}'输出 Schema
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 完成结果的唯一标识符 |
object | string | 对象类型,例如 "chat.completion" |
model | string | 用于完成的模型 |
choices | array | 完成结果选项列表 |
choices[].message.content | string | 生成的文本内容 |
choices[].finish_reason | string | 生成停止的原因 |
usage.prompt_tokens | integer | 提示词中的 token 数 |
usage.completion_tokens | integer | 完成结果中的 token 数 |
usage.total_tokens | integer | 使用的 token 总数 |
Gemini Omni 1.2 Flash
Gemini Omni 1.2 Flash is Google's natively multimodal Omni model. It takes text, images and video as input and returns video with synchronized audio, plus text. Google model ID: gemini-omni-1.2-flash.
Status: Generally available. This is the recommended Omni version.
Endpoint
This model is only available on the Gemini Interactions API. It does not accept /v1/chat/completions or generateContent.
POST https://api.sandbase.ai/v1beta/interactions
Authorization: Bearer $SANDBASE_API_KEY
Content-Type: application/json
Request and response bodies follow Google's Interactions API, so the official Google SDK works when pointed at the SandBase base URL.
Generate a video from text
curl -sS --max-time 600 https://api.sandbase.ai/v1beta/interactions \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-omni-1.2-flash",
"input": "A red paper boat floating on a calm pond, gentle ripples.",
"response_format": {
"type": "video",
"aspect_ratio": "16:9",
"resolution": "720p",
"duration": "8s"
}
}'
response_format field | Values |
|---|---|
aspect_ratio | 16:9, 9:16 |
resolution | 360p, 720p (default), 1080p, 4k |
duration | 3–15 seconds (default 8), written as a string such as "8s" |
Use images or a video as input
Put media parts before the text prompt in input. Send files as base64 without line breaks.
{
"model": "google/gemini-omni-1.2-flash",
"input": [
{"type": "image", "data": "<base64>", "mime_type": "image/jpeg"},
{"type": "text", "text": "Animate this scene with a slow camera push-in."}
]
}
For editing, send the source video as {"type": "video", "data": "<base64>", "mime_type": "video/mp4"}. Large videos produce large request bodies; build the JSON in a file and send it with curl --data-binary @request.json rather than as a command-line argument.
Supported tasks (per Google's model page): text to video, image to video, subject references, first and last frames, video editing, video extension and upscaling. To force a task, set "generation_config": {"video_config": {"task": "image_to_video"}} (text_to_video, image_to_video, reference_to_video, edit).
Response
The request waits for the result and returns an Interaction object. Always check status:
completed: the video is insteps[], in the step with"type": "model_output", as{"type": "video", "mime_type": "video/mp4", "data": "<base64>"}. Decodedatato get the MP4.in_progress: the generation is still running. Fetch it later withGET /v1beta/interactions/{id}, using theidfrom the response.
Example of decoding the result in Python:
import base64, json
resp = json.load(open("response.json"))
for step in resp["steps"]:
for part in step.get("content") or []:
if part.get("type") == "video":
open("output.mp4", "wb").write(base64.b64decode(part["data"]))
Run in the background
To return immediately and poll, add "background": true and "store": true. The response has "status": "in_progress" and an id; poll until status is no longer in_progress:
curl -sS https://api.sandbase.ai/v1beta/interactions/$INTERACTION_ID \
-H "Authorization: Bearer $SANDBASE_API_KEY"
Billing
You pay per token, using the counts in the response usage:
| Token type | Price per 1M tokens |
|---|---|
| Input (text, image, video) | $1.50 |
| Text output | $9.00 |
Thinking (total_thought_tokens) | $9.00 |
| Video output | $12.00 |
Google counts output video at a fixed number of tokens per second: 1,931 at 360p, 5,792 at 720p, 8,688 at 1080p, 17,376 at 4k. Approximate video cost:
| 360p | 720p | 1080p | 4k | |
|---|---|---|---|---|
| Per second | $0.023 | $0.070 | $0.104 | $0.209 |
| 8 seconds | $0.19 | $0.56 | $0.83 | $1.67 |
Thinking and input tokens are added on top. The model may return a video even when the prompt only asks for text, so budget for a video-length charge on every request. Failed requests are not charged.
Also on SandBase
For single generations without multi-turn editing, the same model is available as task models on /v1/run, for example google/.
问题
常见问题
如何通过 SandBase 调用 Google Gemini Omni 1.2 Flash?
先创建一个 SandBase API key,然后向 https://api.sandbase.ai 的 Gemini Interactions API (/v1beta/interactions) 发送请求,模型 ID 使用“google/gemini-omni-1.2-flash”。本页的请求示例展示了准确的请求负载。
Google Gemini Omni 1.2 Flash 的价格是多少?
每 100 万输入 token $1.50、每 100 万输出 token $9,按请求从您的 SandBase 余额中扣费。若有折扣,会在本页的定价中显示。
我需要单独的 Google 账户吗?
不需要。一个 SandBase API key 和余额即可让您使用 Google Gemini Omni 1.2 Flash 以及目录中的其他模型;您无需单独注册 Google。
