虚拟试穿

POST /kling/v1/images/kolors-virtual-try-on

MethodPOST
Path/kling/v1/images/kolors-virtual-try-on
Typehttp
Status1
Module2102810
Folder46920504

说明

概览

MethodPOST
Path/kling/v1/images/kolors-virtual-try-on
Typehttp
Status1
Module2102810
Folder46920504

参数

{
  "query": [],
  "path": [],
  "cookie": [],
  "header": [
    {
      "id": "NQs7bxnpZf",
      "name": "Content-Type",
      "required": true,
      "description": "",
      "type": "string",
      "enable": true,
      "sampleValue": "application/json"
    },
    {
      "id": "qb8tEQbCty",
      "name": "Accept",
      "required": true,
      "description": "",
      "type": "string",
      "enable": true,
      "sampleValue": "application/json"
    },
    {
      "required": true,
      "description": "",
      "type": "string",
      "id": "gBxcCbXhsa",
      "enable": true,
      "name": "Authorization",
      "sampleValue": "Bearer {{YOUR_API_KEY}}"
    }
  ]
}

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "model_name": {
        "type": "string",
        "title": "模型名称"
      },
      "human_image": {
        "type": "string",
        "title": "人图像地址",
        "description": "支持传入图片Base64编码或图片URL(确保可访问)\n图片格式支持.jpg / .jpeg / .png\n图片文件大小不能超过10MB,图片宽高尺寸不小于300px"
      },
      "cloth_image": {
        "type": "string",
        "title": "衣服图片地址",
        "description": "支持上传服饰商品图或服饰白底图,支持上装upper、下装lower、与连体装dress\n支持传入图片Base64编码或图片URL(确保可访问)\n图片格式支持.jpg / .jpeg / .png\n图片文件大小不能超过10MB,图片宽高尺寸不小于300px"
      }
    },
    "required": [
      "model_name",
      "human_image",
      "cloth_image"
    ],
    "x-apifox-orders": [
      "model_name",
      "human_image",
      "cloth_image"
    ],
    "description": "kolors-virtual-try-on-v1 、kolors-virtual-try-on-v1-5"
  },
  "required": false,
  "mediaType": "",
  "examples": [
    {
      "value": "{\n  \"model_name\": \"kolors-virtual-try-on-v1\",\n  \"human_image\":\"https://p7.itc.cn/images01/20231015/b2d93ec7ae7146bebcadf3c07bfbee96.jpeg\",\n  \"cloth_image\":\"https://p1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-api-document/try-on.jpeg\"\n}",
      "mediaType": "application/json",
      "description": ""
    }
  ],
  "oasExtensions": ""
}

响应

[
  {
    "id": 808523352,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer"
        },
        "message": {
          "type": "string"
        },
        "request_id": {
          "type": "string"
        },
        "data": {
          "type": "object",
          "properties": {
            "task_id": {
              "type": "string"
            },
            "task_status": {
              "type": "string"
            },
            "task_info": {
              "type": "object",
              "properties": {}
            },
            "created_at": {
              "type": "integer"
            },
            "updated_at": {
              "type": "integer"
            }
          },
          "required": [
            "task_id",
            "task_status",
            "task_info",
            "created_at",
            "updated_at"
          ]
        }
      },
      "required": [
        "code",
        "message",
        "request_id",
        "data"
      ]
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": [],
    "oasExtensions": ""
  }
]

响应示例

[
  {
    "name": "成功示例",
    "responseId": 808523352,
    "data": "{\r\n    \"code\": 0,\r\n    \"message\": \"SUCCEED\",\r\n    \"request_id\": \"35150828-7d51-4e1f-8e8a-12fcca65c235\",\r\n    \"data\": {\r\n        \"task_id\": \"815335657866002502\",\r\n        \"task_status\": \"submitted\",\r\n        \"created_at\": 1762419687825,\r\n        \"updated_at\": 1762419687825\r\n    }\r\n}",
    "description": "",
    "oasKey": "",
    "oasExtensions": "",
    "id": 724021072
  }
]