This topic describes the input and output parameters of the footwear model. The footwear model takes a series of multi-angle images of footwear as input, applies an AI try-on to the shoe area of a model template image, and reconstructs the footwear layout on the model to generate a final image with a natural layout, rich details, high fidelity, and realistic try-on results. This model is suitable for scenarios such as creating product images with models, generating AI try-ons for new footwear, and adjusting the footwear layout on a model.
Related guide: Footwear model
-
This document applies only to the Chinese mainland (Beijing) region. Use an API key from this region.
-
The shoemodel-v1 model is currently available for a free trial only. After the free quota is used, you can no longer call the model, and payment is not supported.
Model overview
|
Model name |
Free quota(View) |
Billing unit price |
Rate limiting (for Alibaba Cloud accounts and RAM users) |
|
|
QPS limit for task submission API |
Number of concurrent tasks |
|||
|
shoemodel-v1 |
500 images |
For free trial only. You cannot make calls after the free quota is used up. Please stay tuned for future updates. |
2 |
1 |
Prerequisites
Obtain an API key and export the API key as an environment variable.
HTTP invocation
To reduce wait times and prevent request timeouts, this service is provided asynchronously. You must make two requests:
-
Create a task: Send a request to create a footwear model task. The response returns a task ID.
-
Query the result by task ID: Use the task ID from the previous step to retrieve the model's generation result.
Step 1: Create a task and get the task ID
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/virtualmodel/generation
Replace {WorkspaceId} with your actual workspace ID.
Headers |
Footwear model try-on
|
|
Authorization string Required Use an Alibaba Cloud Model Studio API key. You can also use a DashScope API key. Example: Bearer d1xxx2a. |
|
|
X-DashScope-Async string Required Specifies whether to use DashScope asynchronous invocation. Because HTTP supports only asynchronous invocation, you must set this parameter to |
|
|
Content-Type string Required The content type of the request. This must be |
|
Request body |
|
|
model string Required The model to call. Set this parameter to |
|
|
parameters Integer Required The number of images to generate. The value must be an integer from 1 to 4. The default value is 1. |
|
|
input object Required Basic information about the input images, such as their URLs. |
|
Response |
Normal response
Abnormal response
|
|
output object Information about the task output. |
|
|
code string The error code for the failed task. |
|
|
message string Detailed information about the failed task. |
|
|
request_id string The unique request ID. Use this ID for traceability and troubleshooting. |
Step 2: Query the result by task ID
GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id}
Replace {WorkspaceId} with your actual workspace ID.
Headers |
Get task result
|
|
Authorization string Required Use an Alibaba Cloud Model Studio API key. You can also use a DashScope API key. Example: Bearer d1xxx2a. |
|
URL path parameters |
|
|
task_id string Required The task ID. |
Response |
Task successful
Task running
Task failed
|
|
output object Task output information. |
|
|
request_id string The unique request ID. Use this ID for traceability and troubleshooting. |
|
Error codes
If the model call fails and returns an error message, see Error codes for resolution.
The following table describes the specific status codes for this API.
|
HTTP status code |
API error code (code) |
API error message (message) |
Description |
|
400 |
InvalidParameter |
Required parameter(s) missing or invalid, please check the request parameters. |
The API call parameters are invalid. |
|
400 |
InvalidFile.Content |
The input image does not contain a human body or the human body is unclear. Upload a different image. |
The input image contains an incomplete human body or no human body. |
|
400 |
InvalidParameter |
The request is missing required parameters or is in the wrong format. Check the parameters that you sent. |
The format of the request parameters is incorrect. |
|
400 |
InvalidParameter.DataInspection |
Unable to download the media resource during the data inspection process. |
Failed to download the media resource during data inspection. Check if the input URL is accessible and the image format is correct. |
|
400 |
InvalidFile.Resolution |
The image resolution is invalid. Make sure that the aspect ratio is less than 3:2 and the longest side of the image is less than 4096 pixels. |
The uploaded image size does not meet the requirements. |
|
500 |
InternalError.Algo |
An internal error occurred during computation. Try this model again later. |
An algorithm execution error occurred. |