本接口用于发起 AI 发色虚拟试染流程。您需要提供源文件(URL 或文件 ID),并指定上色方式(预设 preset、图案 pattern 或色板 palettes)。任务会异步处理,您可以使用本响应返回的 task_id 查询其状态。
安全
BearerAuthenticationV2
Any of:
该对象表示一次 AI 发色虚拟试染任务的运行。
(可选;当 pattern 与 palettes 都未提供时必填) 默认发色预设。全头模式可选:['Jet Black', 'Chocolate Brown', 'Honey Blonde', 'Platinum Blonde', 'Ash Gray', 'Rose Gold', 'Burgundy', 'Copper Red', 'Lavender', 'Teal Blue'] 渐层模式可选:['Dark Brown/Caramel Blonde', 'Jet Black/Silver Gray', 'Ash Brown/Lavender', 'Rose Gold/Peach Blonde', 'Burgundy/Magenta Pink', 'Deep Blue/Teal Green', 'Plum Purple/Pastel Lilac', 'Copper Red/Golden Blonde', 'Dark Gray/Ice Blonde', 'Midnight Blue/Denim Blue']
Enum:"Jet Black""Chocolate Brown""Honey Blonde""Platinum Blonde""Ash Gray""Rose Gold""Burgundy""Copper Red""Lavender""Teal Blue"
- https://yce-api-01.makeupar.comhttps://yce-api-01.makeupar.com/s2s/v2.0/task/hair-color
curl -i -X POST \
https://yce-api-01.makeupar.com/s2s/v2.0/task/hair-color \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"src_file_url": "https://example.com/selfie.jpg",
"preset": "Jet Black",
"pattern": {
"name": "ombre",
"blend_strength": 0,
"line_offset": -0.99,
"coloring_section": "top"
},
"palettes": [
{
"color": "string",
"color_intensity": 0,
"shine_intensity": 0
}
]
}'响应
{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }