This topic describes the input and output parameters of the Wanx-Virtual Model. This model intelligently generates images from uploaded product display photos of real people or mannequins, replacing both the model and background with desired content. It uses virtual models to showcase products more elegantly and diversely while preserving the original pose. The model supports a wide range of products that interact with models, such as small handheld items, clothing, footwear, and accessories.
Related Guide: Virtual Model Generation
This document applies only to the Chinese mainland (Beijing) region. You must use an API key from this region.
The wanx-virtualmodel and virtualmodel-v2 models are available for a free trial only. After the free quota is exhausted, you cannot call these models, and paid usage is not supported. For alternatives, see Image editing - Qwen or Image Editing - Wanxiang 2.1.
Model Overview
Wanx-Virtual Model intelligently generates images from uploaded product display photos of real people or mannequins, replacing both the model and background with desired content. It uses virtual models to showcase products more elegantly and diversely while preserving the original pose. The model supports a wide range of products that interact with models, such as small handheld items, clothing, footwear, and accessories.
|
Model Version |
Model Name |
Model Description |
|
Virtual Model (V1) |
wanx-virtualmodel |
|
|
Virtual Model V2 (V2) |
virtualmodel-v2 |
|
|
Model Name |
Billing Price |
Rate Limit (shared by Alibaba Cloud account and RAM user) |
Free Quota (View) |
|
|
Task Submission API RPS Limit |
Number of Simultaneously Processing Tasks |
|||
|
wanx-virtualmodel |
Currently for free trial only. After the free quota is used, you cannot invoke them. For alternative solutions, see Image Editing - Qianwen or Image Editing - Wanx 2.1. |
2 |
1 |
500 images |
|
virtualmodel-v2 |
||||
Prerequisites
Obtain an API key and export the API key as an environment variable.
HTTP Calls
To reduce waiting time and prevent request timeouts, the service uses asynchronous invocation. Make two requests:
Create a task: First, send a request to create a text-to-image task. This request returns a task ID.
Query results by task ID: Use the task ID obtained in the previous step to query the model generation results.
Step 1: Create a task to obtain a task ID
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/virtualmodel/generation/
Replace {WorkspaceId} with your actual workspace ID.
Note: Unless otherwise specified, the following parameters are supported in Virtual Model V1 and V2.
Request Headers | Virtual Model V1Virtual Model V2 |
Authorization string Required Use an Alibaba Cloud Model Studio API key or a DashScope API key. Example: Bearer d1xxx2a. | |
X-DashScope-Async string Required Whether to use asynchronous invocation. HTTP supports only asynchronous invocation. Set it to | |
Content-Type string Required The request content type. It is fixed as | |
Request Body | |
model string Required The model to invoke. | |
input object Required Basic information about the input image, such as its URL. | |
parameters object Optional |
Response | Successful Task ExecutionAbnormal Response |
output object The task output information. | |
code string The error code of the API. This parameter is not returned for successful API requests. | |
message string The error message of the API. This parameter is not returned for successful API requests. | |
request_id string The unique ID of the request. Use it to trace request details and troubleshoot issues. |
Step 2: Query results by task ID
GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id}
Replace {WorkspaceId} with your actual workspace ID.
Request Headers | Obtain task results |
Authorization string Required Use an Alibaba Cloud Model Studio API key or a DashScope API key. Example: Bearer d1xxx2a. | |
URL Path Parameters | |
task_id string Required The task ID. |
Response | Successful Task ExecutionTask data (task status and image URLs) is retained for only 24 hours and then automatically purged. Save generated images promptly. Failed Task Execution |
output object The task output information. | |
usage object Output statistics. | |
request_id string The unique ID of the request. Use it to trace request details and troubleshoot issues. |
Error codes
If the model call fails and returns an error message, see Error codes for resolution.
This API also returns specific status codes, as follows.
HTTP status code | API error code (code) | API error message (message) | Description |
400 | InvalidFile.Content | The input image has no human body or has unclear human body. Please upload other image | The input image contains no human body. |
400 | InvalidParameter | The request is missing required parameters or in a wrong format, please check the parameters that you send. | The input parameter format is incorrect. |
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. | The input image failed to download. Check your network or input format. |
400 | InvalidFile.Resolution | The image resolution is invalid, please make sure that the aspect ratio is smaller than 2.0, and largest length of image is smaller than 4096 | The uploaded image size does not meet the requirements. |
500 | InternalError.Algo | An internal error occurs during computation, please try this model later. | Algorithm running error. |







