This endpoint initiates the hair color change process. You must provide a source file (via URL or File ID) and specify the color settings (preset, pattern, or palettes). The task will be processed asynchronously, and you can check its status using the task_id returned in this response.
This object represents a run AI Hair Color task.
(optional; required if neither "pattern" nor "palettes" is provided) Default hair color preset. Available for full mode: ['Jet Black', 'Chocolate Brown', 'Honey Blonde', 'Platinum Blonde', 'Ash Gray', 'Rose Gold', 'Burgundy', 'Copper Red', 'Lavender', 'Teal Blue'] Available for ombre mode: ['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']
(optional; required if "preset" is not provided) Array length 1 for full mode, 2 for ombre mode
- Run task with src file url
- Run task with src file ID
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" } }