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 的影片生成 endpoint 呼叫此模型。採用按量付費,只會針對成功的請求計費。Default 設定每秒 $0.066,約比供應商牌價低 6%。依解析度計價的費率從 360P 的每秒 $0.022 到 4K 的每秒 $0.1989 不等。1080p 和 4k 輸出會經過升頻處理,請依照交付需求和預算選擇解析度。
gemini-omni-1.2-flash 的特色
文字與圖片生成
根據文字指示生成影片,或將輸入圖片製作成動畫。輸出支援 24fps 並含音訊。
參考圖與影格控制
使用多張圖片作為主體參考,或提供首尾影格進行插補。包括影格輸入在內,最多支援 10 張圖片。
影片編輯與延長
編輯或延長一段最長 15 秒的輸入影片。編輯會保留來源影片長度;延長則會新增 3–10 秒的片段。
解析度與長寬比選項
可選擇 16:9 或 9:16 的 360p、720p、1080p 或 4k 輸出。1080p 和 4k 選項會經過升頻處理。
4 個步驟呼叫 gemini-omni-1.2-flash API
- 01
取得 API key
登入 APISea,儲值 $50 起,並在控制台建立 sk-sea 金鑰。
- 02
設定 base URL
在 SDK 或 HTTP 用戶端中,將 https://api.apisea.ai/v1 設為 base URL。
- 03
傳送請求
呼叫 POST /v1/videos/generations,並使用下方的參數及 "model": "gemini-omni-1.2-flash"。
- 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
}'參數
| 參數 | 類型 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
model | string | 必填 | — | Must be `gemini-omni-1.2-flash`. |
nsfw_check | boolean | 選填 | false | Whether to run content moderation before submitting the video task. |
prompt | string | 必填 | — | 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. |
duration | integer | 選填 | 10 | Output 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`. |
resolution | string | 選填 | 720p | |
aspect_ratio | string | 選填 | 16:9 | Only `16:9` (landscape, default) and `9:16` (portrait). Other values are treated as `16:9`. |
image_urls | string[] | 選填 | — | 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_image | string | 選填 | — | 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_image | string | 選填 | — | 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_roles | object[] | 選填 | — | 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. |
url | string | 必填 | — | Only publicly accessible HTTP(S) direct image URLs are supported. |
role | string | 必填 | — | |
video_urls | string[] | 選填 | — | 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_type | string | 選填 | auto | Task 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_id | string | 選填 | — | 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
務必提供提示詞
即使使用圖片、影格、影片或先前的 task ID,也請提供提示詞指示。省略提示詞會回傳 HTTP 400。
- 02
明確選擇延長模式
新增影片素材時,請將 omni_reference_task_type 設為 extend。若未指定,影片輸入和先前的 task 參照都會預設為編輯;延長模式中的片長設定只會套用至新增片段。
- 03
讓影格與長寬比一致
起始和結束影格請使用相同的比例,並與 aspect_ratio 相符。指定最後一個影格時必須同時提供第一個影格;請選擇直接使用影格欄位或 image_with_roles。
- 04
依解析度估算費用
360P 每秒 $0.022,720P 每秒 $0.066,1080P 每秒 $0.09944,4K 每秒 $0.1989。預設解析度為 720p;1080p 和 4k 會經過升頻處理。
限制與須知
圖片和影片輸入必須是可公開存取的 HTTP(S) 直接 URL;不支援 Data URL 和 Base64。
輸入最多限 10 張圖片,且影片片段最多 1 段,長度不得超過 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?
使用 Bearer token 驗證和 Content-Type: application/json,向 https://api.apisea.ai/v1/videos/generations 傳送 POST 請求。將 model 設為 gemini-omni-1.2-flash,並提供必要的提示詞。
此模型支援哪些影片片長?
文字轉影片和圖片轉影片接受 3 到 15 秒的整數片長,預設為 10 秒。首尾影格插補和延長片段接受 3–10 秒;編輯會忽略片長設定,並保留來源影片長度。
此模型支援 4K 影片和音訊嗎?
支援,文件指出輸出最高可達 4K、24fps 並含音訊。可用解析度為 360p、720p、1080p 和 4k,其中 1080p 和 4k 會透過升頻產生。
我可以編輯或延長現有影片嗎?
可以,請提供一個可公開存取的影片直接 URL,片段長度不得超過 15 秒。影片輸入預設為編輯;若要新增片段,請將 omni_reference_task_type 設為 extend。
我可以將生成的影片用於商業用途嗎?
商業用途須遵守供應商的條款。發布或散布生成的影片前,請確認適用於預定用途的相關條款。
相關模型
gemini-omni-1.1-flash-ext
Omni-Flash-Extgemini-omni-1.1-flash
gemini-omni-1.2-flash-ext
gemini-omni-flash-preview
Veo 3.1
veo3.1-fastveo3.1-fast-official
veo3.1-lite
Veo 3.1 Quality
veo3.1-quality