Virtual Try-On Query API Reference

Virtual Try-On Query API

POST /ai/virtual/tryon-results

Retrieve the results of virtual try-on sessions.

Request Parameters

ParameterTypeRequiredDescription

task_id

String

Yes

The task Id obtained in /ai/virtual/tryon

Sample Request

IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
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);

Response Parameters

ParameterTypeDescription

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

{
  "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"
}

Last updated