All Products
Search
Document Center

Alibaba Cloud Model Studio:OutfitAnyone-Image Parsing API reference

Last Updated:Oct 21, 2025

OutfitAnyone-Image Parsing is an auxiliary model. It segments clothing areas, such as tops, bottoms, dresses, or jumpsuits, from model images or images generated by OutfitAnyone. This model is optional. You can use it with the OutfitAnyone model to achieve specific effects, such as partial try-on and obtaining the coordinates of specific clothing.

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 overview

Model

Price

Rate limits (shared by Alibaba Cloud accounts and RAM users)

RPS limit for task submission API

Number of concurrent tasks

aitryon-parsing-v1

$0.000574/image

10

Unlimited (sync API)

Illustration of core outputs

Calling this API returns three core output parameters. The following example of parsing a top shows the meaning and use of each parameter.

Input

Output

Output parameter

Visualization example

Meaning and use

1

  • Input model image

  • Set the clothing type to top

"clothes_type": ["upper"]

crop_img_url

3

  • Cropped clothing image (RGB): This example shows the clothing image of a model wearing a top.

  • Used as an input parameter for the OutfitAnyone model in partial try-on scenarios.

  • The URL is valid for 24 hours. Download and save the image promptly.

parsing_img_url

4

  • Parsed clothing image (RGBA): This example shows the parsed top image.

  • Used to preview the effect and visually verify the accuracy of the parsing result.

  • The URL is valid for 24 hours. Download and save the image promptly.

bbox

bbox value: [[331, 239,641,637]]

image

This image shows the mapping between the bbox value and the coordinates of the original image. It is not a model output.
  • Bounding box: The coordinates of the rectangular area of the parsed clothing image (parsing_img_url) in the input model image.

    • The format of the bbox array is [x1, y1, x2, y2]. This represents the coordinates of the upper-left and lower-right corners of the bounding box.

    • The origin (0,0) is the upper-left corner of the input model image.

  • Used to implement frontend interactive features, such as product hotspots.

Scenarios

Scenario 1: Partial try-on

Objective: Replace part of the model's clothing (top or bottom) while keeping the other part unchanged. This scenario requires parsing the model image first.

Example: Keep the model's top and replace the bottom
  1. Parse the model image to extract the top

    • Call the image parsing API described in this topic, input the original model image, and set the clothes_type parameter to ["upper"] to extract the model's top.

    • The API returns a clothing image (crop_img_url) that contains the top.

    Input: Model image

    Output: Parsed clothing image (crop_img_url)

    1

    3

  1. Generate the try-on image

    • Call OutfitAnyone - Plus Edition.

    • Input the model image, the top image (obtained from parsing), and the bottom image to generate the final try-on image.

    Input

    Output: Try-on image

    Model image

    Top image

    Bottom image

    1

    The model image is the same as the input for the image parsing API.

    3

    The crop_img_url response parameter of the image parsing API.

    2

    The clothing image to replace.

    5

Scenario 2: Get the coordinates of specific clothing

Objective: Obtain the bounding box (bbox) coordinates of specific clothing on a model image or an AI try-on image. You can use these coordinates to add product labels or create interactive hotspots.

Example: Get the coordinates of a top
  1. Prepare the input image: The input image can be a model image or an image generated by OutfitAnyone. For more information about the requirements for the input image, see Model image requirements.

  2. Parse the image to obtain the coordinates: Set the parsing type for the input image. For example, set it to ["upper"] to parse and locate the top, and obtain the bbox of the required area.

    Input: Model image or try-on image

    Output: Parsed clothing image and coordinate range

    1

    Request parameter "clothes_type": ["upper"]

    4

    • parsing_img_url: The URL of the visualized parsing result.

    • bbox: The bounding box coordinates of the parsed area. For example, [[331, 239, 641, 637]].

Prerequisites

The OutfitAnyone - Image Parsing API supports calls only over HTTP.

Before you call the API, prepare an API key, and then set the API key as an environment variable.

HTTP call

Request endpoint

POST https://dashscope.aliyuncs.com/api/v1/services/vision/image-process/process

Request parameters

Field

Type

Passing parameters

Required

Description

Example

Content-Type

String

Header

Yes

Request type: application/json.

application/json

Authorization

String

