Skip to content

Run a Hair Color task.

Request

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.

Security
BearerAuthenticationV2
Bodyapplication/jsonrequired
Any of:

This object represents a run AI Hair Color task.

presetstring

(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']

Enum:"Jet Black""Chocolate Brown""Honey Blonde""Platinum Blonde""Ash Gray""Rose Gold""Burgundy""Copper Red""Lavender""Teal Blue"
patternobject

(optional; required if "preset" is not provided)

palettesArray of objects, [ 1 .. 2 ] items

(optional; required if "preset" is not provided) Array length 1 for full mode, 2 for ombre mode

src_file_urlstringrequired

Url of the file to run task. The url should be publicly accessible.

Example:"https://example.com/selfie.jpg"
POST
/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
      }
    ]
  }'

Responses

Successful execution of the Hair Color task

Bodyapplication/json
statusinteger

Response status

Example:200
dataobject
Response
{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }