curl
请先获取 API Key 并设置为环境变量。
前提条件
- 已开通鞋靴模特免费试用,详见免费额度。
- 鞋靴模特为免费试用服务,限额500张图片。
使用限制
- QPS限制:2
- 同时运行的任务数限制:1
异步鞋靴模特图像生成
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/virtualmodel/generation' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "shoemodel-v1",
"input": {
"template_image_url": "https://help-static-aliyun-doc.aliyuncs.com/assets/img/zh-CN/8268778171/p809310.webp",
"shoe_image_url": ["https://help-static-aliyun-doc.aliyuncs.com/assets/img/zh-CN/8268778171/p809301.webp"]
},
"parameters": {
"n": 1
}
}'{
"output": {
"task_id": "d76ec1e8-ea27-4038-8913-xxxxxxxxxxxx",
"task_status": "PENDING"
},
"request_id": "7574ee8f-38a3-4b1e-9280-11c33ab46e51"
}千问云 API Key。详见获取 API Key。
启用异步模式,必须设置为 enable。
调用的模型名称,固定为 shoemodel-v1。
输入图片。
显示子属性
模特模板图的 URL 地址,须为可公开访问的 HTTP/HTTPS 地址。
图片要求:
多角度鞋靴商品图的 URL 列表,最多 3 张,须为可公开访问的 HTTP/HTTPS 地址。
图片要求:
[
"https://help-static-aliyun-doc.aliyuncs.com/assets/img/zh-CN/8268778171/p809301.webp"
]curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/virtualmodel/generation' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "shoemodel-v1",
"input": {
"template_image_url": "https://help-static-aliyun-doc.aliyuncs.com/assets/img/zh-CN/8268778171/p809310.webp",
"shoe_image_url": ["https://help-static-aliyun-doc.aliyuncs.com/assets/img/zh-CN/8268778171/p809301.webp"]
},
"parameters": {
"n": 1
}
}'{
"output": {
"task_id": "d76ec1e8-ea27-4038-8913-xxxxxxxxxxxx",
"task_status": "PENDING"
},
"request_id": "7574ee8f-38a3-4b1e-9280-11c33ab46e51"
}