From ad58dab697d4c484d09a887840d824e9c733d820 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 2 Jun 2026 15:08:27 +0800 Subject: [PATCH] docs: add qwen-image-2.0 and qwen-image-plus models to image generation API docs --- wwwroot/api_doc.html | 35 +++++++++++++++++ wwwroot/api_doc.md | 92 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) diff --git a/wwwroot/api_doc.html b/wwwroot/api_doc.html index ef86124..532f3b4 100644 --- a/wwwroot/api_doc.html +++ b/wwwroot/api_doc.html @@ -439,6 +439,41 @@ data: [DONE]` lang: "json", code: `{"status": "ok", "data": {"image": "https://...", "usage": {"image_count": 1}}}` } + }, + { + name: "千问图像 qwen-image-2.0 系列(同步/0.5元/张)", + params: [ + { name: "model", type: "string", required: true, desc: "qwen-image-2.0-pro / qwen-image-2.0-2026-03-03" }, + { name: "catelogid", type: "string", required: true, desc: "文生图固定 t2i" }, + { name: "prompt", type: "string", required: true, desc: "提示词" }, + { name: "image_file", type: "image", required: false, desc: "参考图 URL(图生图)" }, + { name: "size", type: "string", required: false, desc: "尺寸,默认 2048*2048" }, + { name: "n", type: "integer", required: false, desc: "生成数量 1-4" }, + { name: "watermark", type: "boolean", required: false, desc: "是否添加水印,默认 false" }, + { name: "prompt_extend", type: "boolean", required: false, desc: "是否扩展提示词,默认 true" } + ], + responseExample: { + lang: "json", + code: `{"status": "ok", "data": {"image": ["https://..."], "usage": {"image_count": 1}}}` + } + }, + { + name: "千问图像 qwen-image-plus 系列(异步/0.2元/张)", + params: [ + { name: "model", type: "string", required: true, desc: "qwen-image-plus / qwen-image-plus-2026-01-09" }, + { name: "catelogid", type: "string", required: true, desc: "文生图固定 t2i" }, + { name: "prompt", type: "string", required: true, desc: "提示词" }, + { name: "size", type: "string", required: false, desc: "尺寸:512*512, 1024*1024, 2048*2048 等" }, + { name: "n", type: "integer", required: false, desc: "生成数量 1-4" } + ], + responseExample: { + lang: "json", + code: `// 提交响应 +{"status": "ok", "data": {"taskid": "task_xxx", "status": "PENDING"}} + +// 查询结果(/v1/tasks?taskid=task_xxx) +{"status": "ok", "data": {"status": "SUCCEEDED", "output": [{"url": "https://..."}], "usage": {"image_count": 1}}}` + } } ] }, diff --git a/wwwroot/api_doc.md b/wwwroot/api_doc.md index c3d68cd..a4530f3 100644 --- a/wwwroot/api_doc.md +++ b/wwwroot/api_doc.md @@ -521,6 +521,98 @@ data: [DONE] --- +#### 千问图像(Qwen-Image) + +##### qwen-image-2.0 系列 - 文生图 + +**同步模型**(直接返回图像数据): + +| 参数名 | 类型 | 必填 | 默认值 | 说明 | 可选值 | +|--------|------|------|--------|------|--------| +| `model` | string | 是 | - | 模型名称 | `qwen-image-2.0-pro`, `qwen-image-2.0-2026-03-03` | +| `catelogid` | string | 是 | `t2i` | 目录类型ID,文生图固定为 `t2i` | `t2i` | +| `prompt` | string | 是 | - | 提示词 | - | +| `image_file` | image | 否 | - | 参考图 URL(图生图) | - | +| `size` | string | 否 | `2048*2048` | 图像尺寸 | `512*512`, `1024*1024`, `2048*2048` 等 | +| `n` | integer | 否 | `1` | 生成数量 | 1-4 | +| `watermark` | boolean | 否 | `false` | 是否添加水印 | `true`, `false` | +| `prompt_extend` | boolean | 否 | `true` | 是否扩展提示词 | `true`, `false` | + +**可用模型:** + +| 模型名称 | 说明 | 价格 | +|----------|------|------| +| `qwen-image-2.0-pro` | 千问图像生成Pro系列,文字渲染、真实质感、语义遵循能力更强 | 0.5元/张 | +| `qwen-image-2.0-2026-03-03` | 千问图像生成2.0快照版(2026-03-03),兼顾效果与响应速度 | 0.5元/张 | + +**响应示例(同步返回):** + +```json +{ + "status": "ok", + "data": { + "image": ["https://..."], + "usage": { + "image_count": 1 + } + } +} +``` + +--- + +##### qwen-image-plus 系列 - 文生图 + +**异步模型**(需通过 `/v1/tasks?taskid=xxx` 查询状态): + +| 参数名 | 类型 | 必填 | 默认值 | 说明 | 可选值 | +|--------|------|------|--------|------|--------| +| `model` | string | 是 | - | 模型名称 | `qwen-image-plus`, `qwen-image-plus-2026-01-09` | +| `catelogid` | string | 是 | `t2i` | 目录类型ID,文生图固定为 `t2i` | `t2i` | +| `prompt` | string | 是 | - | 提示词 | - | +| `size` | string | 否 | `1024*1024` | 图像尺寸 | `512*512`, `1024*1024`, `2048*2048` 等 | +| `n` | integer | 否 | `1` | 生成数量 | 1-4 | + +**可用模型:** + +| 模型名称 | 说明 | 价格 | +|----------|------|------| +| `qwen-image-plus` | 千问图像Plus系列,擅长多样化艺术风格与文字渲染 | 0.2元/张 | +| `qwen-image-plus-2026-01-09` | 千问图像Plus快照版(2026-01-09),为qwen-image-max的蒸馏加速版 | 0.2元/张 | + +**响应示例(异步提交):** + +```json +{ + "status": "ok", + "data": { + "taskid": "task_xxx", + "status": "PENDING" + } +} +``` + +**查询任务状态(`/v1/tasks?taskid=task_xxx`):** + +```json +{ + "status": "ok", + "data": { + "status": "SUCCEEDED", + "output": [ + { + "url": "https://..." + } + ], + "usage": { + "image_count": 1 + } + } +} +``` + +--- + ## GET /v1/tasks 查询异步任务状态。