阿里巴巴 Qwen Image 3.0。同一端点支持文生图与图像编辑(传参考图即进入编辑,最多 3 张),强项是密集图内文字、12 国语言与结构化版面。分辨率 1K / 2K,画幅 8 档或 auto。两档:标准 qwen3-image($0.04/张)、Pro qwen3-image-pro(1K $0.05 / 2K $0.10)。异步任务:POST 创建后 GET 轮询或走 callback_url。
Authorization: Bearer YOUR_API_KEY| 模型 | model | 价格 | 说明 |
|---|---|---|---|
| Qwen Image 3.0 | qwen3-image | $0.04 | 1K/2K 同价 · 日常批量 |
| Qwen Image 3.0 Pro | qwen3-image-pro | $0.05 / $0.10 | 1K / 2K · 照片级细节 |
图像编辑时每张参考图另加 $0.004。失败不扣费。
/api/v1/images/generations创建任务/api/v1/images/generations?task_id=...查询状态# ─── 1. Text-to-image ──────────────────────────────────────
# model: "qwen3-image" (standard) or "qwen3-image-pro" (higher fidelity).
# resolution: "1K" | "2K". aspect_ratio: 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 21:9 (or "auto").
curl -X POST https://apimodels.app/api/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-image",
"prompt": "A cafe opening poster, vertical layout. Bold brush-calligraphy title, small caption text, minimal editorial style",
"resolution": "2K",
"aspect_ratio": "9:16"
}'
# Response:
# { "code": 200, "msg": "success", "data": { "taskId": "clxxx...", "state": "pending" } }
# ─── 2. Image editing with a reference URL ─────────────────
curl -X POST https://apimodels.app/api/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-image-pro",
"prompt": "Keep the subject, change to soft evening light",
"image_urls": ["https://example.com/photo.jpg"],
"aspect_ratio": "auto"
}'
# ─── 3. Multi-image edit (up to 3 reference images) ────────
curl -X POST https://apimodels.app/api/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-image",
"prompt": "Replace the poster in image 1 with the product from image 2",
"image_urls": [
"https://example.com/scene.jpg",
"https://example.com/product.jpg"
]
}'
# ─── 4. Poll task status ───────────────────────────────────
curl "https://apimodels.app/api/v1/images/generations?task_id=clxxx..." \
-H "Authorization: Bearer YOUR_API_KEY"| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| model | 是 | string | "qwen3-image"(标准)或 "qwen3-image-pro"(Pro) |
| prompt | 是 | string | 图片描述或编辑指令,支持中英文。编辑多图时可用 "image 1"、"image 2" 引用具体参考图。 |
| resolution | 否 | string | "1K"(默认)或 "2K"。标准版 1K/2K 同价 $0.04;Pro 版 1K $0.05、2K $0.10。 |
| aspect_ratio | 否 | string | 画幅:1:1 / 3:2 / 2:3 / 4:3 / 3:4 / 16:9 / 9:16 / 21:9。省略或传 "auto" 由模型按提示词自动选择。 |
| image_urls | 否 | string[] | 参考图 URL(1–3 张,每张 ≤ 10MB,jpeg/png/webp)。传入则走图像编辑,每张另加 $0.004。 |
| image_url | 否 | string | 单张参考图 URL,等价于 image_urls 只传一张。 |
| image_base64 | 否 | string | Base64 或 data URI 的参考图(本地文件用)。 |
| negative_prompt | 否 | string | 反向提示词,描述不希望出现的内容。 |
| prompt_extend | 否 | boolean | 是否开启提示词智能改写,默认 true。短提示词开启后效果更好。 |
| seed | 否 | integer | 随机种子 [0, 2147483647]。固定可复现结果。 |
| callback_url | 否 | string | 任务完成回调 URL,服务端 POST 与轮询相同结构的 JSON。 |
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| code | — | integer | 200 表示创建/查询成功;其他值见错误码表 |
| msg | — | string | "success" 或错误描述 |
| data.taskId | — | string | 任务 ID,查询状态时用 |
| data.state | — | string | pending / processing / completed / failed |
| data.resultUrls | — | string[] | 仅在 state=completed 时返回;R2 托管图片 URL,保留 7 天后自动删除,请及时下载或转存。 |
| data.failMsg | — | string | 仅在 state=failed 时返回,上游失败原因 |
试一试:Playground,Pro 版见 Qwen Image 3.0 Pro
标准版 qwen3-image 1K/2K 同价 $0.04/张;Pro 版 qwen3-image-pro 1K $0.05、2K $0.10。图像编辑每张参考图另加 $0.004。失败不扣费。
可以。只传 prompt 就是文生图;加 image_urls(1–3 张参考图)同一个模型就转为图像编辑。无需切端点或模型名。