# AI Face Lift

# Overview
AI Face Lift is a generative AI facial enhancement feature that allows precise and natural facial refinement through adjustable parameters. Instead of applying filters, the system intelligently analyzes facial structure, skin quality, and proportions, then reconstructs the image to produce realistic improvements that preserve the individual's identity.

Users can control specific facial areas such as eye bags, cheeks, forehead, overall face shape, and mouth using numeric values from 0 to 100. Each parameter increases the level of enhancement gradually, allowing subtle touch ups or more polished results depending on user preference. All adjustments are designed to remain natural and balanced, avoiding exaggerated or artificial outcomes.

AI Face Lift provides flexible, feature level control for creating a refreshed, confident, and professional appearance suitable for social media, profile photos, creative content, or business use.


![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/01_1_6c0d97eb51.jpg)

![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/01_2_8c428a25dc.jpg)


## Integration Guide
This guide walks you through:

Workflow for AI Face Lift API:

**Endpoint:** `/s2s/v2.0/file/face-lift`

**Authentication Required:** `Authorization: Bearer YOUR_API_KEY`

**Workflow Steps:**

1. **Image Upload Preparation:**
   - The process begins with preparing a selfie image.

2. **Optional Preprocessing For Multiple Faces:**
    - Preprocess the selfie image if there are more than one face in the image.

3. **Face Lift Effect Setup:**
   - Begin by selecting suitable face lift parameters.

4. **Initiate AI Task and Obtain Task ID:**
   - Send the uploaded image(s) along with the chosen effect configuration via an HTTP POST request to `/s2s/v2.0/file/face-lift`.
   - Await a unique task ID in the response, which identifies this interaction.

5. **Poll Task Status (Continuous Check):**
   - Use the obtained `task_id` to periodically poll the task status using an HTTP GET request (e.g., `GET /task/${task_id}`).
   - Continuously monitor for:
     - `Task_status = "success"` (process completed).
     - `Task_status = "error"` (resolve or retry if applicable).
   - Update the workflow accordingly once the status transitions to success.

This structured workflow ensures efficient integration with user inputs, automated monitoring of tasks, and seamless retrieval of results.


---

* Authentication
- Include your API key in the request header using **Bearer Token**:
    ```
    Authorization: Bearer YOUR_API_KEY
    ```
You can find your API Key at https://yce.makeupar.com/api-console/en/api-keys/.


* 1. Upload an Image

You may upload a file directly to the server or provide a valid image URL in the AI task payload.

   * Upload Endpoint

```
POST /s2s/v2.0/file/face-lift
```

Alternatively, skip this step if you already have a public image URL.

---

* 2. Select the target face to be enhanced by preprocessing

   * Calling the preprocessing API
Output detected bounding boxes in pixel coordinate. Use the index of result to create a Face Lift AI task later.
```
POST /s2s/v2.0/task/face-lift/pre-process
```

```
{
    "timed": number,
    "result": [
        {
            "left": number,
            "top": number,
            "width": number,
            "height": number
        }
    ]
}
```

* 3. Create a Face Lift AI Task and Poll for Results

Once you have an image and a complete effect payload, create a task. The API processes the request asynchronously. You must poll the task status until it reaches `success` or `error`.

   * Create Task Endpoint

```
POST /s2s/v2.0/task/face-lift
```

   * Polling Endpoint

```
GET /s2s/v2.0/task/face-lift/{task_id}
```

---

## File Specs & Errors

* AI Face Lift Specification

**Supported Selfie View**
Images must be no larger than 1920 x 1920, contain a clearly visible face of sufficient size exceeding 32 x 32 pixels when the long edge is 640, and be captured with a roll angle within plus or minus 75 degrees and a yaw angle within plus or minus 90 degrees to ensure reliable face detection.

