跳转到内容

执行 AI 时装虚拟试穿 任务。

请求

本接口用于发起 AI 时装虚拟试穿流程。您可以使用模板 ID,或提供参考图(源文件与参考文件)。任务会异步处理,您可以使用本响应返回的 task_id 查询其状态。

安全
BearerAuthenticationV2
正文application/json必需
Any of:
change_shoesboolean

当可用的全身参考图带有鞋子时,用于控制是否替换鞋子。

默认值:true
src_file_urlstring必需

用于运行任务的文件 URL,该 URL 需可公开访问。

示例:"https://example.com/selfie.jpg"
ref_file_urlstring必需

用于运行任务的参考文件 URL,该 URL 需可公开访问。

示例:"https://example.com/accessory.jpg"
garment_categorystring必需

参考图中服装的类别。提供参考图时必填。 传 "auto" 可让 AI 引擎自动识别并归类服装类别。

Enum:"full_body""lower_body""upper_body""shoes""auto"
curl -i -X POST \
  https://yce-api-01.makeupar.com/s2s/v2.0/task/cloth \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "src_file_url": "https://example.com/selfie.jpg",
    "ref_file_url": "https://example.com/accessory.jpg",
    "garment_category": "full_body",
    "change_shoes": true
  }'

响应

AI 时装虚拟试穿 任务执行成功

正文application/json
statusinteger

响应状态

示例:200
dataobject
响应
{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }