> ## Documentation Index
> Fetch the complete documentation index at: https://docs.toapis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini Omni 1.1 VIP

> VIP 支援文生影片, 圖生影片和參考影片. 支援 4 / 6 / 8 / 10 秒和 360p / 720p / 1080p / 4k, 預設 6 秒 / 720p. 提供參考影片時省略時長參數.

VIP 支援文生影片, 圖生影片和參考影片. 支援 4 / 6 / 8 / 10 秒和 360p / 720p / 1080p / 4k, 預設 6 秒 / 720p. 提供參考影片時省略時長參數.

<Note>使用平台 API Key, 不使用供應商 Key. 中國大陸可使用 [https://toapis.cn](https://toapis.cn).</Note>

[普通版](./generation-1-1) | [Official 文件](../gemini-omni-1.1-flash-preview-official/generation)

## 請求參數

<ParamField header="Authorization" type="string" required>
  `Bearer YOUR_API_KEY`
</ParamField>

<ParamField body="model" type="string" required>
  `gemini-omni-1.1-flash-preview-vip`
</ParamField>

<ParamField body="prompt" type="string" required>必填的影片描述.</ParamField>
<ParamField body="duration" type="integer" default="6">VIP 支援 4 / 6 / 8 / 10 秒, 預設 6 秒. 傳入 video\_urls 時必須省略 duration 和 seconds.</ParamField>
<ParamField body="resolution" type="string" default="720p">VIP 支援 360p / 720p / 1080p / 4k, 預設 720p, 不區分大小寫.</ParamField>
<ParamField body="aspect_ratio" type="string" default="16:9">支援 16:9 或 9:16, 預設 16:9.</ParamField>
<ParamField body="image_urls" type="string[]">VIP frame 為 1 張, reference 為 1 或 3 張. 不支援雙圖首尾幀. 無圖片時省略 generation\_type.</ParamField>
<ParamField body="generation_type" type="string">僅 VIP. frame 為首幀, reference 為參考圖. 省略時 1 張採用首幀, 3 張採用參考圖.</ParamField>
<ParamField body="video_urls" type="string[]">僅 VIP, 最多 1 個公開 HTTP(S) 影片 URL, 可同時提供圖片. 參考影片模式不傳 duration 或 seconds. 輸出時長以實際生成結果為準, 不保證與來源影片一致.</ParamField>

<Warning>本地素材請先上傳以取得公開 URL. 不傳 base64 或本地檔案路徑.</Warning>

## 請求範例

<Tabs>
  <Tab title="VIP">
    ```bash theme={null}
    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-vip",
        "prompt": "A cinematic tracking shot through a sunlit city",
        "duration": 8,
        "resolution": "360p",
        "aspect_ratio": "9:16",
        "generation_type": "reference",
        "image_urls": [
          "https://example.com/a.png",
          "https://example.com/b.png",
          "https://example.com/c.png"
        ]
      }'
    ```
  </Tab>

  <Tab title="VIP VIDREF">
    ```bash theme={null}
    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-vip",
        "prompt": "The same scene at night with neon lights",
        "resolution": "4k",
        "aspect_ratio": "16:9",
        "generation_type": "reference",
        "image_urls": ["https://example.com/image.png"],
        "video_urls": ["https://example.com/video.mp4"]
      }'
    ```
  </Tab>
</Tabs>

## 查詢結果

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

```bash theme={null}
curl https://toapis.com/v1/videos/YOUR_TASK_ID \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

<ResponseExample>
  ```json theme={null}
  {
    "id": "vid_example",
    "object": "generation.task",
    "model": "gemini-omni-1.1-flash-preview-vip",
    "status": "queued",
    "created_at": 1789600000
  }
  ```
</ResponseExample>

## 參數錯誤

非法解析度或時長, VIP 圖片數量不符合模式, 多個參考影片, 或參考影片與時長同時傳入, 均需修正後再提交.
