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

# Qwen Image

> 使用 Qwen Image 系列模型进行文生图，客户端继续使用 OpenAI Images 兼容协议

> 内容更新: 2026-06-06

# Qwen Image

```
POST /v1/images/generations
```

Crazyrouter 当前对外以 OpenAI Images 兼容协议开放 `Qwen Image` 首批生成模型。客户继续使用统一的 `/v1/images/generations`，阿里官方与第三方承载只作为内部 provider，不单独暴露客户协议。

## 当前开放模型

| 模型 | 上游执行形态 | 当前对客能力 | 验证状态 |
| - | - | - | - |
| `qwen-image-plus` | 异步生成 | 文生图 | 已验证 |
| `qwen-image-max` | 同步生成 | 文生图 | 已验证 |
| `qwen-image-2.0` | 同步生成 | 文生图 | 已验证 |
| `qwen-image-2.0` | 同步生成 | 文生图 | Beta |

> [!NOTE]
>
> `qwen-image-2.0` 当前已经完成协议与代码对齐，但生产承载证据还在补齐，所以先按 Beta 标注。

## 客户协议

### 请求参数

| 参数 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `model` | string | 是 | `qwen-image-plus`、`qwen-image-max`、`qwen-image-2.0`、`qwen-image-2.0` |
| `prompt` | string | 是 | 文生图提示词 |
| `size` | string | 否 | 输出尺寸。建议使用当前模型页或 playground 给出的受支持尺寸 |
| `n` | integer | 否 | 生成张数，默认 `1` |
| `response_format` | string | 否 | `url` 或 `b64_json` |

### 请求示例

```bash cURL theme={null}
curl -X POST https://api.crazyrouter.com/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "qwen-image-max",
    "prompt": "一张具有高级感的产品海报，主体是一瓶玻璃香水，柔和棚拍光线，中文标题“晨雾”",
    "size": "1024x1024",
    "n": 1,
    "response_format": "url"
  }'
```

```python Python theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.crazyrouter.com/v1"
)

response = client.images.generate(
    model="qwen-image-max",
    prompt="一张具有高级感的产品海报，主体是一瓶玻璃香水，柔和棚拍光线，中文标题“晨雾”",
    size="1024x1024",
    n=1
)

print(response.data[0].url)
```

### 响应示例

```json theme={null}
{
  "created": 1709123456,
  "data": [
    {
      "url": "https://crazyrouter.com/files/qwen_image_abc123.png"
    }
  ]
}
```

## 官方计费口径

Qwen Image 当前官方真值按成功生成图片张数计费，不按输入/输出 token 展示。

| 模型 | 官方口径 | 官方单价 | 当前文档状态 |
| - | - | - | - |
| `qwen-image-plus` | 按图 | `¥0.20 / 图` | 已验证 |
| `qwen-image-max` | 按图 | `¥0.50 / 图` | 已验证 |
| `qwen-image-2.0` | 按图 | `¥0.20 / 图` | 已验证 |
| `qwen-image-2.0` | 按图 | `¥0.50 / 图` | Beta |

## 边界说明

* 本页首批只承诺 `文生图` 对客能力，不把上游更多多模态能力直接外露成客户协议。
* `Qwen Image` 的 provider 侧可能存在异步或同步差异，但客户侧继续使用统一的 OpenAI Images 请求/响应格式。
* 图片编辑模型 `qwen-image-plus` 不在本页这批“生成模型收口”范围内；如需编辑能力，应按编辑模型的当前开放状态单独评估。

## 相关页面

* [Qwen Image 2.0 模型页：实时价格、真实样例、调用代码](https://crazyrouter.com/zh/models/alibaba/qwen-image-2-0?utm_source=docs\&utm_medium=related)
* [Alibaba Cloud 全部模型与价格](https://crazyrouter.com/zh/models/alibaba?utm_source=docs\&utm_medium=related)


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