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

# GPT Image 2.6 Sunburst

> PNG 生成与编辑、GIF 动图和 SVG 输出。

## 输出格式

| `output_format` | 尺寸参数 | 参考图与限制 |
| - | - | - |
| `png`（默认） | `resolution`、`aspect_ratio` | 支持参考图；仅 PNG 使用 `background` 和图生图蒙版 `extra_params.mask`。 |
| `gif` | `extra_params.size`，默认 `512x512` | 支持参考图；不使用 `resolution`、`aspect_ratio`、背景或蒙版。 |
| `svg` | `resolution`、`aspect_ratio`，默认 `1K`、`1:1` | 仅文生图；非空 `images` 返回 `400`。不使用 GIF 尺寸、背景或蒙版。 |

GIF 可在 `extra_params` 中设置 `frame_count` 和 `frame_duration_ms`：

* `frame_count` 默认 `9`；`768x768` 支持 2–12 帧，其他尺寸支持 2–16 帧。
* `frame_duration_ms` 默认 `200`；范围 20–2000 ms，步长 10 ms。

PNG 图生图省略 `aspect_ratio` 时按首图预扣；输出升档可能补扣差额。指定 `resolution` 和固定比例可锁定档位。

提交后[查询任务状态](https://docs.imini.ai/zh/api-reference/images/task-query.md)。参见[模型价格](https://docs.imini.ai/zh/guide/pricing.md)。


## OpenAPI

````yaml zh/openapi/images/gpt-image-2-6-sunburst.yaml POST /v1/images/generate
openapi: 3.1.0
info:
  title: GPT Image 2.6 Sunburst
  version: '1.0'
  description: PNG 生成与编辑、GIF 动图和 SVG 输出。
servers:
  - url: https://openapi.imini.ai/imini/router
security:
  - ApiKeyAuth: []
paths:
  /v1/images/generate:
    post:
      summary: GPT Image 2.6 Sunburst
      description: |
        支持 PNG 生成与编辑、可配置帧参数的 GIF、SVG 文生图。
        参见[格式与参数](/zh/api-reference/images/gpt-image-2-6-sunburst)。
      operationId: generateGptImage26Sunburst
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  const: gpt-image-2.6-sunburst
                prompt:
                  type: string
                  minLength: 1
                  maxLength: 32000
                  description: 生成或编辑提示词。
                images:
                  type: array
                  maxItems: 16
                  description: 参考图；省略或传空数组为文生图。
                  items:
                    type: object
                    required:
                      - url
                    properties:
                      url:
                        type: string
                        description: 公网图片 URL 或 Base64 Data URI（解码后最多 20 MiB）。
                      reference_type:
                        type: string
                        enum:
                          - asset
                        default: asset
                        description: 参考图用途。
                resolution:
                  type: string
                  enum:
                    - 1K
                    - 2K
                    - 4K
                  default: 1K
                  description: 仅适用于 PNG / SVG。
                aspect_ratio:
                  type: string
                  enum:
                    - '1:1'
                    - '1:2'
                    - '2:1'
                    - '1:3'
                    - '3:1'
                    - '2:3'
                    - '3:2'
                    - '3:4'
                    - '4:3'
                    - '4:5'
                    - '5:4'
                    - '9:16'
                    - '16:9'
                    - '21:9'
                    - '9:21'
                  description: PNG 图生图省略时适配首张参考图。
                num:
                  type: integer
                  minimum: 1
                  maximum: 4
                  default: 1
                  description: 输出数量。
                quality:
                  type: string
                  enum:
                    - low
                    - medium
                    - high
                    - xhigh
                    - max
                  default: high
                  description: 画质档位。
                background:
                  type: string
                  enum:
                    - auto
                    - opaque
                    - transparent
                  default: auto
                  description: 仅适用于 PNG。
                extra_params:
                  type: object
                  additionalProperties: false
                  properties:
                    mask:
                      type: string
                      description: PNG 图生图蒙版的公网 URL。
                    size:
                      type: string
                      enum:
                        - 288x288
                        - 384x384
                        - 512x288
                        - 288x512
                        - 768x432
                        - 432x768
                        - 512x512
                        - 768x768
                      default: 512x512
                      description: GIF 单帧尺寸。
                    frame_count:
                      type: integer
                      minimum: 2
                      maximum: 16
                      default: 9
                      description: 仅 GIF；768x768 时最多 12 帧。
                    frame_duration_ms:
                      type: integer
                      minimum: 20
                      maximum: 2000
                      multipleOf: 10
                      default: 200
                      description: 仅 GIF；单帧时长（毫秒）。
                output_format:
                  type: string
                  enum:
                    - png
                    - gif
                    - svg
                  default: png
            examples:
              text:
                summary: 文生图
                value:
                  model: gpt-image-2.6-sunburst
                  prompt: 晨光中的海边城市，水彩插画。
                  resolution: 1K
                  aspect_ratio: '1:1'
                  quality: high
              edit:
                summary: 参考图编辑
                value:
                  model: gpt-image-2.6-sunburst
                  prompt: 保留构图，将背景改成浅蓝色。
                  images:
                    - url: https://example.com/reference.png
                      reference_type: asset
                  resolution: 1K
                  aspect_ratio: '1:1'
                  quality: high
              gif:
                summary: GIF 动图
                value:
                  model: gpt-image-2.6-sunburst
                  prompt: 一枚橙色图标在原地轻轻跳动，循环动画。
                  output_format: gif
                  quality: high
                  extra_params:
                    size: 512x512
              gif_custom:
                summary: GIF 自定义帧数和时长
                value:
                  model: gpt-image-2.6-sunburst
                  prompt: 让图标轻轻跳动，首尾自然衔接。
                  output_format: gif
                  extra_params:
                    size: 768x768
                    frame_count: 12
                    frame_duration_ms: 300
              svg:
                summary: SVG 矢量图
                value:
                  model: gpt-image-2.6-sunburst
                  prompt: 单色、轮廓清晰的纸飞机图标。
                  output_format: svg
                  resolution: 1K
                  aspect_ratio: '1:1'
                  quality: high
      responses:
        '200':
          description: 任务已受理。
          content:
            application/json:
              schema:
                type: object
                required:
                  - task_id
                  - model
                  - created_at
                  - request_id
                properties:
                  task_id:
                    type: string
                    description: 任务 ID，用于轮询。
                  model:
                    type: string
                    description: 回显请求中的模型 ID。
                  created_at:
                    type: string
                    format: date-time
                    description: 任务创建时间（UTC）。
                  request_id:
                    type: string
                    description: 请求 ID。
              example:
                task_id: task_2041350318103396352
                model: gpt-image-2.6-sunburst
                created_at: '2026-11-16T07:00:00.000Z'
                request_id: task_2041350318103396352
        '400':
          description: 模型或请求参数无效。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: INVALID_PARAMETER
                  message: Parameter value is out of range or has incorrect type
                  status: 400
                  request_id: req_example
        '402':
          description: 积分不足。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: INSUFFICIENT_CREDITS
                  message: >-
                    Insufficient credits. Upgrade your plan or purchase
                    additional credits.
                  status: 402
                  request_id: req_example
        '413':
          description: 请求体或 Base64 素材超出大小限制。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: PAYLOAD_TOO_LARGE
                  message: Request payload exceeds the supported size
                  status: 413
                  request_id: req_example
components:
  schemas:
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - status
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
            request_id:
              type: string
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '`Bearer YOUR_API_KEY`。在 [API Keys](https://imini.ai/zh/api-keys) 管理密钥。'

````

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