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

# Qwen Image 3.0 Pro

> Generate or edit dense layouts and detailed visuals at 1K/2K or exact pixels (512–2048 px), with optional prompt rewriting, up to 3 reference images, and n = 1–6.

## Parameters and input modes

`model` and `input` are required; omitted optional fields use model defaults. See the Body section below for full field definitions.

| Request type | Required input fields |
| - | - |
| Text to image | `prompt` |
| Reference image editing | `prompt`, `image_urls` (1–3 URLs or PNG Data URLs) |

## Special modes

* **Exact pixels** (`size: "widthxheight"`): Overrides `aspect_ratio` and `resolution`. Width × height above `2,250,000` pixels uses the 2K rate; `2,250,000` pixels or less uses 1K.
* **Prompt rewriting** (`prompt_extend_mode`): Requires `prompt_extend: true`. `direct` works for both generation and editing; `agent` is text-to-image only and is rejected when `image_urls` is non-empty.

## Use cases

Submit an example to `POST /api/v1/tasks/create_task` with your own prompt and image URLs.

```json Text to image theme={null}
{
  "model": "qwen-image-3.0-pro",
  "input": {
    "prompt": "A polished museum exhibition poster titled \"BOTANICAL ATLAS\" with four labeled botanical plates arranged in a crisp grid on cream archival paper, refined serif typography.",
    "aspect_ratio": "1:1",
    "resolution": "1K",
    "n": 2
  }
}
```

```json Reference image editing theme={null}
{
  "model": "qwen-image-3.0-pro",
  "input": {
    "prompt": "Preserve the illustrated diagram layout and existing labels; add a clean callout line and label pointing to the upper petal.",
    "image_urls": [
      "https://cdn.example.com/product.png"
    ],
    "resolution": "1K"
  }
}
```

```json Exact pixels and agent rewrite theme={null}
{
  "model": "qwen-image-3.0-pro",
  "input": {
    "prompt": "Top-down architectural garden plan with winding flagstone paths, wooden pergola, pond, and labeled planting beds in warm daylight.",
    "size": "1600x1200",
    "prompt_extend": true,
    "prompt_extend_mode": "agent"
  }
}
```

