> ## 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 3 Pro Image VIP 圖像生成

> Gemini 3 Pro Image VIP 支持文生圖和圖生圖, 最多 14 張參考圖.

<Note>
  **中國大陸用戶請注意：** 中國大陸用戶請使用 `https://toapis.cn` 作為接口地址（Base URL）。文檔示例中的 `https://toapis.com` 請替換為 `https://toapis.cn`。
</Note>

## 版本選擇

| 版本                                                    | 參考圖上限 | 適用場景          |
| ----------------------------------------------------- | ----- | ------------- |
| [普通版](../gemini-3-pro-image/generation)               | 6 張   | 文生圖和少量參考圖編輯   |
| [VIP](../gemini-3-pro-image-vip/generation)           | 14 張  | 需要更多參考圖的編輯和組合 |
| [Official](../gemini-3-pro-image-official/generation) | 14 張  | 需要原生生成參數控制    |

參考圖數量指輸入圖片總數, 不代表輸出圖片數量. 三個版本使用不同的模型 ID, 請按對應頁面的參數和示例調用.

## 當前版本

使用 `model: "gemini-3-pro-image-preview-vip"` 選擇 VIP, 支持文生圖和最多 14 張參考圖的圖生圖或圖像編輯.
適合需要 7 到 14 張參考圖的編輯或多圖組合. 多圖請求可按列表順序說明各張圖片的用途.
請求異步執行, 提交成功後通過任務 ID 查詢結果.

<Warning>
  `image_urls` 僅支持圖片 URL, 不直接接收 base64. 請先使用 [上傳圖片接口](../../uploads/images) 獲取可訪問的 URL.
</Warning>

## 認證

<ParamField header="Authorization" type="string" required>
  使用 `Bearer YOUR_API_KEY` 認證. API Key 可在 [控制台](https://toapis.com/dashboard/tokens) 建立.
</ParamField>

## 請求參數

<ParamField body="model" type="string" default="gemini-3-pro-image-preview-vip" required>
  固定使用 `gemini-3-pro-image-preview-vip`. 普通模型名和其他別名不會自動切換到本 VIP 路由.
</ParamField>

<ParamField body="prompt" type="string" required>
  描述需要生成或編輯的圖像. 傳入多張參考圖時, 可按列表順序說明各圖的用途.
</ParamField>

<ParamField body="size" type="string">
  圖像寬高比, 例如 `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`.
</ParamField>

<ParamField body="n" type="integer" default={1}>
  每次請求生成 1 張圖片. 使用數字 `1`, 不要使用字符串 `"1"`.
</ParamField>

<ParamField body="image_urls" type="object[]">
  可選參考圖列表, 最多 14 張. 文生圖時省略本字段.
  先用 [上傳圖片接口](../../uploads/images) 獲取可訪問的圖片 URL, 不直接傳入 base64.

  <Expandable title="參考圖字段">
    <ParamField body="url" type="string" required>
      可公開訪問的 HTTP 或 HTTPS 圖片 URL.
    </ParamField>
  </Expandable>

  示例: `[{"url": "https://example.com/reference-1.png"}, {"url": "https://example.com/reference-2.png"}]`.
  14 張是輸入參考圖上限, 不是一次請求的輸出圖片數量.
</ParamField>

<ParamField body="metadata" type="object">
  <Expandable title="輸出分辨率">
    <ParamField body="resolution" type="string" default="2K">
      支持 `1K`, `2K`, `4K`. 省略時使用 `2K`.
    </ParamField>
  </Expandable>
</ParamField>

## 請求示例

```bash theme={null}
curl --request POST 'https://toapis.com/v1/images/generations' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-3-pro-image-preview-vip",
    "prompt": "保留第一張圖的人物, 採用第二張圖的背景和配色, 生成一張自然光肖像.",
    "size": "1:1",
    "n": 1,
    "image_urls": [
      {"url": "https://example.com/reference-1.png"},
      {"url": "https://example.com/reference-2.png"}
    ],
    "metadata": {"resolution": "2K"}
  }'
```

將示例 URL 替換為實際可訪問的參考圖地址. 可繼續添加參考圖, 但列表總數不得超過 14.
文生圖請求只需移除 `image_urls`, 並修改提示詞.

## 查詢結果

提交響應中的 `id` 是任務 ID. 使用 [圖片任務查詢接口](../../tasks/image-status) 獲取狀態和最終圖片.
任務查詢和 [Webhook 回調](../../webhooks/task-webhooks) 沿用通用異步圖片接口約定.
