Skip to content
Google · Gemini Omni

gemini-omni-1.2-flash API

通过 APISea 使用 gemini-omni-1.2-flash,根据文本、图像或视频片段生成、编辑和延长视频。

视频生成视频异步任务
模型 ID
gemini-omni-1.2-flash

gemini-omni-1.2-flash API 价格

所有价格均以 USD 计。对比 APISea 费率与相同计费单位的官方标价。

选项APISea官方节省
默认默认$0.066$0.07−6%
1080P$0.09944$0.104−4%
360P$0.022$0.023−4%
4K$0.1989$0.209−5%
720P$0.066$0.07−6%

价格单位为 每秒。

gemini-omni-1.2-flash 是什么?

gemini-omni-1.2-flash 是 Google 的 Gemini Omni 视频模型,可根据文本或图像生成视频片段、使用主体参考图,以及编辑或延长现有视频。在 APISea 上,它支持生成最高 4K、24fps 且带音频的视频。开发者可以通过起始帧、成对的首尾帧或多张参考图来引导生成,并选择横屏或竖屏输出。文生视频和图生视频支持 3–15 秒的整数时长;帧插值和视频延长片段支持 3–10 秒。

使用 API key 和必填提示词,通过 APISea 的视频生成接口调用该模型。采用按量付费,仅对成功请求计费。Default 配置的费用为每秒 $0.066,比服务提供商的标价低约 6%。不同分辨率的价格从 360P 的每秒 $0.022 到 4K 的每秒 $0.1989 不等。1080p 和 4k 输出为升采样结果,请根据交付要求和预算选择分辨率。

gemini-omni-1.2-flash 的亮点

文生视频与图生视频

根据文本指令生成视频,或将输入图像制作成动态视频。输出支持 24fps 并带有音频。

参考图与帧控制

使用多张图像作为主体参考,或提供首帧和尾帧进行插值。包括帧输入在内,最多支持 10 张图像。

视频编辑与延长

编辑或延长一段最长 15 秒的输入视频。编辑会保留源视频时长;延长则会增加 3–10 秒的视频片段。

分辨率与画幅选项

可选择 360p、720p、1080p 或 4k 输出,画幅为 16:9 或 9:16。1080p 和 4k 选项采用升采样。

分 4 步调用 gemini-omni-1.2-flash API

  1. 01

    获取 API 密钥

    登录 APISea,充值 $50 起,并在控制台创建一个 sk-sea 密钥。

  2. 02

    设置 base URL

    在 SDK 或 HTTP 客户端中将 https://api.apisea.ai/v1 设置为 base URL。

  3. 03

    发送请求

    调用 POST /v1/videos/generations,并传入 "model": "gemini-omni-1.2-flash" 及以下参数。

  4. 04

    处理响应

    响应中包含 task_id。轮询 GET /v1/tasks/{task_id},直到状态变为 completed,然后下载结果 URL。

curl --request POST \
  --url https://api.apisea.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-omni-1.2-flash",
    "prompt": "A marble rolling fast on a chain reaction style track, continuous smooth shot.",
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "duration": 15
  }'

参数

参数类型必填默认说明
modelstring必填—Must be `gemini-omni-1.2-flash`.
nsfw_checkboolean可选falseWhether to run content moderation before submitting the video task.
promptstring必填—Required text instructions: describe the scene for text-to-video, or the motion, style, or changes for image-to-video, editing, and extension. You must provide `prompt` even when supplying reference images, first/last frames, video, or `extend_from_task_id`. Omitting it returns HTTP 400.
durationinteger可选10Output duration for text-to-video and image-to-video as an integer from `3` to `15`, default `10`. First/last-frame interpolation and extension support only `3`–`10` seconds. For extension, this is the added segment length; the returned video includes both the original and added segments. Editing ignores `duration` and preserves the source video length. Parameter values outside the allowed range fail the task with `invalid_duration`.
resolutionstring可选720p
aspect_ratiostring可选16:9Only `16:9` (landscape, default) and `9:16` (portrait). Other values are treated as `16:9`.
image_urlsstring[]可选—Reference images as publicly accessible HTTP(S) direct image URLs only. Data URLs and Base64 are not supported. One image defaults to the starting frame; multiple images act as subject references. Up to 10 images in total, including first/last frames. For character references, use at most 2 characters with up to 3 images each, preferably no more than 6 images overall.
first_frame_imagestring可选—Starting frame. Used alone, generation starts from this image; with `last_frame_image`, it enables first/last-frame interpolation. Only publicly accessible HTTP(S) direct image URLs are supported.
last_frame_imagestring可选—Ending frame; requires `first_frame_image`, otherwise the task fails with `invalid_frame_images`. Use the same ratio for both frames and match `aspect_ratio`. Only publicly accessible HTTP(S) direct image URLs are supported.
image_with_rolesobject[]可选—Images with roles, an alternative to the direct first/last-frame fields. Choose one way to specify the frames. All images used count toward the total limit of 10.
urlstring必填—Only publicly accessible HTTP(S) direct image URLs are supported.
rolestring必填—
video_urlsstring[]可选—Video to edit or extend: at most 1 clip, no longer than 15 seconds. Only publicly accessible HTTP(S) direct video URLs are supported. Data URLs and Base64 are not supported. Video input defaults to editing.
omni_reference_task_typestring可选autoTask type: `auto` (default, inferred from the input) / `edit` (editing) / `extend` (extension) / `reference` (multiple image references). Also accepts `text_to_video` / `image_to_video` / `reference_to_video`. When omitted or set to `auto`, both `video_urls` and `extend_from_task_id` default to editing; extension requires an explicit `extend` value.
extend_from_task_idstring可选—Reference your own previous generation task ID to reuse its video without uploading it again. Defaults to editing. With `"omni_reference_task_type": "extend"`, adds a segment of up to 10 seconds at the end.