> Track results via [Query task](https://docs.apistable.ai/query-task.md) or `callback_url` ([Webhook security](https://docs.apistable.ai/webhook-secret.md)); see [Create task](https://docs.apistable.ai/create-task.md) for submission errors. Output URLs remain valid for 14 days; tasks unfinished after 24 hours fail at no charge.

## Playground and pricing

Each task runs as one execution item for up to `n` (1–6) images and bills per delivered image. Each reference image adds 0.5 Credits (\$0.0025) once per successful request—not multiplied by `n`. Partial success bills only delivered images plus the one-time reference fee; failed tasks cost 0. Check balances via [Available Credits](https://docs.apistable.ai/credits.md).

| Billing item | Credits | USD |
| - | - | - |
| 1K output (per delivered image) | 7 | \$0.035 |
| 2K output (per delivered image) | 14 | \$0.070 |
| Reference image input (once per request) | +0.5 | +\$0.0025 |

> [card] [Try in Playground](https://apistable.ai/models/qwen-image-3.0-pro#try)
>
> Set parameters and generate an image.

> [card] [View pricing](https://apistable.ai/models/qwen-image-3.0-pro#pricing)
>
> Compare output rates, bonus pricing, and reference fees.


## OpenAPI

````yaml openapi-qwen-image-3.0-pro.json POST /api/v1/tasks/create_task
openapi: 3.1.0
info:
  title: APIstable API
  version: 1.0.0-preview
  description: >-
    Public /api/v1 protocol. Valid API keys have the same account-scoped access.
    Read the selected model documentation for its ID, supported inputs, result
    format and availability before submitting. No client submission idempotency
    or max_credits. Availability, pricing, file retention and callback formats
    follow the selected model contract. Unconfigured operations return 503.
servers:
  - url: https://apistable.ai
    description: API Stable API
security: []
paths:
  /api/v1/tasks/create_task:
    post:
      summary: Qwen Image 3.0 Pro
      description: >-
        Generate or edit dense layouts and detailed visuals at 1K/2K or exact
        pixels (512–2048 px), with optional prompt rewriting, up to 3 reference
        images, and n = 1–6.
      operationId: qwen-image-3.0-pro
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              additionalProperties: false
              properties:
                model:
                  type: string
                  enum:
                    - qwen-image-3.0-pro
                  example: qwen-image-3.0-pro
                  description: The APIstable model ID for this endpoint.
                input:
                  $schema: https://json-schema.org/draft/2020-12/schema
                  type: object
                  properties:
                    prompt:
                      type: string
                      minLength: 1
                      description: >-
                        Text instructions for generating or editing the image.
                        Supports up to roughly 4,500 tokens (subject to the
                        64,000-byte JSON request body limit).
                    aspect_ratio:
                      default: '1:1'
                      description: >-
                        Output aspect ratio. Defaults to `1:1`. Ignored when
                        `size` is supplied.
                      type: string
                      enum:
                        - '1:1'
                        - '4:3'
                        - '3:4'
                        - '16:9'
                        - '9:16'
                        - '3:2'
                        - '2:3'
                    resolution:
                      default: 1K
                      description: >-
                        Resolution preset (`1K` or `2K`, case-insensitive).
                        Defaults to `1K`. Ignored when `size` uses exact
                        `widthxheight` pixels.
                      type: string
                      enum:
                        - 1K
                        - 2K
                        - 1k
                        - 2k
                    size:
                      description: >-
                        Optional aspect-ratio alias (`1:1`–`2:3` or `1x1`–`2x3`)
                        or exact `widthxheight` pixels (each edge 512–2048). Any
                        `size` overrides `aspect_ratio`; exact pixels also
                        override `resolution`. Pixel area above 2,250,000 uses
                        the 2K rate (14 Credits/image).
                      anyOf:
                        - type: string
                          enum:
                            - '1:1'
                            - '4:3'
                            - '3:4'
                            - '16:9'
                            - '9:16'
                            - '3:2'
                            - '2:3'
                        - type: string
                          enum:
                            - 1x1
                            - 4x3
                            - 3x4
                            - 16x9
                            - 9x16
                            - 3x2
                            - 2x3
                        - type: string
                          pattern: >-
                            ^(?:51[2-9]|5[2-9][0-9]|[6-9][0-9]{2}|1[0-9]{3}|20[0-3][0-9]|204[0-8])x(?:51[2-9]|5[2-9][0-9]|[6-9][0-9]{2}|1[0-9]{3}|20[0-3][0-9]|204[0-8])$
                    'n':
                      default: 1
                      description: >-
                        Number of images to request in one execution item (1–6).
                        Defaults to `1`. Only delivered images are charged.
                      type: integer
                      minimum: 1
                      maximum: 6
                    image_urls:
                      default: []
                      description: >-
                        Up to 3 reference images for editing (omit or pass `[]`
                        for text-to-image). Accepts public HTTP(S) URLs or PNG
                        Base64 Data URLs (`data:image/png;base64,...`). Supports
                        JPG/JPEG/PNG/BMP/TIFF/WEBP/GIF up to 10 MB each; prefer
                        URLs due to the 64,000-byte JSON body limit. Each
                        reference adds 0.5 Credits once per successful request
                        (not multiplied by `n`).
                      maxItems: 3
                      type: array
                      items:
                        anyOf:
                          - type: string
                            format: uri
                          - type: string
                            pattern: ^data:image\/png;base64,[A-Za-z0-9+/]+={0,2}$
                    negative_prompt:
                      description: >-
                        Optional content or artifacts to avoid in the generated
                        image.
                      type: string
                    prompt_extend:
                      default: false
                      description: >-
                        Enable automatic prompt rewriting before generation.
                        Defaults to `false`.
                      type: boolean
                    prompt_extend_mode:
                      description: >-
                        Prompt rewriting mode (`direct` or `agent`). Requires
                        `prompt_extend: true`. `direct` supports text-to-image
                        and reference editing; `agent` is text-to-image only and
                        is rejected when `image_urls` is non-empty.
                      type: string
                      enum:
                        - direct
                        - agent
                    nsfw_check:
                      default: false
                      description: >-
                        Screen the prompt and reference images before accepting
                        the task. Defaults to `false`.
                      type: boolean
                  required:
                    - prompt
                  additionalProperties: false
                  description: >-
                    Text-to-image or reference editing in a single execution
                    item. Each delivered image costs 7 Credits at 1K or 14
                    Credits at 2K. Exact pixel sizes override resolution and
                    aspect-ratio presets; pixel area above 2,250,000 uses the 2K
                    rate. Each reference image adds 0.5 Credits once per request
                    when at least one output is delivered (not multiplied by n).
                    Fully failed requests are not charged. Omitted dimensions
                    default to 1K 1:1.
                  allOf:
                    - if:
                        required:
                          - prompt_extend_mode
                      then:
                        required:
                          - prompt_extend
                        properties:
                          prompt_extend:
                            const: true
                    - if:
                        required:
                          - prompt_extend_mode
                        properties:
                          prompt_extend_mode:
                            const: agent
                      then:
                        properties:
                          image_urls:
                            maxItems: 0
                callback_url:
                  type: string
                  format: uri
                  description: >-
                    Optional public HTTPS endpoint for signed completion
                    callbacks; no redirects or private IPs.
            example:
              model: qwen-image-3.0-pro
              input:
                prompt: >-
                  A polished museum exhibition poster titled "BOTANICAL ATLAS"
                  with four labeled botanical plates arranged in a crisp grid on
                  cream archival paper, refined serif typography.
                aspect_ratio: '1:1'
                resolution: 1K
                'n': 1
      responses:
        '200':
          description: >-
            Accepted task. Use `task_id` to [query the task](/query-task), or
            receive the result at `callback_url`.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - msg
                  - data
                additionalProperties: false
                properties:
                  code:
                    const: 200
                  msg:
                    const: success
                  data:
                    type: object
                    required:
                      - task_id
                    additionalProperties: false
                    properties:
                      task_id:
                        type: string
        '400':
          description: >-
            40001 invalid JSON, 40002 invalid input/callback or input rejected
            by screening, 40003 unsupported parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: '40201: Insufficient credits (live acceptance).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: '40301: Website session requests require the APIstable site origin.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: '40401: Unknown model or resource not found in this account.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: '40901: Resource incompatible with this operation.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '410':
          description: '41001: Source audio or temporary resource has expired.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: '41301: Request too large.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: '42201: Requested capability combination is not enabled.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: '42901: Rate/concurrency limit (live acceptance).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: '50301: Service unavailable. No live submission or charge.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      callbacks:
        Webhook:
          '{$request.body#/callback_url}':
            post:
              requestBody:
                required: true
                description: >-
                  When the task succeeds or fails, APIstable sends a JSON POST
                  to the `callback_url` supplied at creation. Verify the
                  signature and return HTTP 2xx to acknowledge delivery.


                  Read `data.status` to determine the generation outcome.
                  Partial success also reports `succeeded`. `data.result.urls`
                  lists successful images, which are retained for 14 days. For a
                  failed task, `data.result` is `null` and `data.message`
                  contains the failure reason.


                  Use `X-APIstable-Signature`, `X-APIstable-Timestamp`, and
                  `X-APIstable-Event-Id` to verify and deduplicate deliveries.
                  See [Webhook security](/webhook-secret).


                  **Webhook payload example**


                  ```json

                  {
                    "code": 200,
                    "msg": "success",
                    "data": {
                      "task_id": "00000000-0000-4000-8000-000000000001",
                      "model": "qwen-image-3.0-pro",
                      "status": "succeeded",
                      "created_at": "2026-11-13T08:30:00.000Z",
                      "completed_at": "2026-11-13T08:30:08.000Z",
                      "duration": 8000,
                      "charged_credits": 7,
                      "message": "",
                      "input": "{\"prompt\":\"A ceramic teapot in soft morning light\",\"aspect_ratio\":\"1:1\",\"resolution\":\"1K\",\"n\":1}",
                      "result": {
                        "urls": [
                          "https://cdn.example.com/generated/image.png"
                        ],
                        "items": [
                          {
                            "id": "00000000-0000-4000-8000-000000000002",
                            "status": "succeeded",
                            "charged_credits": 7,
                            "urls": [
                              "https://cdn.example.com/generated/image.png"
                            ]
                          }
                        ]
                      }
                    }
                  }

                  ```
                content:
                  application/json:
                    schema:
                      type: object
                      required:
                        - code
                        - msg
                        - data
                      properties:
                        code:
                          type: integer
                          const: 200
                        msg:
                          type: string
                          const: success
                        data:
                          type: object
                          additionalProperties: false
                          required:
                            - task_id
                            - model
                            - status
                            - created_at
                            - completed_at
                            - duration
                            - charged_credits
                            - message
                            - input
                            - result
                          properties:
                            task_id:
                              type: string
                            model:
                              type: string
                              const: qwen-image-3.0-pro
                            status:
                              type: string
                              enum:
                                - succeeded
                                - failed
                            created_at:
                              type: string
                              format: date-time
                            completed_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            duration:
                              type:
                                - integer
                                - 'null'
                              minimum: 0
                              description: >-
                                Total elapsed milliseconds; null while
                                processing.
                            charged_credits:
                              type:
                                - number
                                - 'null'
                              minimum: 0
                              description: Final charged Credits; null until completion.
                            message:
                              type: string
                              description: >-
                                Failure reason for failed tasks, or an
                                actionable pending-settlement message while
                                processing; empty on success.
                            input:
                              type: string
                              contentMediaType: application/json
                              description: JSON-serialized accepted model input.
                            result:
                              type: object
                              required:
                                - urls
                                - items
                              properties:
                                urls:
                                  type: array
                                  maxItems: 100
                                  items:
                                    type: string
                                    format: uri
                                items:
                                  type: array
                                  maxItems: 4
                                  items:
                                    type: object
                                    required:
                                      - id
                                      - status
                                      - charged_credits
                                      - urls
                                    properties:
                                      id:
                                        type: string
                                        format: uuid
                                      status:
                                        type: string
                                      charged_credits:
                                        type: number
                                        minimum: 0
                                      urls:
                                        type: array
                                        items:
                                          type: string
                                          format: uri
                    example:
                      code: 200
                      msg: success
                      data:
                        task_id: 00000000-0000-4000-8000-000000000001
                        model: qwen-image-3.0-pro
                        status: succeeded
                        created_at: '2026-11-13T08:30:00.000Z'
                        completed_at: '2026-11-13T08:30:08.000Z'
                        duration: 8000
                        charged_credits: 7
                        message: ''
                        input: >-
                          {"prompt":"A ceramic teapot in soft morning
                          light","aspect_ratio":"1:1","resolution":"1K","n":1}
                        result:
                          urls:
                            - https://cdn.example.com/generated/image.png
                          items:
                            - id: 00000000-0000-4000-8000-000000000002
                              status: succeeded
                              charged_credits: 7
                              urls:
                                - https://cdn.example.com/generated/image.png
              responses:
                2XX:
                  description: Webhook acknowledged.
              method: post
              type: path
            path: '{$request.body#/callback_url}'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      required:
        - code
        - msg
        - data
      properties:
        code:
          type: integer
        msg:
          type: string
        data:
          type: 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Sign in to APIstable, then create and copy a key from [API Key
        management](https://apistable.ai/console/keys).


        Send this HTTP header with every request:


        ```http

        Authorization: Bearer YOUR_API_KEY

        ```


        Replace YOUR_API_KEY with the key you created.

````

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