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

# Qwen Image 系列

> 阿里通义千问图像 — 生成 / 编辑 / 多图参考一体化,2K 高保真输出

阿里通义千问图像系列,**两档定位**:

* **2.0 Pro** — 旗舰最高保真档,原生 2K、强细节、准确构图、专业级文字渲染,适合信息图、海报、营销资产
* **2.0** — 标准版,集成生成和编辑能力,支持超长提示词,2K 高质量输出,适合需要清晰文字和专业设计美感的场景

按张计费,统一接口同时支持文生图 / 图生图 / 多图参考。

## 定价

| 模型                   | 单价(每张)     |
| -------------------- | ---------- |
| `qwen-image-2.0-pro` | `$0.05625` |
| `qwen-image-2.0`     | `$0.0225`  |

## 模式速查

| 模式         | 触发字段                                        | 支持版本 |
| ---------- | ------------------------------------------- | ---- |
| **文生图**    | 仅 `prompt`                                  | 全部   |
| **图生图**    | `+ image_urls`(单张)+ `action: "image2image"` | 全部   |
| **多图参考融合** | `+ image_urls`(多张)+ `action: "reference"`   | 全部   |

## 调用示例

<CodeGroup>
  ```bash 文生图(最简) theme={"system"}
  curl -X POST https://www.qingbo.dev/v1/tasks \
    -H "Authorization: Bearer $WAVE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "qwen-image-2.0-pro",
      "prompt": "国风海报:水墨山水背景,正中竖排标题“千问”二字,金箔点缀,专业排版",
      "resolution": "2K",
      "aspect_ratio": "3:4"
    }'
  ```

  ```bash 图生图 theme={"system"}
  curl -X POST https://www.qingbo.dev/v1/tasks \
    -H "Authorization: Bearer $WAVE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "qwen-image-2.0",
      "action": "image2image",
      "prompt": "把这张照片转成赛博朋克风格,保留人物面部特征",
      "image_urls": ["https://cdn.example.com/portrait.jpg"],
      "resolution": "2K",
      "aspect_ratio": "9:16"
    }'
  ```

  ```bash 多图参考融合 theme={"system"}
  curl -X POST https://www.qingbo.dev/v1/tasks \
    -H "Authorization: Bearer $WAVE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "qwen-image-2.0-pro",
      "action": "reference",
      "prompt": "把第一张图的角色穿上第二张图的服装,放进第三张图的场景中",
      "image_urls": [
        "https://cdn.example.com/character.jpg",
        "https://cdn.example.com/outfit.jpg",
        "https://cdn.example.com/scene.jpg"
      ],
      "resolution": "2K",
      "aspect_ratio": "16:9"
    }'
  ```
</CodeGroup>

<ResponseExample>
  ```json 提交成功 theme={"system"}
  {
    "task_id": "task-wave1775285160b950328499",
    "model": "qwen-image-2.0-pro",
    "action": "generate",
    "status": "queued",
    "created_at": 1775285160040,
    "progress": 0
  }
  ```
</ResponseExample>

提交后用 [`GET /v1/tasks/{task_id}`](/cn/api-reference/task/status) 轮询状态,详见 [任务系统](/cn/docs/task-system)。

## 可用模型

| 模型 ID                | 说明                           |
| -------------------- | ---------------------------- |
| `qwen-image-2.0-pro` | 旗舰版,原生 2K,强细节、准确构图、专业级文字渲染   |
| `qwen-image-2.0`     | 标准版,生成 + 编辑一体,超长提示词,2K 高质量输出 |

## 通用参数

<ParamField body="model" type="string" required>
  从 [可用模型](#可用模型) 列表中选一个
</ParamField>

<ParamField body="action" type="string" default="generate">
  操作类型,可选值:

  * `generate` — 文生图(默认)
  * `image2image` — 图生图(需配合 `image_urls`)
  * `reference` — 多图参考融合(需配合多张 `image_urls`)
</ParamField>

<ParamField body="prompt" type="string" required>
  图像描述文本,支持中英文。Qwen Image 系列对超长提示词与中文文字渲染友好
</ParamField>

<ParamField body="n" type="integer" default="1">
  生成数量,单次返回多张。**取值范围 1–6**
</ParamField>

<ParamField body="aspect_ratio" type="string" default="1:1">
  画面宽高比,可选值:

  * `1:1` — 正方形
  * `4:3` / `3:4` — 横/竖版标准
  * `16:9` / `9:16` — 横/竖版宽屏
  * `3:2` / `2:3` — 横/竖版相机比
</ParamField>

<ParamField body="resolution" type="string" default="1K">
  输出分辨率,可选值:

  * `1K` — 普通分辨率(默认)
  * `2K` — 高分辨率
</ParamField>

<ParamField body="image_urls" type="string[]">
  参考 / 输入图片 URL 数组。**只支持公网可访问的 URL,不接受 base64**

  * `image2image` 模式:1 张
  * `reference` 模式:多张
</ParamField>

<ParamField body="callback_url" type="string">
  Webhook 回调地址,任务终态时调用。详见 [回调机制](/cn/docs/sync-async#异步任务-webhook)
</ParamField>

<ParamField body="callback_events" type="string[]">
  订阅的回调事件类型,默认订阅终态(`succeeded` / `failed`)
</ParamField>

## 模型特定参数

<Tabs>
  <Tab title="Qwen Image 2.0 Pro">
    **支持 action**:`generate` / `image2image` / `reference`

    **resolution**:`1K` / `2K`

    **aspect\_ratio**:`1:1` / `4:3` / `3:4` / `16:9` / `9:16` / `3:2` / `2:3`

    **核心特性**:旗舰最高保真档,原生 2K、强细节、准确构图、专业级文字渲染,适合信息图、海报、营销资产

    <ParamField body="negative_prompt" type="string">
      负面提示词,描述不希望出现的内容。**最长 500 字符**
    </ParamField>
  </Tab>

  <Tab title="Qwen Image 2.0">
    **支持 action**:`generate` / `image2image` / `reference`

    **resolution**:`1K` / `2K`

    **aspect\_ratio**:`1:1` / `4:3` / `3:4` / `16:9` / `9:16` / `3:2` / `2:3`

    **核心特性**:标准版,集成生成和编辑能力,支持超长提示词,2K 高质量输出,适合需要清晰文字和专业设计美感的场景

    <ParamField body="negative_prompt" type="string">
      负面提示词,描述不希望出现的内容。**最长 500 字符**
    </ParamField>
  </Tab>
</Tabs>

## 资源限制

| 项目                   | 限制                            |
| -------------------- | ----------------------------- |
| `prompt` 长度          | ≤ 800 字符                      |
| `negative_prompt` 长度 | ≤ 500 字符                      |
| 参考图来源                | **必须公网可访问 URL,不支持 base64 直传** |
| 单张参考图大小              | ≤ 30MB,支持 JPG / PNG / WEBP    |
| 输出分辨率                | `1K` / `2K`                   |
| 输出文件                 | 链接 24 小时有效                    |

## 相关文档

* [任务系统详解](/cn/docs/task-system) — 任务状态机 / 轮询节奏 / 异步推送
* [请求响应格式](/cn/docs/request-response) — 通用错误码 / Headers / 限流
* [认证](/cn/docs/authentication) — API Key 申请与使用
