Request
- URL:
https://www.ailabapi.com/api/portrait/effects/face-beauty-pro - Method:
POST - Content-Type:
multipart/form-data
Image requirements
- Image format:
JPEGJPGPNG - Image size: No more than 2 MB.
- Image resolution: Larger than 48x48px, smaller than 4096x4096px.
Headers
| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
Body
| Field | Required | Type | Scope | Default | Description |
|---|---|---|---|---|---|
image | YES | file | |||
whitening | NO | integer | [0, 100] | 50 | Whitening Degree. 0 means no whitening effect, 100 represents the highest degree. |
smoothing | NO | integer | [0, 100] | 50 | Smoothing Degree. 0 means no smoothing effect, 100 represents the highest degree. |
thinface | NO | integer | [0, 100] | 50 | Face Slimming Degree. 0 means no face slimming effect, 100 represents the highest degree. |
shrink_face | NO | integer | [0, 100] | 50 | Small Face Degree. 0 means no small face effect, 100 represents the highest degree. |
enlarge_eye | NO | integer | [0, 100] | 50 | Big Eyes Degree. 0 means no big eyes effect, 100 represents the highest degree. |
remove_eyebrow | NO | integer | [0, 100] | 50 | Eyebrow Removal Degree. 0 means no eyebrow removal effect, 100 represents the highest degree. |
filter_type | NO | integer | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 | 1`: Black and White.`, 2: Calm., 3`: Sunny Day.`, 4: Journey., 5`: Beautify Skin.`, 6: Hong Kong Style., 7`: Aesthetic.`, 8: Lovely., 9`: New York.`, 10: Sakura., 11`: Seventeen.`, 12: Soft Light., 13`: Afternoon Tea.`, 14: Brighten Skin., 15`: Chaplin.`, 16: Floral., 17`: Memories.`, 18: Ice Beauty., 19`: Paris.`, 20: Time., 21`: LOMO.`, 22: Old Times., 23`: Early Spring.`, 24: Story., 25`: Abao Color.`, 26: Fill Light., 27`: Warm.`, 28: Gorgeous., 29`: Lavender.`, 30: Chanel., 31`: Prague.`, 32: Old Dreams., 33`: Peach Blossom.`, 34: Pink., “35: Misty Rain. | |
task_type | NO | string | sync | sync | “sync: Synchronous tasks. |
Response
Public Response Fields
Viewing Public Response Fields and Error CodesBusiness Response Fields
| Field | Type | Scope | Description |
|---|---|---|---|
task_type | string | sync | Task Type. “sync: Synchronous tasks. |
result | string | Returns the base64 data of the processed image. |
Response Example
Sample Code
Authorizations
API Key for authentication
Body
Task Type. <li>sync: Synchronous tasks.</li> <li>async: Asynchronous tasks.</li>
"sync"
Whitening Degree. 0 means no whitening effect, 100 represents the highest degree.
"50"
Smoothing Degree. 0 means no smoothing effect, 100 represents the highest degree.
"50"
Face Slimming Degree. 0 means no face slimming effect, 100 represents the highest degree.
"50"
Small Face Degree. 0 means no small face effect, 100 represents the highest degree.
"50"
Big Eyes Degree. 0 means no big eyes effect, 100 represents the highest degree.
"50"
Eyebrow Removal Degree. 0 means no eyebrow removal effect, 100 represents the highest degree.
"50"
Filter Effects. <li>1: Black and White.</li> <li>2: Calm.</li> <li>3: Sunny Day.</li> <li>4: Journey.</li> <li>5: Beautify Skin.</li> <li>6: Hong Kong Style.</li> <li>7: Aesthetic.</li> <li>8: Lovely.</li> <li>9: New York.</li> <li>10: Sakura.</li> <li>11: Seventeen.</li> <li>12: Soft Light.</li> <li>13: Afternoon Tea.</li> <li>14: Brighten Skin.</li> <li>15: Chaplin.</li> <li>16: Floral.</li> <li>17: Memories.</li> <li>18: Ice Beauty.</li> <li>19: Paris.</li> <li>20: Time.</li> <li>21: LOMO.</li> <li>22: Old Times.</li> <li>23: Early Spring.</li> <li>24: Story.</li> <li>25: Abao Color.</li> <li>26: Fill Light.</li> <li>27: Warm.</li> <li>28: Gorgeous.</li> <li>29: Lavender.</li> <li>30: Chanel.</li> <li>31: Prague.</li> <li>32: Old Dreams.</li> <li>33: Peach Blossom.</li> <li>34: Pink.</li> <li>35: Misty Rain.</li>
Response
Success
The response is of type object.

