docs: fix image/generations general response example to match actual UAPI response
This commit is contained in:
parent
4ac95125d7
commit
067b1003e3
@ -396,15 +396,32 @@ data: [DONE]`
|
||||
},
|
||||
responseExamples: [
|
||||
{
|
||||
title: "响应示例",
|
||||
title: "成功响应(同步)",
|
||||
lang: "json",
|
||||
code: `{
|
||||
"id": "luid_xxx",
|
||||
"object": "image.generation",
|
||||
"model": "qwen-image-2.0-pro",
|
||||
"status": "submitted",
|
||||
"taskid": "task_xxx",
|
||||
"created": 1716912000
|
||||
"status": "SUCCEEDED",
|
||||
"usage": {"image_count": 1},
|
||||
"image_count": 1,
|
||||
"image": ["https://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/1d/...png"]
|
||||
}`
|
||||
},
|
||||
{
|
||||
title: "失败响应",
|
||||
lang: "json",
|
||||
code: `{
|
||||
"status": "FAILED",
|
||||
"error": "InvalidParameter.InvalidParameter"
|
||||
}`
|
||||
},
|
||||
{
|
||||
title: "异步模型提交",
|
||||
lang: "json",
|
||||
code: `{
|
||||
"status": "ok",
|
||||
"data": {
|
||||
"taskid": "task_xxx",
|
||||
"status": "PENDING"
|
||||
}
|
||||
}`
|
||||
}
|
||||
],
|
||||
|
||||
@ -412,16 +412,37 @@ data: [DONE]
|
||||
|
||||
### 响应格式
|
||||
|
||||
响应格式取决于上游模型配置(同步返回图像数据,异步返回任务信息):
|
||||
同步模型直接返回图像数据,异步模型返回任务信息。
|
||||
|
||||
**成功响应(以 wan2.7-image-pro 为例):**
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "luid_xxx",
|
||||
"object": "image.generation",
|
||||
"model": "qwen-image-2.0-pro",
|
||||
"status": "submitted",
|
||||
"taskid": "task_xxx",
|
||||
"created": 1716912000
|
||||
"status": "SUCCEEDED",
|
||||
"usage": {"image_count": 1},
|
||||
"image_count": 1,
|
||||
"image": ["https://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/1d/...png"]
|
||||
}
|
||||
```
|
||||
|
||||
**失败响应:**
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "FAILED",
|
||||
"error": "InvalidParameter.InvalidParameter"
|
||||
}
|
||||
```
|
||||
|
||||
**异步模型提交响应:**
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "ok",
|
||||
"data": {
|
||||
"taskid": "task_xxx",
|
||||
"status": "PENDING"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user