Aidge Resource
Try for freeWorkplace
  • LATEST ADVANCEMENTS
    • Introducing Marco-MT: Bringing Translation to the Next Level with LLM
  • GETTING STARTED
    • Quick Start
    • Account and Authentication
    • Your First API Request
    • Test Your API Requests
    • Service Level Agreement
    • FAQ
  • API REFERENCE
    • E-commerce Information Translation
      • Marco Translator
        • Marco Translator API Reference
      • Image Translation
        • Image Translation Pro Version API Synchronous Interface
        • Image Translation Pro Version API Reference
        • Image Translation Pro Version Result API Call Description
        • Image Translation Standard Version API Reference
    • E-commerce Image Editing
      • Image Background Removal
        • Image Background Removal API Reference
      • Image Upscaling
        • Image Upscaling API Reference
      • Image Cropping
        • Image Cropping API Reference
      • Image Elements Removal
        • Image Elements Removal API Reference
      • Image Elements Detection
        • Image Elements Detection API Reference
    • E-commerce Virtual Model
      • Virtual Model Alternation
        • Virtual Model Alternation Submit API Reference
        • Virtual Model Alternation Result Query API Reference
      • Virtual TryOn
        • Virtual Try-on Submit API Reference
        • Virtual Try-On Query API Reference
        • General Model Library Reference
      • Hands&Feet Repair
        • Hands&Feet Repair Submit API Reference
        • Hands&Feet Repair Query API Reference
    • Editor Documentation
      • AI Model Editor
      • AI Image Editor
        • Image Workbench
        • Background Removal
        • Elements Removal
        • Image Translation
  • Check API Quota API Reference
Powered by GitBook
On this page
  • Virtual Try-On Query API
  • Request Parameters
  • Sample Request
  • Response Parameters (For /ai/virtual/tryon)
  • Sample Response (For /ai/virtual/tryon)
  • Response Parameters (For /ai/virtual/tryon-pro)
  • Sample Response (For /ai/virtual/tryon-pro)

Was this helpful?

  1. API REFERENCE
  2. E-commerce Virtual Model
  3. Virtual TryOn

Virtual Try-On Query API Reference

Virtual Try-On Query API

Standard Ver: POST /ai/virtual/tryon-results

Retrieve the results of virtual try-on standard&pro sessions.

Request Parameters

Parameter
Type
Required
Description

task_id

String

Yes

The task Id obtained in /ai/virtual/tryon

Sample Request

IopClient client = new IopClientImp(url, appkey, appSecret);
IopRequest request = new IopRequest();
// Adding this trial tag in header means using the trial resource to test, 
// request.addHeaderParameter("x-iop-trial","true")
request.setApiName("/ai/virtual/tryon-results");
request.addApiParameter("task_id", "1ce4fd33-b9d5-4e21-a24c-0c4027d2b105");
IopResponse response = client.execute(request);
System.out.println(response.getBody());
Thread.sleep(10);

We provide http based sample codes in the git code repository.

https://github.com/Aidge-AI

Response Parameters (For /ai/virtual/tryon)

Parameter
Type
Description

rescode

Number

The returned result code, where 200 indicates success. For detailed error codes, please refer to the error code list

data

Object

task result of the virtual try on

taskResult

Object[]

List of all sub task result

taskResult

Object

detail sub task result

result

Object

task result content

imageList

Object[]

A list of generated model try-on photos. Currently, 8 images are generated for each garment.

imageUrl

String

URL of the try-on results.

clothes

String

URL of the clothes used for the virtual try-on.

taskStatus

String

the status of the sub-task, including finished, submitted, failed, running

taskStatus

String

the status of the task, including finished, submitted, failed, running

taskId

String

the taskId of the query task

requestId

String

A unique request ID used for troubleshooting

success

Boolean

The status of the returned request, indicating whether the request was successful

resMessage

String

result message, usually success, otherwise will contain some failure reason description

Sample Response (For /ai/virtual/tryon)

{
  "code": "0",
  "data": {
    "taskResult": [
      {
        "taskResult": {
          "result": {
            "imageList": [
              {
                "imageUrl": "http://nhci-aigc.oss-cn-zhangjiakou.aliyuncs.com/pengxin.zpx%2Ftry_on%2F67794fed424e45769e1183838e9b1302_20240403194141.png?OSSAccessKeyId\u003dLTAI5tCv9DpB7gYic1oGsAyv\u0026Expires\u003d2712144501\u0026Signature\u003dz4OEeqwmBgWo5Tt5xGWFeixz0kk%3",
                "clothes": "https://ai-business-algo-pai.oss-ap-southeast-1.aliyuncs.com/pengxin.zpx/8683046691566_200.jpg?OSSAccessKeyId\u003dLTAI5tAGoBnm5eYsnZ5E1zMr\u0026Expires\u003d360001710758584\u0026Signature\u003dEfIJzSJXuS1OJTe4KLz2S7eXhBs%3"
              }
            ]
          }
        },
        "taskStatus": "finished"
      }
    ],
    "taskStatus": "finished",
    "taskId": "b5947f18-f642-4980-9379-749c053335be"
  },
  "requestId": "212cd83017085872506144758e3fca",
  "success": "true",
  "resCode": "200",
  "resMessage": "success",
  "request_id": "0ba2887315178178017221014"
}

