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

> ## Agent Instructions
> Public hosts only: console https://omnimux.ai/dashboard · API https://api.omnimux.ai · docs https://docs.omnimux.ai.
> Gateway auth is Authorization: Bearer sk-… on https://api.omnimux.ai/v1 (OpenAI-compatible Chat Completions and related paths).
> Discover pages from /llms.txt; full site dump /llms-full.txt; product skill /skill.md; docs search MCP /mcp. Prefer .md page URLs for Markdown.
> Default docs locale is en; zh mirrors the same relative paths. Do not invent model ids not present on live pricing or the complete API pages.

# GPT Image · 图像生成

> 使用 GPT Image 2.5 按次模型生成图像。

<Warning>
  自 2026-09-10 起，`gpt-image-2` 和 `gpt-image-2-hd` 已分别更名为 `gpt-image-2.5` 和 `gpt-image-2.5-hd`。旧 model ID 不再接受；请更新请求中的 `model`。这不是兼容别名。
</Warning>

这两个按次模型的基础价分别为 USD 0.0441/次和 USD 0.005479/次；分组倍率可能影响最终费用。本次更名未改变价格。

返回 `data` 时读取图像结果；返回 `image.generation.task` 时表示异步任务已提交，不代表图像已生成。响应形态取决于实际路由，请勿将任务提交响应当作最终结果。

Flare 和 Sunburst 是独立的 Token 计费模型，不属于此按次契约，目前尚未开放。

## 参考图限制

参考图字段为 `images`（图片 URL 或 base64 字符串数组）；`image`、`image_urls`、`input_reference` 为可接受的别名，网关会归一为 `images`。

* `gpt-image-2.5`：单次最多 16 张；无下限（文生图不传 `images`）；单张参考图的接受格式与大小上限官方未公布。
* `gpt-image-2.5-hd`：尚无模型档案，参考图上限**未核验**，本页不声明其张数、格式与单文件大小上限。
* `gpt-image-2.5-flare`：特惠档生图路由模型，参考图规格与基准版一致。
* `gpt-image-2.5-sunburst`：经济低价档生图路由模型，参考图规格与基准版一致。

官方图像指南中的 50 MB 属于「编辑图与其遮罩」的口径，不是单张参考图上限，因此本页不声明单文件上限。

<Panel>
  <RequestExample>
    ```bash curl theme={null}
    curl --request POST \
      --url https://api.omnimux.ai/v1/images/generations \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data '{"model": "gpt-image-2.5", "prompt": "A product photo on a white background", "n": 1}'
    ```
  </RequestExample>

  <ResponseExample>
    ```json 200 — illustrative async task theme={null}
    {"id":"task_example","object":"image.generation.task","model":"gpt-image-2.5-hd","status":"pending","created":0}
    ```

    ```json 402 theme={null}
    {"error":{"message":"Insufficient quota","type":"insufficient_quota"}}
    ```
  </ResponseExample>
</Panel>


## OpenAPI

````yaml openapi/ops/image/zh/gpt-image.json POST /v1/images/generations
openapi: 3.0.3
info:
  title: GPT Image · 图像生成
  version: 1.0.0
servers:
  - url: https://api.omnimux.ai
security: []
paths:
  /v1/images/generations:
    post:
      summary: GPT Image · 图像生成
      description: 使用 GPT Image 2.5 按次模型生成图像。
      operationId: generateGPTImage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  enum:
                    - gpt-image-2.5
                    - gpt-image-2.5-hd
                    - gpt-image-2.5-flare
                    - gpt-image-2.5-sunburst
                  default: gpt-image-2.5
                prompt:
                  type: string
                'n':
                  type: integer
                  description: 图像数量，受所选模型和渠道限制。
                size:
                  type: string
                  description: 可接受的尺寸取决于所选模型与渠道；不保证所有尺寸可用。
                quality:
                  type: string
                  description: 质量选项取决于所选模型与渠道。
                images:
                  type: array
                  items:
                    type: string
                  description: >-
                    参考图：图片 URL 或 base64。image / image_urls / input_reference
                    为可接受的别名，网关归一为 images。
            example:
              model: gpt-image-2.5
              prompt: A product photo on a white background
              'n': 1
      responses:
        '200':
          description: 图像结果或已提交的异步任务。
          content:
            application/json:
              schema:
                type: object
                description: 响应可为图像结果或异步任务；按实际响应处理。
                properties:
                  created:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                        b64_json:
                          type: string
                  id:
                    type: string
                    description: 异步任务 ID（若返回）。
                  object:
                    type: string
                  model:
                    type: string
                  status:
                    type: string
        '400':
          description: Invalid request
        '401':
          description: Authentication required
        '402':
          description: Insufficient quota
        '403':
          description: Forbidden
        '429':
          description: Rate limit exceeded
        '500':
          description: Server error
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````