跳转到内容

执行 AI 项链虚拟试戴 任务。

请求

本接口用于发起 AI 项链虚拟试戴流程。您需要提供源文件与参考图(URL 或文件 ID),以及用于对齐、阴影与佩戴位置的具体参数。任务会异步处理,您可以使用本响应返回的 task_id 查询其状态。

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

包含源图片的信息。

object_infosArray of objects必需
src_file_urlstring必需

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

示例:"https://example.com/selfie.jpg"
srcmsk_file_urlstring

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

示例:"https://example.com/src_mask.jpg"
ref_file_urlsArray of strings必需

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

示例:
[ "https://example.com/vto_sku.jpg" ]
curl -i -X POST \
  https://yce-api-01.makeupar.com/s2s/v2.0/task/2d-vto/necklace \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "src_file_url": "https://example.com/selfie.jpg",
    "srcmsk_file_url": "https://example.com/src_mask.jpg",
    "ref_file_urls": [
      "https://example.com/vto_sku.jpg"
    ],
    "source_info": {
      "name": "https://example.com/selfie.jpg",
      "mask_name": "https://example.com/src_mask.jpg"
    },
    "object_infos": [
      {
        "name": "https://example.com/vto_sku.jpg",
        "parameter": {
          "necklace_need_remove_background": true,
          "necklace_anchor_point": null,
          "necklace_wearing_location": null,
          "necklace_shadow_intensity": 0.5,
          "necklace_ambient_light_intensity": 0.5
        }
      }
    ]
  }'

响应

任务执行成功

正文application/json
statusinteger

响应状态

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