模型概览
- 端点
- /api/v1/images/generations
- 积分成本
- 10 credits / image
- 典型耗时
- 20-60 sec
- 输入与输出
- Text, up to 3 images → PNG or JPEG
能力
- 1K and 2K output
- Text and image conditioning
- Prompt expansion
- Deterministic seeds
请求参数
| 参数 | 类型 | 要求 | 说明 |
|---|---|---|---|
| model | string | 必填 | Model identifier. 默认值: qwen-image-3 |
| prompt | string | 必填 | Generation prompt, up to 800 characters. |
| image_urls | string[] | 可选 | Up to three public image URLs for image-to-image generation. |
| aspect_ratio | string | 可选 | Output aspect ratio. 默认值: 16:9 |
| resolution | 1K | 2K | 可选 | Output resolution tier. 默认值: 1K |
| output_format | png | jpeg | 可选 | Generated file format. 默认值: png |
| seed | integer | 可选 | Integer from 0 to 2147483647. 默认值: 1 |
请求示例
curl https://qwenapi.org/api/v1/images/generations \
-H "Authorization: Bearer $QWEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-3",
"prompt": "Editorial product photo of a translucent blue speaker on a steel desk, soft morning light",
"aspect_ratio": "16:9",
"resolution": "1K",
"output_format": "png"
}'生成端点为异步任务。请使用同一个 Bearer 密钥轮询 GET /api/v1/tasks/。
