aitryon-plus delivers better performance in image definition, fabric texture, and logo restoration, but requires longer generation time. This makes it better for scenarios that prioritize high-quality results over real-time performance.
This document applies only to the China (Beijing) region. To use the model, you must use an API key from the China (Beijing) region.
Capabilities
Multiple garment try-on
| Fine-grained control
|
Overview
Model | Price | Rate limit (shared by Alibaba Cloud account and RAM users) | |
Task submission API RPS | Concurrent tasks | ||
aitryon-plus | $0.071677/image | 10 | 5 |
Examples
Input: Full-body, front-facing model image | Input: Flat-lay garment image | Output: Generated try-on image |
| Flat-lay top image
|
|
Flat-lay bottoms image
|
Input image requirements
High-quality input ensures high-quality output. Before you call the API, make sure your images meet the following specifications.
Model image requirements
Requirement | Details |
Image |
|
Subject |
|
Valid person images
|
|
|
|
Invalid person images
❌ Multiple people | ❌ Not a full-body, front-facing photo (Avoid side, sitting, lying, or half-body photos) | ❌ Obstructed person or clothing (Avoid holding objects, bags, etc.) | ❌ Poor lighting or blurry image |
|
|
|
|
Garment image requirements
Requirement | Details |
Image |
|
Garment |
|
Valid garment images
Top |
|
|
|
Bottoms |
|
|
|
Dress/Jumpsuit |
|
|
|
Invalid garment images
❌ Multiple garments | ❌ Not a front-facing photo | ❌ Folded or obstructed | ❌ Wrinkled garment |
|
|
|
|
Prerequisites
The OutfitAnyone-Plus API only supports calls over HTTP.
Get an API key and set the API key as an environment variable.
HTTP
The API provides an asynchronous operation that involves two steps:
Create a task: Create an image generation task to obtain a unique `task_id`.
Query the result: Use the `task_id` to poll the task status until the task is complete and retrieve the result.
Step 1: Create a task
Send a `POST` request to create a try-on task.
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesisBecause this model has a long invocation time, tasks are created using an asynchronous invocation.
After the task is created, the system immediately returns a
task_id. You must use this `task_id` to query the task result within 24 hours.
Request parameters
Field | Type | Location | Required | Description | Example |
Content-Type | String | Header | Yes | The request type: application/json. | application/json |
Authorization | String | Header | Yes | The API key. For example: Bearer sk-xxxx. | Bearer sk-xxxx |
X-DashScope-Async | String | Header | Yes | A static field with the value `enable`, which indicates an asynchronous call. | enable |
model | String | Body | Yes | Specifies the model to call. | aitryon-plus |
input.person_image_url | String | Body | Yes | The public URL of the model's image. You can also get a temporary public URL.
For examples of model images, see Model image requirements. Note Please click here to download the provided model images. | http://aaa/1.jpg |
input.top_garment_url | String | Body | No | The Internet URL of the top/dress garment image. You can also get a temporary Internet URL.
For examples of garment images, see Garment image requirements. Note
| http://aaa/2.jpg |
input.bottom_garment_url | String | Body | No | The Internet URL of the lower garment image. You can also get a temporary Internet URL.
For garment image examples, see Garment image requirements. Note
| http://aaa/3.jpg |
parameters.resolution | Int | Body | No | The resolution of the output image. Recommended values:
Note The API may accept other values. But these recommended values provide the best performance. | -1 |
parameters.restore_face | Bool | Body | No | Specifies whether to restore the face from the model image.
| true |
Response parameters
Field | Type | Description | Example |
output.task_id | String | The unique ID of the asynchronous task. | a8532587-fa8c-4ef8-82be-0c46b17950d1 |
output.task_status | String | The status of the task after submission. | PENDING |
request_id | String | The unique ID of this request. | 7574ee8f-38a3-4b1e-9280-11c33ab46e51 |
Request examples
Try on a top
Try on a top: Pass the `top_garment_url` for the top to try on. The model will randomly generate bottoms.
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesis/' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "aitryon-plus",
"input": {
"person_image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/ubznva/model_person.png",
"top_garment_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/epousa/short_sleeve.jpeg"
},
"parameters": {
"resolution": -1,
"restore_face": true
}
}'Keep the model's original bottoms: This involves two steps:
Call the OutfitAnyone - Image Segmentation API to obtain the image URL of the model's bottoms.
Call the try-on API in this topic, passing the `top_garment_url` for the top to try on and the `bottom_garment_url` obtained from segmentation.
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesis/' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "aitryon-plus",
"input": {
"person_image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/ubznva/model_person.png",
"top_garment_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/epousa/short_sleeve.jpeg",
"bottom_garment_url": "Image URL from the Image Segmentation API output"
},
"parameters": {
"resolution": -1,
"restore_face": true
}
}'Try on bottoms
Try on bottoms: Pass the `bottom_garment_url` for the bottoms to try on. The model will randomly generate a top.
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesis/' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "aitryon-plus",
"input": {
"person_image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/ubznva/model_person.png",
"bottom_garment_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/rchumi/pants.jpeg"
},
"parameters": {
"resolution": -1,
"restore_face": true
}
}'Keep the model's original top: This involves two steps:
Call the OutfitAnyone - Image Segmentation API to obtain the image URL of the model's top.
Call the try-on API in this topic, passing the `top_garment_url` obtained from segmentation and the `bottom_garment_url` for the bottoms to try on.
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesis/' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "aitryon-plus",
"input": {
"person_image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/ubznva/model_person.png",
"top_garment_url": "Image URL from the Image Segmentation API output",
"bottom_garment_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/rchumi/pants.jpeg"
},
"parameters": {
"resolution": -1,
"restore_face": true
}
}'Try on a top and bottoms
Pass the `top_garment_url` for the top to try on and the `bottom_garment_url` for the bottoms to try on.
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesis/' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "aitryon-plus",
"input": {
"person_image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/ubznva/model_person.png",
"top_garment_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/epousa/short_sleeve.jpeg",
"bottom_garment_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/rchumi/pants.jpeg"
},
"parameters": {
"resolution": -1,
"restore_face": true
}
}'Try on a dress or jumpsuit
For a dress or jumpsuit, pass only `top_garment_url`.
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesis/' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "aitryon-plus",
"input": {
"person_image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/ubznva/model_person.png",
"top_garment_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250626/odngby/dress.jpg"
},
"parameters": {
"resolution": -1,
"restore_face": true
}
}'Response examples
Successful response
Save the `task_id` to query the task status and result.
{
"output": {
"task_status": "PENDING",
"task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
},
"request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}Error response
The task creation failed. For more information, see Error messages to resolve the issue.
{
"code": "InvalidApiKey",
"message": "No API-key provided.",
"request_id": "7438d53d-6eb8-4596-8835-xxxxxx"
}Step 2: Query the result by task ID
Use the task_id from the previous step to send a GET request to query the task status and result. Replace {task_id} in the URL with your actual task ID.
GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}Request parameters
Field | Type | Location | Required | Description | Example |
Authorization | String | Header | Yes | The API key. For example: Bearer sk-xxx. | Bearer sk-xxx |
task_id | String | URL Path | Yes | The ID of the task to query. | a8532587-fa8c-4ef8-82be-0c46b17950d1 |
Response parameters
Field | Type | Description | Example |
output.task_id | String | The ID of the queried task. | a8532587-fa8c-4ef8-82be-0c46b17950d1 |
output.task_status | String | The task status. Possible values include the following:
| SUCCEEDED |
output.image_url | String | The URL of the generated try-on image. The image_url is valid for 24 hours. Download it promptly. | https://.../result.jpg?Expires=xxx |
output.submit_time | String | The task submission time. | 2024-07-30 15:39:39.918 |
output.scheduled_time | String | The task running time. | 2024-07-30 15:39:39.941 |
output.end_time | String | The task completion time. | 2024-07-30 15:39:55.080 |
output.code | String | The error code. This parameter is returned when the task fails. | InvalidParameter |
output.message | String | The error details. This parameter is returned when the task fails. | The request is missing required parameters or in a wrong format |
usage.image_count | Int | The number of images generated in this request. | 1 |
request_id | String | The unique ID of this request. | 7574ee8f-38a3-4b1e-9280-11c33ab46e51 |
Request example
Replace 86ecf553-d340-4e21-xxxxxxxxx with your actual task ID.
curl -X GET https://dashscope.aliyuncs.com/api/v1/tasks/86ecf553-d340-4e21-xxxxxxxxx \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"You can query the task result using the `task_id` for only 24 hours after the task is created. After this period, the task is automatically purged by the system.
Response examples
Successful response
Task data, such as the task status and image URL, is retained for only 24 hours and is then automatically purged. You must save the generated image promptly.
{
"request_id": "98d46cd0-1f90-9231-9a6c-xxxxxx",
"output": {
"task_id": "15991992-1487-40d4-ae66-xxxxxx",
"task_status": "SUCCEEDED",
"submit_time": "2025-06-30 14:37:53.838",
"scheduled_time": "2025-06-30 14:37:53.858",
"end_time": "2025-06-30 14:38:11.472",
"image_url": "http://dashscope-result-hz.oss-cn-hangzhou.aliyuncs.com/tryon.jpg?Expires=xxx"
},
"usage": {
"image_count": 1
}
}Failed response
{
"request_id": "6bf4693b-c6d0-933a-b7b7-xxxxxx",
"output": {
"task_id": "e32bd911-5a3d-4687-bf53-xxxxxx",
"task_status": "FAILED",
"code": "InvalidParameter",
"message": "The request is missing required parameters xxxxx"
}
}Error codes
For general status codes of the model service, see Error messages.
The following error codes are specific to the OutfitAnyone model:
HTTP return code | code | message | Description |
400 | InvalidParameter | The request is missing required parameters or has an incorrect format. Check the parameters in your request. | A required parameter is missing or the format is incorrect. Check that your request body conforms to the API specifications. |
400 | InvalidParameter | Download the media resource timed out during the data inspection process. | The image download timed out. Possible causes and solutions:
|
400 | InvalidURL | The request URL is invalid. Check that the URL is available and the image format is one of the following: JPEG, JPG, PNG, BMP, or WEBP. | The image URL is invalid. Check that the URL is accessible over the Internet and the image format meets the requirements. |
400 | InvalidPerson | The input image does not contain a person or contains multiple people. Upload an image that contains only one person. | The model image is not compliant. Ensure that the input image contains one and only one complete person. |
400 | InvalidGarment | A clothing image is missing. Provide an image for at least a top or a bottom. | A clothing image is missing. Provide at least one image for a top (top_garment_url) or a bottom (bottom_garment_url). |
400 | InvalidInputLength | The image resolution is invalid. Make sure that the longest side of the image is less than 4096 pixels, the shortest side is greater than 150 pixels, and the file size is between 5 KB and 5 MB. | The image dimensions or file size do not meet the requirements. For more information, see Input image requirements. |
FAQ
How to prepare model photos and garment images
Why are flat-lay images of garments required?
Flat-lay images provide the clearest view of a garment's cut, pattern, and silhouette. This helps the AI accurately understand the garment's structure and generate a more fitted and realistic try-on result.
What if I do not have a flat-lay image of the garment?
Place the garment flat on a clean background, such as a floor or wall, and take a photo from above. Alternatively, take a front-facing photo of a model or mannequin wearing the garment. Ensure the garment is fully visible, flat, and not obstructed.
How do I choose a suitable model photo?
Choose a clear, front-facing, full-body photo. The model should wear simple, form-fitting clothes, such as a T-shirt and shorts. Avoid long dresses, robes with wide sleeves, or multiple layers. Ensure the model's hands and feet are clearly visible and not blocked by accessories, such as bags or umbrellas.
What if I do not have a suitable model photo?
We provide a set of model reference photos that meet the requirements. You can click here to download and use them.
Unsatisfactory model results
Why is the quality of the generated image poor and lacking in detail?
The most likely cause is a low-quality input garment image. Ensure the garment image is high definition and complete. Details should not be lost because of folds or poor camera angles. High-quality input ensures high-quality output.
Feature usage
How do I generate a try-on image for a dress or jumpsuit?
Enter the image URL for the dress or jumpsuit into the
input.top_garment_urlfield. Leave theinput.bottom_garment_urlfield empty or do not include it in the request.
























