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

# Create GPT Image 2.6 task

> 创建 GPT Image 2、GPT Image 2.6、Nano Banana、Seedream 5.5 或 Muse Image 生图任务。

Create an async GPT Image 2.6 task. Poll with [Query image task](https://docs.sigrunai.com/en/api-reference/images/query.md) and read `result.image_url` when completed.

For GPT Image 2, see [Create GPT Image 2 task](https://docs.sigrunai.com/en/api-reference/images/create.md). For Nano Banana, see [Create Nano Banana task](https://docs.sigrunai.com/en/api-reference/images/nano-banana.md).

## Models

| `model` | Notes | Billing |
| - | - | - |
| `gpt-image-2.6-flare` | Faster | `per_task` |
| `gpt-image-2.6-sunburst` | Finer detail | `per_task` |

Each model has its own per-task price. `quality` changes the render, not the price. Check the [model catalog](https://docs.sigrunai.com/en/api-reference/common/model-catalog.md) and `cost` on the create response for the current unit price.

You can also put quality in the model id, for example `gpt-image-2.6-sunburst-max`. That only sets `quality`. Billing still uses `gpt-image-2.6-sunburst`.

## Request body

| Field | Type | Required | Description |
| - | - | - | - |
| `model` | string | yes | See the table above |
| `prompt` | string | yes | 1–32000 characters |
| `quality` | string | no | `auto` (default), `low`, `medium`, `high`, `xhigh`, `max` |
| `n` | int | no | Only **1**. Omitted requests bill one image |
| `ratio` | string | no | `auto`, `1:1`, `3:2`, `2:3`, `4:3`, `3:4`, `5:4`, `4:5`, `16:9`, `9:16`, `21:9` |
| `size` | string | no | Alias of `ratio`. Pixel sizes such as `1024x1024` are rejected |
| `resolution` | string | no | Omit it, or send `1k` |
| `output_format` | string | no | `png`, `jpeg`, `webp`, `svg`, `gif`. `jpg` is treated as `jpeg` |
| `images` | string\[] | no | Public reference image URLs, max **16** |
| `smart_queue` | bool | no | Default `false`. When `true`, a very low recent success rate keeps the task `queued` until recovery (up to about 2 hours). See [Smart queue](https://docs.sigrunai.com/en/api-reference/common/smart-queue.md) |

`svg` and `gif` cannot include reference images. For `gif`, omit `size` / `ratio` or send `auto`.

## Example

### Text to image

```bash theme={null}
curl -X POST 'https://sigrunai.com/v1/images' \
  -H 'Authorization: Bearer sk_xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gpt-image-2.6-flare",
    "prompt": "Minimal product still life, white background, soft light",
    "quality": "medium",
    "n": 1,
    "ratio": "1:1",
    "resolution": "1k",
    "output_format": "png"
  }'
```

### Edit with a reference image

```bash theme={null}
curl -X POST 'https://sigrunai.com/v1/images' \
  -H 'Authorization: Bearer sk_xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gpt-image-2.6-sunburst",
    "prompt": "Keep the product, switch to a soft studio background",
    "quality": "high",
    "size": "16:9",
    "images": ["https://example.com/product.jpg"]
  }'
```

Success response:

```json theme={null}
{
  "code": 20000,
  "msg": "提交成功",
  "data": {
    "task_id": "img_xxxxxxxx",
    "status": "queued",
    "progress": 0,
    "model": "gpt-image-2.6-flare",
    "cost": 0.4,
    "result": {}
  }
}
```


## OpenAPI

````yaml POST /v1/images
openapi: 3.1.0
info:
  title: AI Platform OpenAPI
  description: 异步图片与视频生成。创建后轮询 task_id；结果 URL 约保留 3 天。
  version: 1.0.0
servers:
  - url: https://sigrunai.com
    description: AI Platform 生产环境
security:
  - bearerAuth: []
paths:
  /v1/images:
    post:
      tags:
        - Images
      summary: Create image task
      description: >-
        Create an async GPT Image 2, GPT Image 2.6, Nano Banana, Seedream 5.5,
        or Muse Image task.
      operationId: createImage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageCreateRequest'
            examples:
              gptImage2:
                summary: gpt-image-2
                value:
                  model: gpt-image-2
                  prompt: Minimal product still life, white background, soft light
                  quality: medium
                  'n': 1
                  ratio: '1:1'
              gptImage26:
                summary: gpt-image-2.6-flare
                value:
                  model: gpt-image-2.6-flare
                  prompt: Minimal product still life, white background, soft light
                  quality: medium
                  'n': 1
                  ratio: '1:1'
                  resolution: 1k
                  output_format: png
              nanoBanana2:
                summary: nano-banana-2
                value:
                  model: nano-banana-2
                  prompt: >-
                    Cinematic sunset over a lake, golden light on distant
                    mountains
                  ratio: '16:9'
                  resolution: 2k
              nanoBananaPro:
                summary: nano-banana-pro
                value:
                  model: nano-banana-pro
                  prompt: Keep the product look, switch to soft studio lighting
                  ratio: '1:1'
                  resolution: 4k
                  images:
                    - https://example.com/product.jpg
              seedream55:
                summary: seedream-5.5
                value:
                  model: seedream-5.5
                  prompt: A blue cup on a wooden table, soft natural light
                  ratio: '1:1'
                  resolution: 1K
              museImage:
                summary: muse-image
                value:
                  model: muse-image
                  prompt: A misty forest at dawn, photorealistic
                  ratio: '16:9'
                  style: photorealistic
                  negative_prompt: watermark, text
      responses:
        '200':
          description: 提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskQueryResponse'
components:
  schemas:
    ImageCreateRequest:
      type: object
      required:
        - model
      properties:
        model:
          type: string
          description: >-
            gpt-image-2 (plus low/medium/high), gpt-image-2.6-flare /
            gpt-image-2.6-sunburst, nano-banana-2 / nano-banana-2.1 /
            nano-banana-pro, seedream-5.5, or muse-image
          example: nano-banana-2
        prompt:
          type: string
          minLength: 1
          maxLength: 32000
          description: >-
            GPT Image 2 / Seedream 5.5 / Muse Image max 4000; GPT Image 2.6 max
            32000; Nano Banana max 10000. Nano Banana / Seedream prompt is
            optional when images are provided. Muse Image prompt is always
            required
        quality:
          type: string
          enum:
            - auto
            - low
            - medium
            - high
            - xhigh
            - max
          default: auto
          description: >-
            GPT Image 2: auto / low / medium / high, billed by tier. GPT Image
            2.6 also accepts xhigh / max without changing the price
        'n':
          type: integer
          minimum: 1
          maximum: 4
          default: 1
          description: >-
            GPT Image 2 accepts 1–4. GPT Image 2.6, Nano Banana, Seedream 5.5,
            and Muse Image accept 1 only
        ratio:
          type: string
        size:
          type: string
          description: >-
            Alias of ratio. GPT Image 2.6 accepts auto or an aspect ratio, not a
            pixel size. Muse Image reduces a pixel size such as 1024x1024 to its
            ratio
        resolution:
          type: string
          description: >-
            GPT Image 2.6 accepts 1k only. Nano Banana: 0.5k/1k/2k/4k depending
            on the model
        images:
          type: array
          items:
            type: string
            format: uri
          maxItems: 16
          description: >-
            Reference image URLs. GPT Image 2 max 15; GPT Image 2.6 max 16; Nano
            Banana max 5; Seedream 5.5 max 8; Muse Image max 10. GPT Image 2.6
            svg and gif cannot include reference images
        output_format:
          type: string
          enum:
            - png
            - jpeg
            - webp
            - svg
            - gif
          description: >-
            GPT Image 2.6 only. jpg is treated as jpeg. For gif, omit size or
            send auto
        style:
          type: string
          maxLength: 1000
          description: >-
            Muse Image only. Free-text style such as photorealistic, anime, or
            cinematic
        negative_prompt:
          type: string
          maxLength: 1000
          description: Muse Image only. What should not appear, kept apart from prompt
        smart_queue:
          type: boolean
          default: false
          description: >-
            When true, a very low recent success rate keeps the task queued
            until recovery (up to about 2 hours)
    TaskQueryResponse:
      type: object
      properties:
        code:
          type: integer
          example: 20000
        msg:
          type: string
        data:
          $ref: '#/components/schemas/TaskQueryData'
    TaskQueryData:
      type: object
      properties:
        task_id:
          type: string
        status:
          type: string
          description: queued / processing / completed / failed 等
        progress:
          type: integer
        model:
          type: string
        created_at:
          type: integer
        completed_at:
          type: integer
        cost:
          type: number
        error_message:
          type: string
        result:
          $ref: '#/components/schemas/TaskResult'
    TaskResult:
      type: object
      properties:
        image_url:
          type: string
        video_url:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 控制台创建的 API Key，格式：Bearer sk_xxx

````

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