> ## 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

> 面向密集版式与细节质感的 3.0 Pro 图像接口，支持 1K/2K 与精确像素尺寸（512–2048）、可选提示词重写、最多 3 张参考图编辑与单次最多 6 张输出。

## 参数与输入模式

`model` 与 `input` 必填，省略可选字段时使用模型默认值；完整字段定义见下方 Body 参数列表。

| 请求场景 | input 必填字段 |
| - | - |
| 文生图 | `prompt` |
| 参考图编辑 | `prompt`、`image_urls`（1–3 张公网 URL 或 PNG Data URL） |

## 特殊参数规则

* **精确像素**（`size: "widthxheight"`）：覆盖 `aspect_ratio` 与 `resolution`。宽 × 高大于 `2,250,000` 像素按 2K 计费，等于或小于按 1K 计费。
* **提示词重写**（`prompt_extend_mode`）：须同时传 `prompt_extend: true`。`direct` 支持文生图与编辑；`agent` 仅支持无参考图的文生图，传入 `image_urls` 会被拒绝。

## 使用场景

将以下示例提交到 `POST /api/v1/tasks/create_task`，并将提示词与图片链接替换为你的内容。

```json 文生图 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 参考图编辑 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 精确像素与 agent 重写 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"
  }
}
```

> 通过 [查询任务](https://docs.apistable.ai/zh/query-task.md) 或 `callback_url`（[Webhook 安全与验签](https://docs.apistable.ai/zh/webhook-secret.md)）获取结果，提交错误见 [创建任务](https://docs.apistable.ai/zh/create-task.md)。结果链接保留 14 天；超过 24 小时未完成的任务将标记失败且不扣费。

## 试用与价格

每次请求作为一个执行项，最多生成 `n`（1–6）张图片，按实际交付张数计费。每张输入参考图另加 0.5 积分（\$0.0025），每笔成功请求仅计一次，不乘 `n`。部分成功仅按交付张数加一次参考图费结算，全失败不扣费。余额查询见 [查询积分余额](https://docs.apistable.ai/zh/credits.md)。

| 计费项 | 积分 | USD |
| - | - | - |
| 1K 输出（每交付张） | 7 | \$0.035 |
| 2K 输出（每交付张） | 14 | \$0.070 |
| 参考图输入（每请求每张一次） | +0.5 | +\$0.0025 |

> [card] [在线试用](https://apistable.ai/zh/models/qwen-image-3.0-pro#try)
>
> 设置参数并在线生成图片。

> [card] [查看价格](https://apistable.ai/zh/models/qwen-image-3.0-pro#pricing)
>
> 查看输出单价、充值赠送折合价与参考图计费说明。


## OpenAPI

````yaml openapi-qwen-image-3.0-pro-zh.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: >-
        面向密集版式与细节质感的 3.0 Pro 图像接口，支持 1K/2K 与精确像素尺寸（512–2048）、可选提示词重写、最多 3
        张参考图编辑与单次最多 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: 本页对应的 APIstable 模型 ID。
                input:
                  $schema: https://json-schema.org/draft/2020-12/schema
                  type: object
                  properties:
                    prompt:
                      type: string
                      minLength: 1
                      description: 生成或编辑图片的文字描述。上限约 4,500 Tokens（受 64,000 字节 JSON 请求体上限约束）。
                    aspect_ratio:
                      default: '1:1'
                      description: 输出宽高比，默认 `1:1`。传入 `size` 时失效。
                      type: string
                      enum:
                        - '1:1'
                        - '4:3'
                        - '3:4'
                        - '16:9'
                        - '9:16'
                        - '3:2'
                        - '2:3'
                    resolution:
                      default: 1K
                      description: >-
                        分辨率档位（`1K` 或 `2K`，不区分大小写），默认 `1K`。当 `size` 传入精确 `宽x高`
                        像素时失效。
                      type: string
                      enum:
                        - 1K
                        - 2K
                        - 1k
                        - 2k
                    size:
                      description: >-
                        可选宽高比别名（`1:1`–`2:3` 或 `1x1`–`2x3`），或精确像素尺寸 `宽x高`（每边
                        512–2048 像素）。传入任意 `size` 均覆盖 `aspect_ratio`；精确像素同时覆盖
                        `resolution`。像素面积大于 2,250,000 时按 2K 计费（14 积分/张）。
                      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: 单次请求生成的图片张数（1–6），默认 `1`。仅按实际返回张数计费。
                      type: integer
                      minimum: 1
                      maximum: 6
                    image_urls:
                      default: []
                      description: >-
                        最多 3 张参考图用于图片编辑（省略或传 `[]` 为文生图）。支持公网 HTTP(S) 图片链接或 PNG
                        Base64 Data URL（`data:image/png;base64,...`），格式支持
                        JPG/JPEG/PNG/BMP/TIFF/WEBP/GIF，单张不超过 10 MB；因 JSON 请求体上限为
                        64,000 字节，建议优先传 URL。每张参考图在至少返回 1 张结果时按请求固定加收 0.5 积分（不随
                        `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: 选填。生成图片中需要避免的内容或元素。
                      type: string
                    prompt_extend:
                      default: false
                      description: 生成前是否启用提示词重写，默认 `false`。
                      type: boolean
                    prompt_extend_mode:
                      description: >-
                        提示词重写模式（`direct` 或 `agent`），须同时设置 `prompt_extend:
                        true`。`direct` 支持文生图和参考图编辑；`agent` 仅支持文生图，传入
                        `image_urls` 时会被拒绝。
                      type: string
                      enum:
                        - direct
                        - agent
                    nsfw_check:
                      default: false
                      description: 在受理任务前审核提示词和参考图，默认 `false`。
                      type: boolean
                  required:
                    - prompt
                  additionalProperties: false
                  description: >-
                    单个执行项支持文生图或参考图编辑。1K 按每张实际返回图片 7 积分计费，2K 按每张 14
                    积分计费。精确像素尺寸会覆盖分辨率和宽高比预设，像素面积大于 2,250,000 时按 2K 计费。每张参考图在至少返回
                    1 张结果时按请求固定加收 0.5 积分（不随 n 倍乘）。完全失败的请求不扣费；省略尺寸与比例时默认 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: 任务完成时接收签名回调的公网 HTTPS 地址。须为可直接访问的地址，不能跳转到其他地址。省略时可轮询查询任务接口。
            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: 已受理。使用 `task_id` [查询任务](/zh/query-task)，或通过 `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: >-
                  任务成功或失败后，APIstable 向创建任务时传入的 `callback_url` 发送 JSON POST。验签后返回
                  HTTP 2xx 确认接收。


                  用 `data.status` 判断生成结果。部分成功也返回 `succeeded`。`data.result.urls`
                  列出成功图片，图片保留 14 天。全部失败时为 `failed`，`data.result` 为
                  `null`，`data.message` 提供失败原因。


                  签名和去重使用 `X-APIstable-Signature`、`X-APIstable-Timestamp` 和
                  `X-APIstable-Event-Id`。详见 [Webhook 安全与验签](/zh/webhook-secret)。


                  **Webhook 请求体示例**


                  ```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。
              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: >-
        登录 APIstable 后，在 [API Key 管理](https://apistable.ai/zh/console/keys)
        创建并复制密钥。


        每次调用都要在 HTTP 请求头传入：


        ```http

        Authorization: Bearer YOUR_API_KEY

        ```


        将 YOUR_API_KEY 替换为你创建的 API Key。

````

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