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

# Gemini 3 Pro Image Preview

Gemini 3 Pro Image Preview 聚合了 Gemini 3 Pro Preview 的推理能力和 Nano Banana Pro 的画图能力，是一款顶尖的图像生成与编辑模型，专为专业资产制作而优化。它采用先进的推理技术，能够轻松应对复杂且多步骤的创作与修改任务。

### 模型优势

* **高分辨率输出**：内置生成技术，支持 1K、2K 和 4K 画质
* **高级文本渲染**：能够生成清晰且富有风格的文本，适用于信息图表、菜单、示意图和营销资料
* **利用谷歌搜索进行信息验证**：模型能够通过谷歌搜索核实事实，并根据实时数据（如当前天气图、股票行情、最新事件）生成相应的图像
* **思考模式**：模型通过“思考”过程来分析复杂的提示，它会生成中间的“思考图像”（仅在后台可见且不计费），以便在输出最终高质量图像前不断完善构图
* **支持多张参考图像**：您现在可以将最多 14 张参考图像组合起来，生成最终图像

### 模型参数

* 模型ID：`gemini-3-pro-image-preview`
* 模型价格：你可以在[模型广场](https://geekai.co/models?platform=google\&type=chat)查看最新价格信息
* 调用入口：`https://geekai.co/api/v1/chat/completions`
* 模型参数：参考[对话 API 手册](https://docs.geekai.co/cn/api/chat/completions)
* API认证：[获取 API KEY](https://docs.geekai.co/cn/docs/quick_start)

### 模型价格

Gemini 3 Pro Image Preview 支持 1K、2K、4K 等多种分辨率图片生成，不同分辨率对应的价格不同，以下是价格表：

| 分辨率 | 对应尺寸      | 价格（单位：元/张） |
| --- | --------- | ---------- |
| 1K  | 1024x1024 | 1          |
| 2K  | 2048x2048 | 1          |
| 4K  | 4096x4096 | 1.8        |

1K、2K 分辨率价格一样，4K 是 1K 基准价格的约 1.8 倍。

使用极客智坊提供的[低价代理渠道](https://docs.geekai.co/cn/docs/model_price)调用时，不同参数对应价格按照价格表x对应的折扣值即可：以高可用默认通道为例，折扣值是 `0.5`，那么生成一张 `size` 为 `1K` 的图片价格是 `0.3 x 0.5 = 0.15` 元，其他参数依次类推。

### 图像生成

下面的代码展示了如何根据描述性提示来生成一张图像：

<CodeGroup>
  ```bash curl theme={null}
  curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
  --header 'Authorization: Bearer $GEEKAI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "model": "gemini-3-pro-image-preview",
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "创作一个 Nano Banana 菜肴的图片，场景设在一家高档餐厅中，带有 Gemini 主题"
            }
          ]
        }
      ]
  }'
  ```
</CodeGroup>

### 图像编辑

以下示例展示了如何将图像与您的文本提示结合使用，以实现编辑、构图和风格转换的效果：

<CodeGroup>
  ```bash curl theme={null}
  curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
  --header 'Authorization: Bearer $GEEKAI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "model": "gemini-3-pro-image-preview",
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "使用提供的我的猫咪图像，请在它的头上添加一顶小的、针织的巫师帽。让它看起来坐得很舒适，并与照片的柔和光线相匹配。"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://ai.google.dev/static/gemini-api/docs/images/cat.png"
              }
            }
          ]
        }
      ]
  }'
  ```
</CodeGroup>

### 多轮次图像编辑

通过对话持续生成和编辑图像。聊天或多轮对话是调整和完善图像的最佳方式，下面的示例展示了一个用于生成光合作用信息图的提示：

<CodeGroup>
  ```bash curl theme={null}
  curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
  --header 'Authorization: Bearer $GEEKAI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "model": "gemini-3-pro-image-preview",
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "创建一个生动的信息图表，将光合作用解释为植物最喜欢的食谱。展示“食材”（阳光、水、CO₂）和“成品菜肴”（糖/能量）。风格应像一本彩色儿童烹饪书的页面，适合小学四年级学生。"
            }
          ]
        }
      ]
  }'
  ```
</CodeGroup>

你可以通过同一个聊天界面将图片中的语言切换为西班牙语：

<CodeGroup>
  ```bash curl theme={null}
  curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
  --header 'Authorization: Bearer $GEEKAI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "model": "gemini-3-pro-image-preview",
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "创建一个生动的信息图表，将光合作用解释为植物最喜欢的食谱。展示“食材”（阳光、水、CO₂）和“成品菜肴”（糖/能量）。风格应像一本彩色儿童烹饪书的页面，适合小学四年级学生。"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://static.geekai.co/image/2025/11/21/d1ce7245f72f820e8e5c29afdbd1173b.png"
              }
            }
            {
              "type": "text",
              "text": "将这个信息图表更新为西班牙语版本。不要更改图像的其他任何元素。"
            }
          ]
        }
      ]
  }'
  ```
</CodeGroup>

### 组合多张图像

Gemini 3 Pro Image Preview 支持您混合最多 14 张参考图像，这些图像可以包含以下内容：

* 最多包含 6 张高保真度的物体图像于最终图像中
* 最多使用 5 张人物图片以保持角色的一致性

<CodeGroup>
  ```bash curl theme={null}
  curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
  --header 'Authorization: Bearer $GEEKAI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "model": "gemini-3-pro-image-preview",
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "合成这些人的办公室合影，他们正在做搞笑的表情。"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "$IMG1_BASE64"
              }
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "$IMG2_BASE64"
              }
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "$IMG3_BASE64"
              }
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "$IMG4_BASE64"
              }
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "$IMG5_BASE64"
              }
            }
          ]
        }
      ]
  }'
  ```
</CodeGroup>

### 通过谷歌搜索实现信息定位

利用谷歌搜索工具，根据实时信息（如天气预报、股票走势图或最新事件）生成图像。

<CodeGroup>
  ```bash curl theme={null}
  curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
  --header 'Authorization: Bearer $GEEKAI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "model": "gemini-3-pro-image-preview",
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "将旧金山未来5天的当前天气预报可视化为一个干净、现代的天气图表。添加每天应该穿什么的视觉元素。"
            }
          ]
        }
      ],
      "enable_search": true,
      "image": {
        "aspect_ratio": "5:4"
      }
  }'
  ```
</CodeGroup>

<Note>你可以通过 `enable_search` 开启模型内置搜索工具，在 Gemini 模型中，内置的搜索工具是谷歌搜索。通过 `image` 可以配置生成图片的分辨率(`image_size`)和宽高比(`aspect_ratio`)，目前仅支持这两个配置项。</Note>

### 生成 4K 高清图像

Gemini 3 Pro Image Preview 默认生成 1K 分辨率的图像，也支持输出 2K 和 4K 分辨率。若需生成更高分辨率的素材，请在 `image` 参数中指定 `image_size`：

<CodeGroup>
  ```bash curl theme={null}
  curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
  --header 'Authorization: Bearer $GEEKAI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "model": "gemini-3-pro-image-preview",
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "达·芬奇风格的解剖帝王蝶解剖学素描。详细绘制头部、翅膀和腿部，置于纹理羊皮纸上，并带有英文注释。"
            }
          ]
        }
      ],
      "enable_search": true,
      "image": {
        "aspect_ratio": "1:1",
        "image_size": "4K"
      }
  }'
  ```
</CodeGroup>
