本文介绍鞋靴模特模型的输入输出参数。鞋靴模特模型支持输入多视角鞋靴系列图片,同时对输入模特模板图的鞋子区域进行鞋靴AI试穿,实现模特鞋靴布局重绘生成,最终生成图片的效果布局自然、细节丰富、画面细腻、试穿结果逼真。可用于模特商品图设计、新鞋AI试穿、模特穿戴布局重绘等场景。
相关指南:鞋靴模特
- 本文档仅适用于“中国大陆(北京)”地域,需使用“中国大陆(北京)”地域的API Key。 
- shoemodel-v1 模型当前仅提供免费体验,免费额度用完后不可调用且不支持付费。 
模型概览
| 模型名 | 免费额度(查看) | 计费单价 | 限流(含主账号与RAM子账号) | |
| 任务下发接口QPS限制 | 同时处理中任务数量 | |||
| shoemodel-v1 | 500张 | 目前仅供免费体验。 免费额度用完后不可调用,敬请关注后续动态。 | 2 | 1 | 
前提条件
您需要已获取API Key并配置API Key到环境变量。
HTTP调用
为了减少等待时间并且避免请求超时,服务采用异步方式提供。您需要发起两个请求:
- 创建任务:首先发送一个请求创建鞋靴模特任务,该请求会返回任务ID。 
- 根据任务ID查询结果:使用上一步获得的任务ID,查询模型生成的结果。 
步骤1:创建任务获取任务ID
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/virtualmodel/generation/
| 请求头(Headers) | 鞋靴模特试穿 | 
| Authorization string 必选 推荐您使用阿里云百炼API-Key,也可填DashScope API-Key。例如:Bearer d1xxx2a。 | |
| X-DashScope-Async string 必选 是否使用DashScope异步调用。HTTP只支持异步调用,设置为 | |
| Content-Type string 必选 请求内容类型。固定为 | |
| 请求体(Request Body) | |
| model string 必选 调用模型。鞋靴模特生成模型为 | |
| parameters Integer 必选 图片生成的数量,目前支持 1~4 张,默认值 1。 | |
| input object 必选 输入图像的基本信息,比如图像URL地址。 | |
| 响应 | 正常响应异常响应 | 
| output object 任务输出信息。 | |
| code string 任务执行失败的错误码。 | |
| message string 任务执行失败的详细信息。 | |
| request_id string 请求唯一标识。可用于请求明细溯源和问题排查。 | 
步骤2:根据任务ID查询结果
GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
| 请求头(Headers) | 获取任务结果 | 
| Authorization string 必选 推荐使用阿里云百炼API-Key,也可填DashScope API-Key。例如:Bearer d1xxx2a。 | |
| URL路径参数(Path parameters) | |
| task_id string 必选 任务id。 | 
| 响应 | 任务执行成功任务执行中任务执行失败 | 
| output object 任务输出信息。 | |
| request_id string 请求唯一标识。可用于请求明细溯源和问题排查。 | |
错误码
如果模型调用失败并返回报错信息,请参见错误信息进行解决。
此API还有特定状态码,具体如下所示。
| HTTP状态码 | 接口错误码(code) | 接口错误信息(message) | 含义说明 | 
| 400 | InvalidParameter | Required parameter(s) missing or invalid, please check the request parameters.(可根据实际情况修改) | 接口调用参数不合法 | 
| 400 | InvalidFile.Content | The input image has no human body or has unclear human body. Please upload other image. | 输入图片中人体不完整或者没有人体 | 
| 400 | InvalidParameter | The request is missing required parameters or in a wrong format, please check the parameters that you send. | 入参格式不对 | 
| 400 | InvalidURL | The request URL is invalid, please check the request URL is available and the request image format is one of the following types: JPEG, JPG, PNG, BMP, and WEBP. | 输入图片下载失败,请检查网络或者输入格式 | 
| 400 | InvalidFile.Resolution | The image resolution is invalid, please make sure that the aspect ratio is smaller than 3:2, and largest length of image is smaller than 4096. | 上传图片大小不符合要求 | 
| 500 | InternalError.Algo | An internal error occurs during computation, please try this model later. | 算法运行错误 |