> ## 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`。

## 版本選擇

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

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

## 當前版本

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

> [!WARNING]
>
> `image_urls` 僅支持圖片 URL, 不直接接收 base64. 請先使用 [上傳圖片接口](https://docs.toapis.com/docs/zh-Hant/api-reference/uploads/images.md) 獲取可訪問的 URL.

## 認證

**Authorization** `string` *required*

使用 `Bearer YOUR_API_KEY` 認證. API Key 可在 [控制台](https://toapis.com/dashboard/tokens) 建立.

## 請求參數

**model** `string` *required* (default: gemini-3-pro-image-preview-vip)

固定使用 `gemini-3-pro-image-preview-vip`. 普通模型名和其他別名不會自動切換到本 VIP 路由.

**prompt** `string` *required*

描述需要生成或編輯的圖像. 傳入多張參考圖時, 可按列表順序說明各圖的用途.

**size** `string`

圖像寬高比, 例如 `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`.

**n** `integer` (default: 1)

每次請求生成 1 張圖片. 使用數字 `1`, 不要使用字符串 `"1"`.

**image\_urls** `object[]`

可選參考圖列表, 最多 14 張. 文生圖時省略本字段.
先用 [上傳圖片接口](https://docs.toapis.com/docs/zh-Hant/api-reference/uploads/images.md) 獲取可訪問的圖片 URL, 不直接傳入 base64.

**參考圖字段**

**url** `string` *required*

可公開訪問的 HTTP 或 HTTPS 圖片 URL.

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

**metadata** `object`

**輸出分辨率**

**resolution** `string` (default: 2K)

支持 `1K`, `2K`, `4K`. 省略時使用 `2K`.

**grounding** `string` (default: none)

Google 搜尋 Grounding。開啟後模型先檢索再生成，結果中的 `grounding_metadata` 可能包含引用來源。

可選值：

* `none` - 關閉（預設）
* `web` - 網頁搜尋

按實際執行的搜尋查詢次數計費，\$0.014/次。提交時預扣至多 4 次查詢押金，未使用部分在結算時退回。

## 請求示例

```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. 使用 [圖片任務查詢接口](https://docs.toapis.com/docs/zh-Hant/api-reference/tasks/image-status.md) 獲取狀態和最終圖片.
任務查詢和 [Webhook 回調](https://docs.toapis.com/docs/zh-Hant/api-reference/webhooks/task-webhooks.md) 沿用通用異步圖片接口約定.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.