# GPT Image 2.6 Sunburst - Text to Image

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v1/jobs/createTask:
    post:
      summary: GPT Image 2.6 Sunburst - Text to Image
      deprecated: false
      description: >
        ## Create Task


        Use this endpoint to create a GPT Image 2.6 Sunburst text-to-image task.


        ### GIF animation


        | Parameter | Default | Notes |

        |---|---|---|

        | `frame_count` | `9` | Integer 2–16. |

        | `frame_duration_ms` | `200` | Duration per frame in integer
        milliseconds. Minimum 20, rounded to 10 ms. |

        | `size` | `auto` | Per-frame pixel size. Width and height must be
        multiples of 16. Omit or pass `auto` for 512×512. Do not pass ratio
        names such as `1:1`. |


        Frames are first packed into a sprite sheet: 2–8 frames use 4×2, 9
        frames use 3×3, 10–12 frames use 4×3, 13–16 frames use 4×4. Rows and
        columns may be swapped to get a closer-to-square layout. The full sheet
        must have each side ≤ 3840, total pixels ≤ 8,294,400, and long/short
        side ratio ≤ 3:1, otherwise the request returns 400.


        ::: warning[]

        `512x512` works for all 2–16 frames; `768x768` supports at most 12
        frames. `1024x1024` exceeds the per-side sheet limit even with only 2
        frames.

        :::


        <Card title="Get Task Details" icon="lucide-search"
        href="/market/common/get-task-detail">
         After submission, use the unified query endpoint to check task progress and retrieve results
        </Card>


        ::: tip[]

        For production use, we recommend providing the `callBackUrl` parameter
        so your service can receive completion notifications instead of polling
        for task status.

        :::


        ## Related Resources


        <CardGroup cols={2}>
         <Card title="Model Marketplace" icon="lucide-store" href="/market/quickstart">
         Explore all available models and capabilities
         </Card>
         <Card title="Common API" icon="lucide-cog" href="/common-api/get-account-credits">
         Check account credits and usage
         </Card>
        </CardGroup>
      operationId: gpt-image-2-6-sunburst-text-to-image
      tags:
        - docs/en/Market/Image    Models/GPT Image
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  enum:
                    - gpt-image-2-6/sunburst-text-to-image
                  default: gpt-image-2-6/sunburst-text-to-image
                  description: >-
                    The model name used for generation. This endpoint must use
                    `gpt-image-2-6/sunburst-text-to-image`.
                callBackUrl:
                  type: string
                  format: uri
                  description: >-
                    Callback URL for task completion notifications. Optional
                    parameter. If provided, the system will send a POST request
                    to this URL when the task completes, whether it succeeds or
                    fails. If omitted, no callback notification will be sent. To
                    ensure callback security, see [Webhook Verification
                    Guide](/common-api/webhook-verification).
                  examples:
                    - https://your-domain.com/api/callback
                input:
                  type: object
                  additionalProperties: false
                  description: Input parameters.
                  properties:
                    prompt:
                      type: string
                      minLength: 1
                      maxLength: 32000
                      description: >-
                        Text description of the image to generate. Describe the
                        subject, setting, composition, lighting and style. Put
                        any text that should appear in the image in quotes.
                        Required, 1 to 32,000 characters.
                      examples:
                        - >-
                          A cinematic product photo of a red maple leaf on dark
                          stone, soft side light, shallow depth of field, with a
                          small paper tag that reads "BATCH 07".
                    aspect_ratio:
                      type: string
                      enum:
                        - auto
                        - '1:1'
                        - '3:2'
                        - '2:3'
                        - '4:3'
                        - '3:4'
                        - '5:4'
                        - '4:5'
                        - '16:9'
                        - '9:16'
                        - '2:1'
                        - '1:2'
                        - '21:9'
                        - '9:21'
                        - '3:1'
                        - '1:3'
                      default: auto
                      description: >-
                        Aspect ratio. Optional, default `auto`.


                        For static images (`png` / `jpeg` / `webp` / `svg`),
                        pixel size is mapped from `aspect_ratio` + `resolution`
                        (see the table on `resolution`). Do **not** use this as
                        GIF frame size — use `size` instead.


                        Supported: `auto`, `1:1`, `3:2`, `2:3`, `4:3`, `3:4`,
                        `5:4`, `4:5`, `16:9`, `9:16`, `2:1`, `1:2`, `21:9`,
                        `9:21`, `3:1`, `1:3`.
                      examples:
                        - auto
                    resolution:
                      type: string
                      enum:
                        - 1K
                        - 2K
                        - 4K
                      default: 1K
                      description: |-
                        Resolution tier. Optional, default `1K`.

                        GIF frame pixels do **not** use this table — use `size`.

                        Static-image pixel sizes (width × height):

                        | ratio | 1K | 2K | 4K |
                        |---|---|---|---|
                        | 1:1 / auto | 1024×1024 | 2048×2048 | 2880×2880 |
                        | 3:2 | 1536×1024 | 2048×1360 | 3520×2336 |
                        | 2:3 | 1024×1536 | 1360×2048 | 2336×3520 |
                        | 4:3 | 1024×768 | 2048×1536 | 3312×2480 |
                        | 3:4 | 768×1024 | 1536×2048 | 2480×3312 |
                        | 5:4 | 1280×1024 | 2560×2048 | 3216×2576 |
                        | 4:5 | 1024×1280 | 2048×2560 | 2576×3216 |
                        | 16:9 | 1536×864 | 2048×1152 | 3840×2160 |
                        | 9:16 | 864×1536 | 1152×2048 | 2160×3840 |
                        | 2:1 | 2048×1024 | 2688×1344 | 3840×1920 |
                        | 1:2 | 1024×2048 | 1344×2688 | 1920×3840 |
                        | 21:9 | 2016×864 | 2688×1152 | 3840×1648 |
                        | 9:21 | 864×2016 | 1152×2688 | 1648×3840 |
                        | 3:1 | 1536×512 | 3072×1024 | 3840×1280 |
                        | 1:3 | 512×1536 | 1024×3072 | 1280×3840 |
                      examples:
                        - 1K
                    quality:
                      type: string
                      enum:
                        - low
                        - medium
                        - high
                        - xhigh
                        - max
                        - auto
                      default: medium
                      description: >-
                        Quality. Optional, default `medium`.


                        Supported: `low`, `medium`, `high`, `xhigh`, `max`,
                        `auto`.
                      examples:
                        - medium
                    background:
                      type: string
                      enum:
                        - transparent
                        - opaque
                        - auto
                      default: auto
                      description: >-
                        Background. Optional, default `auto`. Transparent
                        background is only supported with `png` / `webp`/ `gif`.


                        - `transparent`: transparent background, useful for
                        product cut-outs, icons and stickers. `output_format`
                        must be `png` or `webp`

                        - `opaque`: always a solid background

                        - `auto` (default): the model decides
                      examples:
                        - auto
                    output_format:
                      type: string
                      enum:
                        - png
                        - jpeg
                        - webp
                        - gif
                        - svg
                      default: png
                      description: >-
                        Output format. Optional, default `png`. Passing `jpg` is
                        treated as `jpeg`.


                        Supported: `png`, `jpeg`, `webp`, `gif`, `svg`.


                        - Transparent background is only supported with `png` /
                        `webp`

                        - For `gif`, use `size` / `frame_count` /
                        `frame_duration_ms`; do not send `svg`

                        - For `svg`, send `svg.model`; do not send the GIF
                        fields
                      examples:
                        - png
                    complexity:
                      type: string
                      enum:
                        - low
                        - medium
                        - high
                      default: high
                      description: |-
                        Planning complexity. Optional, default `high`.

                        Supported: `low`, `medium`, `high`.
                      examples:
                        - high
                    moderation:
                      type: string
                      enum:
                        - auto
                        - low
                      default: low
                      description: |-
                        Moderation strength. Optional, default `low`.

                        Supported: `auto`, `low`.
                      examples:
                        - low
                    output_compression:
                      type: integer
                      minimum: 0
                      maximum: 100
                      description: >-
                        JPEG / WebP compression, 0–100. Optional.


                        Send only when `output_format` is `jpeg` or `webp`. Do
                        not include this field for other formats.
                    size:
                      type: string
                      default: auto
                      description: >-
                        GIF **per-frame** pixel size. Send only when
                        `output_format=gif`. Width and height must both be
                        multiples of 16. Optional, default `auto` (currently
                        equivalent to `512x512`). Do not pass ratio names such
                        as `1:1`. Do not send for non-gif.


                        Frames are first packed into a sprite sheet: 2–8 frames
                        use 4×2, 9 frames use 3×3, 10–12 frames use 4×3, 13–16
                        frames use 4×4. Rows and columns may be swapped to get a
                        closer-to-square layout. The full sheet must have each
                        side ≤ 3840, total pixels ≤ 8,294,400, and long/short
                        side ratio ≤ 3:1, otherwise the request returns 400.


                        - `512x512` works for all 2–16 frames

                        - `768x768` supports at most 12 frames

                        - `1024x1024` exceeds the per-side sheet limit even with
                        only 2 frames
                      examples:
                        - auto
                    frame_count:
                      type: integer
                      minimum: 2
                      maximum: 16
                      default: 9
                      description: >-
                        GIF frame count. Send only when `output_format=gif`.
                        Integer 2–16, default 9. Do not send for non-gif.
                      examples:
                        - 9
                    frame_duration_ms:
                      type: integer
                      minimum: 20
                      maximum: 2000
                      multipleOf: 10
                      default: 200
                      description: >-
                        Duration of each GIF frame. Send only when
                        `output_format=gif`. Integer milliseconds, default 200,
                        minimum 20, rounded to 10 ms. Do not send for non-gif.
                      examples:
                        - 200
                    svg:
                      type: object
                      additionalProperties: false
                      description: >-
                        Send the whole `svg` object only when
                        `output_format=svg`. Do not include `svg` for other
                        formats.
                      properties:
                        model:
                          type: string
                          enum:
                            - gpt-6-sol
                            - gpt-5.6-luna
                            - gpt-5.6-terra
                          default: gpt-5.6-luna
                          description: >-
                            Text model used to write the SVG. Optional, default
                            `gpt-5.6-luna`.


                            Supported: `gpt-6-sol`, `gpt-5.6-luna`,
                            `gpt-5.6-terra`.


                            SVG output is billed in two parts: image tokens
                            (same as PNG) plus the selected author model's
                            input/output tokens. See the Pricing page for rates.
                          examples:
                            - gpt-5.6-luna
                      x-apidog-orders:
                        - model
                  required:
                    - prompt
                  x-apidog-orders:
                    - prompt
                    - aspect_ratio
                    - resolution
                    - quality
                    - background
                    - output_format
                    - complexity
                    - moderation
                    - output_compression
                    - size
                    - frame_count
                    - frame_duration_ms
                    - svg
              x-apidog-orders:
                - model
                - callBackUrl
                - input
            examples:
              '1':
                value:
                  model: gpt-image-2-6/sunburst-text-to-image
                  callBackUrl: https://your-domain.com/api/callback
                  input:
                    prompt: >-
                      A cinematic product photo of a red maple leaf on dark
                      stone, soft side light, shallow depth of field, with a
                      small paper tag that reads "BATCH 07".
                    aspect_ratio: '16:9'
                    resolution: 1K
                    quality: medium
                    background: auto
                    output_format: png
                description: Text to image
              '2':
                value:
                  model: gpt-image-2-6/sunburst-text-to-image
                  callBackUrl: https://your-domain.com/api/callback
                  input:
                    prompt: a waving flag
                    output_format: gif
                    size: 512x512
                    frame_count: 9
                    frame_duration_ms: 200
                description: GIF
              '3':
                value:
                  model: gpt-image-2-6/sunburst-text-to-image
                  callBackUrl: https://your-domain.com/api/callback
                  input:
                    prompt: a simple maple leaf icon
                    output_format: svg
                    svg:
                      model: gpt-5.4-mini
                description: SVG
      responses:
        '200':
          description: Request Successful
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  code:
                    type: integer
                    description: >-
                      Response status code


                      - **200**: Success - Request has been processed
                      successfully

                      - **401**: Unauthorized - Authentication credentials are
                      missing or invalid

                      - **402**: Insufficient Credits - Account does not have
                      enough credits to perform the operation

                      - **404**: Not Found - The requested resource or endpoint
                      does not exist

                      - **422**: Validation Error - The request parameters
                      failed validation checks

                      - **429**: Rate Limited - Request limit has been exceeded
                      for this resource

                      - **433**: Request Limit - Sub-key Usage Exceeds Limit

                      - **455**: Service Unavailable - System is currently
                      undergoing maintenance

                      - **500**: Server Error - An unexpected error occurred
                      while processing the request

                      - **501**: Generation Failed - Content generation task
                      failed

                      - **505**: Feature Disabled - The requested feature is
                      currently disabled
                    enum:
                      - 200
                      - 401
                      - 402
                      - 404
                      - 422
                      - 429
                      - 433
                      - 455
                      - 500
                      - 501
                      - 505
                  msg:
                    type: string
                    description: Response message, error description when failed
                    example: success
                  data:
                    type: object
                    required:
                      - taskId
                    properties:
                      taskId:
                        type: string
                        description: >-
                          Task ID, can be used with Get Task Details endpoint to
                          query task status
                        example: b84e1f27c6a3490d9e8f7a6b5c4d3e21
                title: response not with recordId
          headers: {}
          x-apidog-name: 成功
      security:
        - BearerAuth: []
          x-apidog:
            schemeGroups:
              - id: kn8M4YUlc5i0A0179ezwx
                schemeIds:
                  - BearerAuth
            required: true
            use:
              id: kn8M4YUlc5i0A0179ezwx
            scopes:
              kn8M4YUlc5i0A0179ezwx:
                BearerAuth: []
      callbacks:
        onImageGenerated:
          '{$request.body#/callBackUrl}':
            post:
              summary: Image Generation Callback
              description: Sent when the task succeeds or fails.
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        code:
                          type: integer
                          description: >-
                            200: success. 501: failure; see data.failCode and
                            data.failMsg.
                          enum:
                            - 200
                            - 501
                        msg:
                          type: string
                          description: Status message
                          example: Playground task completed successfully.
                        data:
                          type: object
                          properties:
                            completeTime:
                              type: integer
                              format: int64
                              description: >-
                                Task completion time, represented as a Unix
                                timestamp in milliseconds
                              example: 1786432830000
                            costTime:
                              type: integer
                              description: >-
                                Processing time in seconds. Present on both
                                success and failure callbacks.
                              example: 83
                            createTime:
                              type: integer
                              format: int64
                              description: >-
                                Task creation time, represented as a Unix
                                timestamp in milliseconds
                              example: 1786432746000
                            creditsConsumed:
                              type: number
                              format: double
                              description: >-
                                Credits consumed by the task; 0 for failed
                                tasks.
                              example: 3
                            model:
                              type: string
                              description: Image generation model used for the task
                              example: gpt-image-2-6/sunburst-text-to-image
                            param:
                              type: string
                              description: >-
                                Parameters submitted when creating the task, in
                                JSON string format
                              example: >-
                                {"input":"{\"aspect_ratio\":\"16:9\",\"prompt\":\"A
                                cinematic product photo of a red maple leaf on
                                dark stone, soft side light, shallow depth of
                                field, with a small paper tag that reads
                                \\\"BATCH
                                07\\\".\"}","callBackUrl":"https://your-domain.com/api/callback","model":"gpt-image-2-6/sunburst-text-to-image"}
                            resultJson:
                              type: string
                              description: >-
                                Image generation result in JSON string format.
                                Present only when state is success. Contains
                                resultUrls (list of generated image URLs) and
                                usage (token usage).
                              example: >-
                                {"resultUrls":["https://example.com/demo/gpt-image-2-6.png"],"usage":{"input_tokens":41,"output_tokens":924,"total_tokens":965,"input_tokens_details":{"text_tokens":41,"image_tokens":0,"cached_tokens":0},"output_tokens_details":{"text_tokens":0,"image_tokens":924}}}
                            state:
                              type: string
                              description: Task status
                              enum:
                                - success
                                - fail
                              example: success
                            taskId:
                              type: string
                              description: Task ID
                              example: ed578231bfed231f0884c564579a965d
                            updateTime:
                              type: integer
                              format: int64
                              description: >-
                                Use completeTime as the completion time;
                                updateTime may equal createTime.
                              example: 1786432830000
                            failCode:
                              type: string
                              description: >-
                                Failure code, a numeric string such as "400" or
                                "500". Present only when state is fail.
                              example: '500'
                            failMsg:
                              type: string
                              description: Failure reason. Present only when state is fail.
                              example: <error detail>
                    examples:
                      success:
                        summary: Success
                        value:
                          code: 200
                          msg: Playground task completed successfully.
                          data:
                            taskId: ed578231bfed231f0884c564579a965d
                            model: gpt-image-2-6/sunburst-text-to-image
                            state: success
                            param: >-
                              {"input":"{\"aspect_ratio\":\"16:9\",\"prompt\":\"A
                              cinematic product photo of a red maple leaf on
                              dark stone, soft side light, shallow depth of
                              field, with a small paper tag that reads \\\"BATCH
                              07\\\".\"}","callBackUrl":"https://your-domain.com/api/callback","model":"gpt-image-2-6/sunburst-text-to-image"}
                            resultJson: >-
                              {"resultUrls":["https://example.com/demo/gpt-image-2-6.png"],"usage":{"input_tokens":41,"output_tokens":924,"total_tokens":965,"input_tokens_details":{"text_tokens":41,"image_tokens":0,"cached_tokens":0},"output_tokens_details":{"text_tokens":0,"image_tokens":924}}}
                            completeTime: 1786432830000
                            createTime: 1786432746000
                            costTime: 83
                            creditsConsumed: 3
                            updateTime: 1786432830000
                      failure:
                        summary: Failure
                        value:
                          code: 501
                          msg: Playground task failed.
                          data:
                            taskId: ed578231bfed231f0884c564579a965d
                            model: gpt-image-2-6/sunburst-text-to-image
                            state: fail
                            param: >-
                              {"input":"{\"aspect_ratio\":\"16:9\",\"prompt\":\"A
                              cinematic product photo of a red maple leaf on
                              dark stone, soft side light, shallow depth of
                              field, with a small paper tag that reads \\\"BATCH
                              07\\\".\"}","callBackUrl":"https://your-domain.com/api/callback","model":"gpt-image-2-6/sunburst-text-to-image"}
                            failCode: '500'
                            failMsg: <error detail>
                            completeTime: 1786432830000
                            createTime: 1786432746000
                            costTime: 83
                            creditsConsumed: 0
                            updateTime: 1786432830000
              responses:
                '200':
                  description: Callback received successfully
      x-apidog-folder: docs/en/Market/Image    Models/GPT Image
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1184766/apis/api-46575176-run
components:
  schemas: {}
  securitySchemes:
    BearerAuth:
      type: bearer
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All API requests require a Bearer Token. Add the header `Authorization:
        Bearer YOUR_API_KEY` to authenticate requests.
    BearerAuth1:
      type: bearer
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 请求都需要 Bearer Token。请在请求头中添加 `Authorization: Bearer YOUR_API_KEY`
        进行身份验证。
servers:
  - url: https://api.kie.ai
    description: 正式环境
security:
  - BearerAuth: []
    x-apidog:
      schemeGroups:
        - id: kn8M4YUlc5i0A0179ezwx
          schemeIds:
            - BearerAuth
      required: true
      use:
        id: kn8M4YUlc5i0A0179ezwx
      scopes:
        kn8M4YUlc5i0A0179ezwx:
          BearerAuth: []

```