Response Parameters (For /ai/virtual/tryon-pro)

Parameter
Type
Description

rescode

Number

The returned result code, where 200 indicates success. For detailed error codes, please refer to the error code list

data

Object

task result of the virtual try on

taskResult

Object[]

List of all sub task result

taskResult

Object

detail sub task result

result

Object

task result content

data

Object[]

A list of generated model try-on photos. Currently, 8 images are generated for each garment.

structData

String

URL of the try-on results.

imageList

Object[]

URL of the clothes used for the virtual try-on.

imageUrl

String

URL of the try-on results.

clothes

String[]

URL of the clothes used for the virtual try-on.

taskStatus

String

the status of the sub-task, including finished, submitted, failed, running

taskStatus

String

the status of the task, including finished, submitted, failed, running

taskId

String

the taskId of the query task

requestId

String

A unique request ID used for troubleshooting

success

Boolean

The status of the returned request, indicating whether the request was successful

resMessage

String

result message, usually success, otherwise will contain some failure reason description

Sample Response (For /ai/virtual/tryon-pro)

{
    "data": {
        "taskResult": [
            {
                "taskResult": {
                    "result": {
                        "data": {
                            "message": [],
                            "usageMap": "{\"usage\":2}",
                            "structData": {
                                "code": 200,
                                "imageList": [
                                    {
                                        "imageUrl": "https://aib-image.oss-ap-southeast-1.aliyuncs.com/aitryon-refiner%2Fd0e3ba28-0332-11f0-8597-00163e1a190c%2Fd0e3ba28-0332-11f0-8597-00163e1a190c_20250324164631552.png?OSSAccessKeyId=LTAI5tSEGjGp5wixZgHLc3bV&Expires=4959477991&Signature=9Ohq5ZQ97VZGpOGQ8uiHyTW%2BLl4%3D",
                                        "clothes": [
                                            "https://aib-image.oss-ap-southeast-1.aliyuncs.com/ai_computing%2Ftmp%2F6c68b36e-088c-11f0-9d35-00163e06710b.png?OSSAccessKeyId=LTAI5t75Zk154w1Ne1UmpHKJ&Expires=4959477965&Signature=l%2B0BURUFqz0HwjKiTNaatpi44r4%3D"
                                        ]
                                    },
                                    {
                                        "imageUrl": "https://aib-image.oss-ap-southeast-1.aliyuncs.com/aitryon-refiner%2Fd0e3ba28-0332-11f0-8597-00163e1a190c%2Fd0e3ba28-0332-11f0-8597-00163e1a190c_20250324164643005.png?OSSAccessKeyId=LTAI5tSEGjGp5wixZgHLc3bV&Expires=4959478003&Signature=1q4fZI5Y4AwP3MP%2Br4EmCYo6Daw%3D",
                                        "clothes": [
                                            "https://aib-image.oss-ap-southeast-1.aliyuncs.com/ai_computing%2Ftmp%2F6c68b36e-088c-11f0-9d35-00163e06710b.png?OSSAccessKeyId=LTAI5t75Zk154w1Ne1UmpHKJ&Expires=4959477965&Signature=l%2B0BURUFqz0HwjKiTNaatpi44r4%3D"
                                        ]
                                    }
                                ],
                                "usageMap": "{\"usage\": 2}"
                            }
                        },
                        "success": true,
                        "requestId": "2101196917428060035318331d1448"
                    },
                    "usage": 1,
                    "usageMap": "{\"usage\":2}"
                },
                "taskStatus": "finished"
            }
        ],
        "taskStatus": "finished",
        "taskId": "b5109fa4-6a5c-4cb2-98fe-bc8fc06f9d09"
    },
    "requestId": "210158e717428061708871336ea704",
    "success": true,
    "resCode": 200,
    "resMessage": "success",
    "code": "0",
    "request_id": "21010f3b17428061708857302",
    "_trace_id_": "210158e717428061708871336ea704"
}
```json
PreviousVirtual Try-on Submit API ReferenceNextGeneral Model Library Reference

Last updated 3 months ago

Was this helpful?