![](https://plugins-media.makeupar.com/strapi/assets/thumbnail_face_reshape_01_85c8ffc055.jpg)


---

* Supported Formats & Dimensions

| AI Feature | Supported Dimensions | Supported File Size | Supported Formats|
|  ----  | ----  | ----  | ----  |
| AI Face Lift | long side <= 1920 | < 10MB | jpg/jpeg/png |

* Error Codes

| Error Code | Description |
|  ----  | ----  |
| RUNTIME_ERROR | An unexpected error occurred duface lift runtime |
| PHOTO_DETECTION_FAIL | The user photo could not be processed correctly, for example no hand detected |
| OBJECT_DETECTION_FAIL | The object photo could not be processed correctly, for example no product detected |
| PHOTO_CHECK_INVALID | The pose or size of the user photo is invalid |
| INPUT_ERROR | The input file format is incorrect |
| INPUT_MAIN_IMAGE_EMPTY | A user image is required |


* Environment & Dependency

| Sample Code Language / Tool | Recommended Runtime Versions |
|---|---|
| cURL | - bash >= 3.2</br>   - curl >= 7.58 (modern TLS/HTTP support)</br>   - jq >= 1.6 (robust JSON parsing) |
| Node.js (JavaScript) | Node >= 18 (for global fetch) |
| JavaScript | - Chrome / Edge >= 80</br>   - Firefox >= 74</br>   - Safari >= 13.1 |
| PHP | PHP >= 7.4 (for modern TLS/compat), ext-curl (recommended) or allow_url_fopen=On + ext-openssl, ext-json |
| Python | Python >= 3.10 (for f-strings), requests >= 2.20.0 |
| Java | Java 11+ (for HttpClient), Jackson Databind >= 2.12.0 |

---

## JS Camera Kit
{% partial file="/_partials/js-camera-kit.md" /%}


License: Privacy policy

## Servers

```
https://yce-api-01.makeupar.com
```

## Security

### BearerAuthenticationV2

Use the standard 'Bearer authentication'. Put your 'API Key' in header: `Authorization:Bearer YOUR_API_KEY`. Notice that there is ' ' a space between 'Bearer' and the 'YOUR_API_KEY'.

Type: http
Scheme: bearer

## Download OpenAPI description

[AI Face Lift](https://docs.perfectcorp.com/_bundle/reference/ai_face_lift.yaml)

## V1.0

AI Face Lift is a generative AI facial enhancement feature that allows precise and natural facial refinement through adjustable parameters.

### Create a new file.

 - [POST /s2s/v2.0/file/face-lift](https://docs.perfectcorp.com/reference/ai_face_lift/v1.0/paths/~1s2s~1v2.0~1file~1face-lift/post.md): To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

### Run an AI Face Lift detection task.

 - [POST /s2s/v2.0/task/face-lift/pre-process](https://docs.perfectcorp.com/reference/ai_face_lift/v1.0/paths/~1s2s~1v2.0~1task~1face-lift~1pre-process/post.md): Use the pre-process task when the source image may contain more than one valid target, or when your integration needs to explicitly choose which detected target receives the effect. For single-target images, pre-process can be skipped when the feature supports a default index value and your application does not need manual target selection.

The pre-process task detects candidate targets in the source image and returns their coordinates in data.results.result. Each item in the result array represents one detected target. Review the returned coordinates, map them to the intended face or region in the source image, and use that item's zero-based array index as the index value when creating the effect task.

For images with multiple detected faces or regions, do not rely on the default index value without checking the pre-process result. The effect is applied only to the target selected by index, so the integration must confirm the result item that corresponds to the intended target before running the effect task.

This task is asynchronous. After creating the task, handle completion with webhook if the feature supports it, or poll the corresponding pre-process status endpoint until data.task_status is success or error.

### Check the status of an AI Face Lift detection task.

 - [GET /s2s/v2.0/task/face-lift/pre-process/{task_id}](https://docs.perfectcorp.com/reference/ai_face_lift/v1.0/paths/~1s2s~1v2.0~1task~1face-lift~1pre-process~1%7Btask_id%7D/get.md)

### Run an AI Face Lift task.

 - [POST /s2s/v2.0/task/face-lift](https://docs.perfectcorp.com/reference/ai_face_lift/v1.0/paths/~1s2s~1v2.0~1task~1face-lift/post.md): 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 for the feature, or if your integration cannot use webhooks, implement polling. After starting an AI task, keep polling the task status endpoint at the given polling_interval until the task status is either success or error.

Do not stop polling a running task for longer than the allowed polling window. If the task is not polled in time, the task may expire; a later status check can return InvalidTaskId even if processing finished, and the consumed units may still be charged.

### Check the status of a AI Face Lift task.

 - [GET /s2s/v2.0/task/face-lift/{task_id}](https://docs.perfectcorp.com/reference/ai_face_lift/v1.0/paths/~1s2s~1v2.0~1task~1face-lift~1%7Btask_id%7D/get.md)

