Skip to content

Run an AI Face Reshape task.

Request

AI tasks are asynchronous. Prefer webhook-based completion handling when the feature supports webhooks. Configure your webhook endpoint, verify webhook signatures, and use the received task_id to query the task result after a success or error notification. See the webhook integration guide for setup and verification details.

If webhooks are not supported or cannot be used in your integration, implement polling. After submitting an AI task, poll the status endpoint at regular intervals (e.g., every 10 seconds) until the task status is success or error.

Security
BearerAuthenticationV2
Bodyapplication/jsonrequired
Any of:
versionstringrequired

Version of the features specification. Defaults to "1.0" unless otherwise specified.

Default:"1.0"
Example:"1.0"
indexinteger

Zero-based index of the target object to apply the effect to. For multi-objects images, run the pre-process task first, inspect the object coordinates in data.results.result, and pass the index of the selected object here.

The pre-processing step analyzes the input image to identify all detectable objects before any effect is applied. It runs a detection task that returns structured data for each object, including a list of bounding box coordinates. The position of each entry in this list serves as its zero-based index, which is then used to specify the target object for the effect.

This information is returned in a structured format, commonly under data.results.result. By running this step first, you can:

  • Understand how many objects are present in the image
  • Inspect their positions and sizes
  • Select the correct target object by its index

Always run the pre-processing step for images with multiple objects. Review data.results.result to identify objects and their indices. Use the corresponding zero-based index to select the correct target.

Default:0
Example:0
featuresobject, non-empty(FaceReshapeLipFeature)required

Cannot be all zero

Example:
{ "cheekbones": 0, "jaw": 0, "face_reshape": 0, "face_reshape_left": 0, "face_reshape_right": 0, "face_width": 0, "chin_reshape": 0, "chin_reshape_left": 0, "chin_reshape_right": 0, "chin_length": 0, "eye_size": 0, "eye_size_left": 0, "eye_size_right": 0, "eye_distance": 0, "eye_angle": 0, "eye_height": 0, "eye_width": 0, "nose_bridge_width": 0, "nose_lift": 0, "nose_size": 0, "nose_tip": 0, "nose_tip_width": 0, "nose_wing": 0, "lip_size": 0, "lip_width": 0, "lip_peak": 0, "lip_height_top": 0, "lip_height_bottom": 0 }
globalobjectrequired

Skin smooth setup

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/face-reshape
curl -i -X POST \
  https://yce-api-01.makeupar.com/s2s/v2.0/task/face-reshape \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "src_file_url": "https://example.com/selfie.jpg",
    "version": "1.0",
    "index": 0,
    "features": {
      "cheekbones": 0,
      "jaw": 0,
      "face_reshape": 0,
      "face_reshape_left": 0,
      "face_reshape_right": 0,
      "face_width": 0,
      "chin_reshape": 0,
      "chin_reshape_left": 0,
      "chin_reshape_right": 0,
      "chin_length": 0,
      "eye_size": 0,
      "eye_size_left": 0,
      "eye_size_right": 0,
      "eye_distance": 0,
      "eye_angle": 0,
      "eye_height": 0,
      "eye_width": 0,
      "nose_bridge_width": 0,
      "nose_lift": 0,
      "nose_size": 0,
      "nose_tip": 0,
      "nose_tip_width": 0,
      "nose_wing": 0,
      "lip_size": 0,
      "lip_width": 0,
      "lip_peak": 0,
      "lip_height_top": 0,
      "lip_height_bottom": 0
    },
    "global": {
      "skin_smooth_strength": 50,
      "skin_smooth_color_intensity": 50
    }
  }'

Responses

Successful execution of the task

Bodyapplication/json
statusinteger

Response status

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