AILabTools API - Lips Color Changer - API
Request
- URL:
https://www.ailabapi.com/api/portrait/effects/lips-color-changer
- Method:
POST
- Content-Type:
multipart/form-data
Image requirements
- Image format:
JPEG
JPG
PNG
BMP
- Image size: No more than 6 MB.
- Image resolution: Less than 4096x4096px.
Header
Field | Required | Type | Description |
---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. |
Body
Field | Required | Type | Description |
---|---|---|---|
image | YES | file | |
lip_color_infos | YES | json string | Lip Color Info. You can enter up to 3 lip_color_info to enable changing the lip color for up to 3 faces in a graph. Description |
lip_color_infos
Field | Required | Type | Scope | Description |
---|---|---|---|---|
rgba | YES | object | Lip color. | |
+r | YES | integer | [0, 255] | R channel values. |
+g | YES | integer | [0, 255] | G channel values. |
+b | YES | integer | [0, 255] | B channel values. |
+a | YES | integer | [0, 100] | A channel values. |
face_rect | NO | object | Face box position. If not entered the face with the largest area in the image is selected. You can use the Face Analyzer API or Face Key Points API to get face frame position information. | |
+x | YES | integer | Horizontal coordinate of the upper left corner of the face box. | |
+y | YES | integer | The vertical coordinate of the upper left corner of the face box. | |
+width | YES | integer | Face frame width. | |
+height | YES | integer | Face frame height. |
Example
{
"lip_color_infos": [
{
"rgba": {
"r": 0,
"g": 0,
"b": 0,
"a": 0
},
"face_rect": {
"x": 0,
"y": 0,
"width": 0,
"height": 0
}
},
{
"rgba": {
"r": 0,
"g": 0,
"b": 0,
"a": 0
},
"face_rect": {
"x": 0,
"y": 0,
"width": 0,
"height": 0
}
}
]
}
Response
Parameters
Field | Type | Description |
---|---|---|
error_code | integer | Status Code. |
error_code_str | string | Error Code. |
error_msg | string | Error Message. |
request_id | string | Request ID. |
log_id | string | Log ID. |
result_image | string | Returns the base64 data of the processed image. |
Example
{
"error_code": 0,
"error_code_str": "",
"error_msg": "",
"request_id": "",
"log_id": "",
"result_image": ""
}
Code example
If you'd like to see the actual effects, please visit the experience page for a trial.