> ## 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.

# GPT-Image-2.5

GPT-Image-2.5 Flare 在质量、编辑效率和速度方面带来了同样的提升，是大多数应用程序的默认选择。它提供的图像质量高于 GPT-Image-2，但延迟则低了 50%。该模型适用于各种场景，从创作者和社交内容到产品体验、视觉搜索、快速图像原型制作以及大量图像生成任务。

GPT-Image-2.5 Sunburst 旨在满足对视觉效果有高要求的创作需求，能够让用户在编辑过程中拥有更精细的控制能力。它可以用于各种创意性编辑工作，比如制作出适合发布的广告创意图片，或者打造精美的产品形象图。

可以直接在 Image API 中使用这两个模型，或者将其作为 Responses API 图像生成工具的模型。

### 模型参数

* 模型ID：`gpt-image-2.5-sunburst`/`gpt-image-2.5-flare`
* 模型价格：你可以在[模型广场](https://geekai.co/models/gpt-image-2.5)查看最新价格信息
* 调用入口：`https://geekai.co/api/v1/images/generations`
* 模型参数：参考[画图 API 手册](https://docs.geekai.co/cn/api/image/generations)
* API认证：[获取 API KEY](https://docs.geekai.co/cn/docs/quick_start)

<Note>
  不支持画图公共 API 中的以下参数：

  * `negative_prompt`
  * `seed`
  * `strength`
  * `aspect_ratio`
  * `style_preset`

  附：[GPT-Image-2.5 官方 API 文档](https://developers.openai.com/api/docs/guides/image-generation)
</Note>

GPT-Image-2.5 的 `size` 参数默认值是 `auto` 且支持满足以下条件的任意尺寸：

* 图片宽、高长度必须是 16 的倍数（整数）；
* 图片宽、高长度不得大于 3840 像素；
* 图片像素总数必须在 655360 到 8294400 之间；
* 图片宽高比不得大于 3:1 或小于 1:3。

GPT-Image-2.5 的 `quality` 参数默认值是 `medium`，并支持以下参数值：

* `low`
* `medium`
* `high`
* `xhigh`
* `max`

### 模型价格

GPT-Image-2.5 Sunburst 和 GPT-Image-2.5 Flare 的价格完全一致。不同尺寸和质量对应的价格不同，以下是 GPT-Image-2.5 的价格表：

| 质量（quality） | 尺寸（size）      | 价格（单位：元/张） |
| ----------- | ------------- | ---------- |
| low         | 1024x1024     | 0.044      |
| low         | 1024x1536     | 0.036      |
| low         | 1536x1024     | 0.036      |
| low         | 2048x2048(2K) | 0.071      |
| low         | 2048x1152(2K) | 0.035      |
| low         | 3840x2160(4K) | 0.083      |
| low         | 2160x3840(4K) | 0.083      |
| medium      | 1024x1024     | 0.099      |
| medium      | 1024x1536     | 0.077      |
| medium      | 1536x1024     | 0.077      |
| medium      | 2048x2048(2K) | 0.201      |
| medium      | 2048x1152(2K) | 0.083      |
| medium      | 3840x2160(4K) | 0.195      |
| medium      | 2160x3840(4K) | 0.195      |
| high        | 1024x1024     | 0.395      |
| high        | 1024x1536     | 0.309      |
| high        | 1536x1024     | 0.309      |
| high        | 2048x2048(2K) | 0.803      |
| high        | 2048x1152(2K) | 0.318      |
| high        | 3840x2160(4K) | 0.751      |
| high        | 2160x3840(4K) | 0.751      |
| xhigh       | 1024x1024     | 0.702      |
| xhigh       | 1024x1536     | 0.553      |
| xhigh       | 1536x1024     | 0.553      |
| xhigh       | 2048x2048(2K) | 1.427      |
| xhigh       | 2048x1152(2K) | 0.565      |
| xhigh       | 3840x2160(4K) | 1.334      |
| xhigh       | 2160x3840(4K) | 1.334      |
| max         | 1024x1024     | 1.580      |
| max         | 1024x1536     | 1.235      |
| max         | 1536x1024     | 1.235      |
| max         | 2048x2048(2K) | 3.211      |
| max         | 2048x1152(2K) | 1.271      |
| max         | 3840x2160(4K) | 3.002      |
| max         | 2160x3840(4K) | 3.002      |

<Note>
  以上只是常见尺寸的价格示例，GPT-Image-2.5 支持的尺寸非常广泛，实际价格会根据你选择的具体尺寸和质量进行计算。
</Note>

GPT-Image-2.5 模型参数默认值 `quality` 是 `medium`，`size` 是 `1024x1024`。

使用极客智坊提供的[低价代理渠道](https://docs.geekai.co/cn/docs/model_price)调用时，不同参数对应价格按照价格表x对应的折扣值即可：以高可用通道为例，折扣值是 `0.5`，那么生成一张 `size` 为 `1024x1024`、`quality` 为 `medium` 的图片价格是 `0.099 x 0.5 = 0.0495` 元，如果生成同样尺寸但 `quality` 为 `high` 的图片价格是 `0.395 x 0.5 = 0.1975` 元。其他参数依次类推。

### 文生图片

通过文字描述来生成对应图像：

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"gpt-image-2.5-flare",
    "prompt":"画一只可爱的小猫在草丛中玩耍"
}'
```

### 以图生图

**单图**

基于已有图片，结合文字指令进行图像编辑，生成新的图像：

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"gpt-image-2.5-flare",
    "prompt":"修复这张破损的照片",
    "image":"https://static.geekai.co/storage/2025/04/02/broken-picture.jpg"
}'
```

注意，GPT-Image-2.5 支持图片编辑接口，这里我们还可以借助图片编辑接口实现图生图功能：

<CodeGroup>
  ```bash json theme={null}
  curl --location --request POST 'https://geekai.co/api/v1/images/edits' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer $GEEKAI_API_KEY' \
  --data '{
      "model": "gpt-image-2.5-flare",
      "prompt": "修复这张破损的照片",
      "image": "https://static.geekai.co/storage/2025/04/02/broken-picture.jpg"
  }'
  ```

  ```bash form theme={null}
  curl --location --request POST 'https://geekai.co/api/v1/images/edits' \
  --header 'Authorization: Bearer $GEEKAI_API_KEY' \
  --form 'model="gpt-image-2.5-flare"' \
  --form 'prompt="修复这张破损的照片"' \
  --form 'image=@/path/to/your/local/image.jpg'
  ```
</CodeGroup>

<Note>
  `image` 参数支持传入图片链接或图片的 Base64 编码字符串。
</Note>

**多图**

基于多张参考图片，融合它们的风格、元素等特征来生成新图像，如衣裤鞋帽与模特图融合成穿搭图，人物与风景融合为人物风景图等：

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"gpt-image-2.5-flare",
    "prompt": "将图1中的面料应用至图2的服装上，图片比例按照图2来",
    "images": [
        "https://style3d-render.oss-cn-hangzhou.aliyuncs.com/test/针织.jpg",
        "https://style3d-render.oss-cn-hangzhou.aliyuncs.com/test/款式图.jpg"
    ],
    "quality": "high",
    "background": "auto",
    "output_format": "png",
    "response_format": "url",
    "async": true
}'
```

同样地，图片编辑接口也支持多图编辑：

<CodeGroup>
  ```bash json theme={null}
  curl --location --request POST 'https://geekai.co/api/v1/images/edits' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer $GEEKAI_API_KEY' \
  --data '{
      "model": "gpt-image-2",
      "prompt": "将图1中的面料应用至图2的服装上，图片比例按照图2来",
      "images": [
          "https://style3d-render.oss-cn-hangzhou.aliyuncs.com/test/针织.jpg",
          "https://style3d-render.oss-cn-hangzhou.aliyuncs.com/test/款式图.jpg"
      ],
      "quality": "high",
      "background": "auto",
      "output_format": "png",
      "response_format": "url",
      "async": true
  }'
  ```

  ```bash form theme={null}
  curl --location --request POST 'https://geekai.co/api/v1/images/edits' \
  --header 'Authorization: Bearer $GEEKAI_API_KEY' \
  --form 'model="gpt-image-2"' \
  --form 'prompt="将图1中的面料应用至图2的服装上，图片比例按照图2来"' \
  --form 'image[]=@/path/to/your/local/image1.jpg' \
  --form 'image[]=@/path/to/your/local/image2.jpg'
  ```
</CodeGroup>

<Note>
  对于耗时生图任务，可以通过设置 `async` 参数为 `true` 开启异步任务模式。异步任务模式下，画图接口会返回一个 `task_id`，你可以通过轮询 `https://geekai.co/api/v1/images/{task_id}` 来获取图像生成的最新状态，当任务完成后即可获得最终的图像URL，相关细节请参考[异步生图](https://docs.geekai.co/cn/docs/image/txt2img#异步生图)。
</Note>
