All Products
Search
Document Center

Alibaba Cloud Model Studio:OutfitAnyone-Plus API reference

Last Updated:Oct 21, 2025

Compared to the OutfitAnyone Basic Edition, aitryon-plus delivers superior performance in image definition, fabric texture, and logo restoration. However, it has a longer generation time, which makes it better suited for scenarios that prioritize high-quality results over real-time performance.

Important

This document applies only to the China (Beijing) region. To use the model, you must use an API key from the China (Beijing) region.

Model capabilities

Multiple garment try-on

  • Single top try-on: The model randomly generates bottoms or keeps the model's original bottoms.

  • Single bottom try-on: The model randomly generates a top or keeps the model's original top.

  • Top and bottom combination try-on: Replaces the entire outfit.

  • Dress or jumpsuit try-on

Fine-grained control

  • Face policy: You can choose to keep the model's original face or generate a new, random face.

  • Specify resolution: You can specify the output image dimensions or keep them the same as the original image.

Model overview

Model introduction

Model

Billing price

Rate limiting (shared by Alibaba Cloud account and RAM users)

Task submission API RPS limit

Number of concurrent tasks

aitryon-plus

$0.071677/image

10

5

Performance showcase

Input a full-body, front-facing photo of the model

Input a flat-lay image of the garment

Generated try-on image

test_client_tryon

Flat-lay image of the top

image

test_client_tryon

Flat-lay image of the bottom

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 category

Details

Image requirements

  • File size: Between 5 KB and 5 MB

  • Resolution: Image width and height must be between 150px and 4096px.

  • Image format: JPG, JPEG, PNG, BMP, and HEIC are supported.

  • Link requirements: The uploaded image must be a publicly accessible HTTP or HTTPS address. Local paths are not supported.

Model requirements

  • People requirements: Supports images of people of different genders, skin colors, and ages (6 years and older).

  • Pose requirements: Full-body, front-facing photo with good lighting. The person's hands must be fully visible. Avoid poses where arms are crossed or obstructive.

  • Person requirements: The image must contain only one complete person.

Examples of valid person images

image

image

image.png

image.png

Examples of 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

image.png

image

image.png

image.png

Garment image requirements

Requirement category

Details

Image requirements

  • File size: Between 5 KB and 5 MB

  • Resolution: Image width and height must be between 150px and 4096px.

  • Image format: JPG, JPEG, PNG, BMP, and HEIC are supported.

  • Link requirements: The uploaded image must be a publicly accessible HTTP or HTTPS address. Local paths are not supported.

Garment requirements

  • Garment type: Supports single tops, bottoms, and dresses. Supports suits and top-and-bottom combinations.

  • Garment category: Supports common clothing categories. Does not support underwear, wedding dresses, or special ethnic costumes.

  • Garment requirements:

    • Single garment: The image must be a flat-lay photo containing only a single piece of clothing.

    • No folds or obstructions: The clothing should be spread out, flat, and free of wrinkles or folds.

    • Simple, clean background: The image background should be simple, clean, and have a uniform color. The main garment should be clear, without complex lighting or shadows.

    • Large garment-to-image ratio: The garment should take up as much of the frame as possible. Avoid excessive white space around the garment, because it can reduce the quality of the try-on effect.

Examples of valid garment images

Top

image.jpeg

image.jpeg

image.jpeg

Bottom

image.jpeg

image.jpeg

image.webp

Dress/Jumpsuit

image.webp

image.webp

连衣裙_2

Examples of invalid garment images

Multiple garments

Not a front-facing photo

Folded or obstructed

Wrinkled garment

image.jpeg

image.png

image.png

image.png

Prerequisites

The OutfitAnyone-Plus API only supports calls over HTTP.

Before you make a call, you must configure an API key and set it as an environment variable. For instructions, see Preparations: Configure an API key and Set an API key as an environment variable.

HTTP calls

The API provides an asynchronous operation that involves two steps:

  1. Create a task: Create an image generation task to obtain a unique `task_id`.

  2. 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-synthesis
Note
  • Because 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

Passing Parameters

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 obtain a temporary public URL.

  • 5 KB ≤ Image file size ≤ 5 MB

  • 150 ≤ Image edge length ≤ 4096

  • Supported formats: jpg, png, jpeg, bmp, heic

  • The image must contain only one complete person.

  • Only HTTP/HTTPS links are supported. Local paths are not supported.

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 apparel image. You can also obtain a temporary Internet URL.

  • 5 KB ≤ Image file size ≤ 5 MB

  • 150 ≤ Image edge length ≤ 4096

  • Supported formats: jpg, png, jpeg, bmp, heic

  • Upload a flat-lay image of the garment. Make sure the garment is the only subject, is fully visible, has a clean background, and does not have excessive white space around it.

  • Only HTTP/HTTPS links are supported. Local paths are not supported.

For examples of apparel graphs, see Apparel graph requirements.

Note
  • You must provide at least one of `top_garment_url` and `bottom_garment_url`.

  • If you do not pass this field, the model randomly generates a top.

  • For a dress or jumpsuit, enter the image URL in this field and leave `bottom_garment_url` empty.

http://aaa/2.jpg

input.bottom_garment_url

String

Body

No

The Internet URL of the lower garment image. You can also obtain a temporary Internet URL.

  • 5 KB ≤ Image file size ≤ 5 MB

  • 150 ≤ Image edge length ≤ 4096

  • Supported formats: jpg, png, jpeg, bmp, heic

  • Upload a flat-lay image of the garment. Make sure the garment is the only subject, is fully visible, has a clean background, and does not have excessive white space around it.

  • Only HTTP/HTTPS links are supported. Local paths are not supported.

For apparel image examples, see Apparel Image Requirements.

Note
  • You must provide at least one of `top_garment_url` and `bottom_garment_url`.

  • If you do not pass this field, the model randomly generates bottoms.

http://aaa/3.jpg

parameters.resolution

Int

Body

No

The resolution of the output image.

  • -1: Default value. The resolution is the same as the original image.

  • 1024: 576 × 1024 resolution.

  • 1280: 720 × 1280 resolution.

-1

parameters.restore_face

Bool

Body

No

Specifies whether to restore the face from the model image.

  • true: Default value. Keeps the original face.

  • false: Generates a new, random face.

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:

    1. Call the OutfitAnyone - Image Segmentation API to obtain the image URL of the model's bottoms.

    2. 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:

    1. Call the OutfitAnyone - Image Segmentation API to obtain the image URL of the model's top.

    2. 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":"Invalid API-key provided.",
    "request_id":"fb53c4ec-1c12-4fc4-a580-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

Passing Parameters

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:

  • PENDING: The task is in the queue.

  • PRE-PROCESSING: The task is in pre-processing.

  • RUNNING: The task is running.

  • POST-PROCESSING: The task is in post-processing.

  • SUCCEEDED: The task is successful.

  • FAILED: The task failed.

  • UNKNOWN: The job does not exist or its status is unknown.

  • CANCELED: The task was successfully canceled.

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"
Note

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

Error code (code)

Error message (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:

  • Network issue: The network connection between your server and the Alibaba Cloud Model Studio service is unavailable. Check your network connection.

  • OSS internal URL: The Alibaba Cloud Model Studio service cannot access internal URLs. Use an OSS Internet URL instead.

  • Resource outside the Chinese mainland: Cross-border network access is unstable. Use a storage service in the Chinese mainland.

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

  1. 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.

  2. 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.

  3. 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.

  4. 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

  1. 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

  1. 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_url field. Leave the input.bottom_garment_url field empty or do not include it in the request.