docs: fix image generation response format - remove outer wrapper, use direct UAPI response
This commit is contained in:
parent
0d73c74c4d
commit
4ac95125d7
@ -410,7 +410,7 @@ data: [DONE]`
|
|||||||
],
|
],
|
||||||
models: [
|
models: [
|
||||||
{
|
{
|
||||||
name: "万象图像 wan2.7 系列(异步)",
|
name: "万象图像 wan2.7 系列(同步)",
|
||||||
params: [
|
params: [
|
||||||
{ name: "model", type: "string", required: true, desc: "wan2.7-image-pro / wan2.7-image-plus" },
|
{ name: "model", type: "string", required: true, desc: "wan2.7-image-pro / wan2.7-image-plus" },
|
||||||
{ name: "catelogid", type: "string", required: true, desc: "文生图固定 t2i" },
|
{ name: "catelogid", type: "string", required: true, desc: "文生图固定 t2i" },
|
||||||
@ -420,11 +420,11 @@ data: [DONE]`
|
|||||||
],
|
],
|
||||||
responseExample: {
|
responseExample: {
|
||||||
lang: "json",
|
lang: "json",
|
||||||
code: `// 提交响应
|
code: `// 成功响应
|
||||||
{"status": "ok", "data": {"taskid": "task_xxx", "status": "PENDING"}}
|
{"status": "SUCCEEDED", "usage": {"image_count": 1}, "image_count": 1, "image": ["https://..."]}
|
||||||
|
|
||||||
// 查询结果(/v1/tasks?taskid=task_xxx)
|
// 失败响应
|
||||||
{"status": "ok", "data": {"status": "SUCCEEDED", "usage": {"image_count": 1}, "image_count": 1, "image": ["https://..."]}}`
|
{"status": "FAILED", "error": "InvalidParameter.InvalidParameter"}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -442,10 +442,10 @@ data: [DONE]`
|
|||||||
responseExample: {
|
responseExample: {
|
||||||
lang: "json",
|
lang: "json",
|
||||||
code: `// 成功响应
|
code: `// 成功响应
|
||||||
{"status": "ok", "data": {"status": "SUCCEEDED", "usage": {"image_count": 1}, "image_count": 1, "image": ["https://..."]}}
|
{"status": "SUCCEEDED", "usage": {"image_count": 1}, "image_count": 1, "image": ["https://..."]}
|
||||||
|
|
||||||
// 失败响应
|
// 失败响应
|
||||||
{"status": "ok", "data": {"status": "FAILED", "error": "InvalidParameter.InvalidParameter"}}`
|
{"status": "FAILED", "error": "InvalidParameter.InvalidParameter"}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -435,7 +435,7 @@ data: [DONE]
|
|||||||
|
|
||||||
##### T2I - 文生图
|
##### T2I - 文生图
|
||||||
|
|
||||||
**异步模型**(需通过 `/v1/tasks?taskid=xxx` 查询状态):
|
**同步模型**(直接返回图像数据):
|
||||||
|
|
||||||
| 参数名 | 类型 | 必填 | 默认值 | 说明 | 可选值 |
|
| 参数名 | 类型 | 必填 | 默认值 | 说明 | 可选值 |
|
||||||
|--------|------|------|--------|------|--------|
|
|--------|------|------|--------|------|--------|
|
||||||
@ -452,29 +452,23 @@ data: [DONE]
|
|||||||
| `wan2.7-image-pro` | 万象专业版,创意性、稳定性、写实质感全面升级 | 0.5元/张 |
|
| `wan2.7-image-pro` | 万象专业版,创意性、稳定性、写实质感全面升级 | 0.5元/张 |
|
||||||
| `wan2.7-image-plus` | 万象Plus版,高分辨率图像生成,性价比高 | 0.2元/张 |
|
| `wan2.7-image-plus` | 万象Plus版,高分辨率图像生成,性价比高 | 0.2元/张 |
|
||||||
|
|
||||||
**响应示例(异步提交):**
|
**成功响应示例:**
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"status": "ok",
|
"status": "SUCCEEDED",
|
||||||
"data": {
|
"usage": {"image_count": 1},
|
||||||
"taskid": "task_xxx",
|
"image_count": 1,
|
||||||
"status": "PENDING"
|
"image": ["https://..."]
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**查询任务状态(`/v1/tasks?taskid=task_xxx`):**
|
**失败响应示例:**
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"status": "ok",
|
"status": "FAILED",
|
||||||
"data": {
|
"error": "InvalidParameter.InvalidParameter"
|
||||||
"status": "SUCCEEDED",
|
|
||||||
"usage": {"image_count": 1},
|
|
||||||
"image_count": 1,
|
|
||||||
"image": ["https://..."]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -508,13 +502,10 @@ data: [DONE]
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"status": "ok",
|
"status": "SUCCEEDED",
|
||||||
"data": {
|
"usage": {"image_count": 1},
|
||||||
"status": "SUCCEEDED",
|
"image_count": 1,
|
||||||
"usage": {"image_count": 1},
|
"image": ["https://..."]
|
||||||
"image_count": 1,
|
|
||||||
"image": ["https://..."]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -522,11 +513,8 @@ data: [DONE]
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"status": "ok",
|
"status": "FAILED",
|
||||||
"data": {
|
"error": "InvalidParameter.InvalidParameter"
|
||||||
"status": "FAILED",
|
|
||||||
"error": "InvalidParameter.InvalidParameter"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user