ToAPIsToAPIs
Gemini Omni Flash

Gemini Omni 1.1 普通版

普通版支援文生影片和圖生影片, 固定 10 秒, 支援 720p / 1080p. 最多使用 5 張參考圖, 支援首尾幀.

POST
/v1/videos

普通版支援文生影片和圖生影片, 固定 10 秒, 支援 720p / 1080p. 最多使用 5 張參考圖, 支援首尾幀.

使用平台 API Key, 不使用供應商 Key. 中國大陸可使用 https://toapis.cn.

VIP | Official 文件

請求參數

Authorizationstring請求頭必填

Bearer YOUR_API_KEY

modelstring請求體必填

gemini-omni-1.1-flash-preview

promptstring請求體必填
必填的影片描述.
durationinteger請求體預設值: 10
普通版固定 10 秒.
resolutionstring請求體預設值: 720p
支援 720p 或 1080p, 預設 720p, 不區分大小寫. 1080p 輸出 1920x1080 (16:9) 或 1080x1920 (9:16). 1080p 必須明確傳 resolution: "1080p", 只傳 size 不會切換到 1080p.
aspect_ratiostring請求體預設值: 16:9
支援 16:9 或 9:16, 預設 16:9.
image_urlsstring[]請求體
普通版最多 5 張公開圖片 URL.
first_image_urlstring請求體
首幀圖片的公開 URL.
last_image_urlstring請求體
尾幀圖片的公開 URL.
本地素材請先上傳以取得公開 URL. 不傳 base64 或本地檔案路徑. 不支援影片輸入.

請求範例

curl https://toapis.com/v1/videos \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gemini-omni-1.1-flash-preview",
    "prompt": "A cinematic tracking shot through a sunlit city",
    "duration": 10,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "image_urls": ["https://example.com/image.png"]
  }'

1080p 範例

curl https://toapis.com/v1/videos \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gemini-omni-1.1-flash-preview",
    "prompt": "直式 1080p 影片",
    "duration": 10,
    "resolution": "1080p",
    "aspect_ratio": "9:16"
  }'

查詢結果

提交返回平台任務 id. 透過 GET /v1/videos/{id} 查詢完成結果. 不使用供應商 task_id 或供應商查詢介面.

curl https://toapis.com/v1/videos/YOUR_TASK_ID \
  -H 'Authorization: Bearer YOUR_API_KEY'

響應示例

{
  "id": "vid_example",
  "object": "generation.task",
  "model": "gemini-omni-1.1-flash-preview",
  "status": "queued",
  "created_at": 1789600000
}