Header

Yes

The API key. The format is Bearer sk-xxxx.

Bearer sk-xxxx

model

String

Body

Yes

The model to call. Set the value to aitryon-parsing-v1.

aitryon-parsing-v1

input.image_url

String

Body

Yes

The public URL of the model image to parse. You can also get a temporary public URL here.

  • The image file size must be from 5 KB to 5 MB.

  • The length of each side of the image must be from 150 to 4,096 pixels.

  • Supported formats: JPG, PNG, JPEG, BMP, and HEIC.

  • The image must contain one and only one complete person.

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

For model image examples, see Model image requirements.

http://a/a.jpg

parameters.clothes_type

List[String]

Body

Yes

You can specify the split type.

The length and order of the list determine the length and order of the URL list in the output.

Valid values:

  • ["upper"]: Parses the top.

  • ["lower"]: Parses the bottom.

  • ["dress"]: Parses a dress, a jumpsuit, or a full outfit.

  • ["upper", "lower"]: Parses the top and the bottom.

["lower"]

Response parameters

Field

Type

Description

Example

output.parsing_img_url

List[String]

A list of URLs for the visualized images of the parsed areas.

The length and order are the same as those of the clothes_type request parameter. If the corresponding clothing is not detected, the value at this position is None/null.

The image has RGBA channels and is saved in the PNG format.

["http://a/a.png"]

[null] or [None]

output.crop_img_url

List[String]

A list of URLs for the cropped clothing images.

The length and order are the same as those of the clothes_type request parameter. If the corresponding clothing is not found, the value at this position is None/null.

The image is in RGB format.

["http://a/a.png"]

[null] or [None]

output.bbox

List[Integer]

A list of coordinates for the parsed areas in the original image.

The coordinates are sorted based on the order of the areas specified in the clothes_type request parameter.

Each bbox is defined as [x1, y1, x2, y2]. The origin is the upper-left corner of the original input image. The values represent the coordinates of the upper-left and lower-right corners.

[[10,20,30,40], [50,60,70,80]]

usage.image_count

Integer

The number of images processed in the request.

1

request_id

String

The unique ID of the request.

7574ee8f-38a3-4b1e-9280-11c33ab46e51

Sample request

Parse the top from a model image

curl --location 'https://dashscope.aliyuncs.com/api/v1/services/vision/image-process/process' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--data '{
  "model": "aitryon-parsing-v1",
  "input": {
      "image_url":"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250630/bakbqz/aitryon_parse_model.png"
  },
  "parameters": {
      "clothes_type": ["upper"]
  }
}'

Sample response

Successful response (corresponding clothing type exists)

The URLs in parsing_img_url and crop_img_url are valid for 24 hours. Download the images promptly.

{
    "output": {
        "bbox": [[331, 239,641,637]],
        "parsing_img_url": ["http://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/example_parsing_img.png?Expires=xxxx"],
        "crop_img_url": ["http://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/example_crop_img.jpg?Expires=xxxx"]
    },
    "usage": {
        "image_count": 1
    },
    "request_id": "b68147d6-e7d0-920f-b889-xxxxxx"
}

Successful response (corresponding clothing type does not exist)

{
    "output":{
        "bbox":[null],
        "parsing_img_url":[null],
        "crop_img_url":[null]
    },
    "usage":{
        "image_count":1
    },
    "request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}

Failed response

{
    "request_id": "1d075a37-3768-9bc9-b781-xxxx",
    "code": "InvalidParameter.ClothesType",
    "message": "The request parameter is invalid, please check the request parameter."
}

Error codes

For common status codes for the large model service platform, see Error messages.

This model also has the following specific error codes:

HTTP status code

Error code (code)

Error message (message)

Description

400

InvalidParameter

The request is missing required parameters or in a wrong format, please check the parameters that you send.

The request parameter format is invalid.

400

InvalidParameter.ClothesType

The request parameter is invalid, please check the request parameter.

The clothes_type parameter is invalid.

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.

Failed to download the input image. Check the network connection or input format.

400

InvalidInputLength

The image resolution is invalid, please make sure that the largest length of image is smaller than 4096, and the smallest length of image is larger than 150. and the size of image ranges from 5KB to 5MB.

The size of the uploaded image does not meet the requirements.