gemini-omni-1.2-flash 的应用场景

文本生成视频工具

构建一款工具,将场景描述转换为带音频的短视频,并支持控制时长和画幅比例。

图片动画工作流

允许用户提供起始图像,并描述希望动画片段呈现的运动效果或风格。

帧间转场生成工具

根据提供的起始帧和结束帧生成视频,用于分镜或视觉转场工作流。

视频片段修改界面

构建一个界面,让用户通过提示词编辑现有视频片段,或通过明确选择延长模式来添加新片段。

获得更好结果的技巧

  • 01

    务必提供提示词

    即使使用图像、帧、视频或先前的任务 ID,也要提供提示词指令。省略提示词会返回 HTTP 400。

  • 02

    明确选择延长模式

    添加视频素材时,将 omni_reference_task_type 设为 extend。否则,视频输入和先前任务引用默认用于编辑;在延长模式下,时长参数仅控制新增片段的时长。

  • 03

    匹配帧与画幅比例

    起始帧和结束帧应使用相同的画幅比例,并与 aspect_ratio 保持一致。尾帧必须搭配首帧;请使用直接帧字段或 image_with_roles。

  • 04

    按分辨率规划预算

    360P 每秒 $0.022,720P 每秒 $0.066,1080P 每秒 $0.09944,4K 每秒 $0.1989。默认分辨率为 720p;1080p 和 4k 采用升采样。

限制与须知

  • 图像和视频输入必须是可公开访问的 HTTP(S) 直链;不支持 Data URL 和 Base64。

  • 输入总共最多支持 10 张图像,且最多只能包含一个不超过 15 秒的视频片段。

  • 仅支持 16:9 和 9:16 画幅比例;其他值均按 16:9 处理。

gemini-omni-1.2-flash API 常见问题

在 APISea 上使用 gemini-omni-1.2-flash 的费用是多少?

Default 和 720P 的价格均为每秒 $0.066;360P 为每秒 $0.022,1080P 为每秒 $0.09944,4K 为每秒 $0.1989。Default 配置比服务提供商的标价低约 6%,且 APISea 仅对成功请求计费。

如何通过 API 调用 gemini-omni-1.2-flash?

向 https://api.apisea.ai/v1/videos/generations 发送 POST 请求,并使用 Bearer token 进行身份验证,同时设置 Content-Type: application/json。将 model 设为 gemini-omni-1.2-flash,并提供必填提示词。

该模型支持多长的视频?

文生视频和图生视频接受 3 到 15 秒的整数时长,默认值为 10 秒。首尾帧插值和延长片段支持 3–10 秒;编辑模式会忽略时长参数,并保留源视频的时长。

是否支持 4K 视频和音频?

支持。文档注明,该模型可输出最高 4K、24fps 且带音频的视频。可选分辨率为 360p、720p、1080p 和 4k,其中 1080p 和 4k 通过升采样生成。

我可以编辑或延长现有视频吗?

可以,提供一个可公开访问的视频直链,视频片段时长不得超过 15 秒。视频输入默认用于编辑;如需添加片段,请将 omni_reference_task_type 设为 extend。

生成的视频可以用于商业用途吗?

商业用途须遵守服务提供商的条款。在发布或分发生成的视频之前,请查看适用于预期用途的相关条款。

相关模型

覆盖范围:250+ 种模型 · 最低充值 $50

开始使用 gemini-omni-1.2-flash 构建

一个密钥即可,按量付费,$50 起,仅对成功请求计费。