AILabTools API - Face Filters - API
Request
- URL:
https://www.ailabapi.com/api/portrait/effects/face-filter
- Method:
POST
- Content-Type:
multipart/form-data
Image requirements
- Image format:
JPEG
JPG
PNG
BMP
- Image size: No more than 3 MB.
- Image resolution: Larger than 10x10px, smaller than 2000x2000px.
Header
Field | Required | Type | Description |
---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
Body
Field | Required | Type | Scope | Description |
---|---|---|---|---|
image | YES | file | ||
resource_type | YES | string | Scope | Picture style. More Details |
strength | YES | float | [0, 1.0] | Filter intensity. |
resource_type
resource_type | Description |
---|---|
10001 | White Tea |
10002 | Fair Skin |
10003 | Early Summer |
10004 | Tokyo |
10005 | Confession |
10006 | Warm Sunshine |
10007 | Rose |
10008 | Clarity |
10009 | Crystal Clear |
10010 | Sweet Mint |
10011 | Basic |
10012 | Heartbeat |
10013 | Muted Gray |
10014 | Cherry Pudding |
10015 | Natural |
10016 | Elegance |
10017 | Black and White |
10018 | Fruit |
10019 | Love |
10020 | Winter |
10021 | Photo |
10022 | Summer |
10023 | Fragrance |
10024 | Charm |
10025 | Throb |
10026 | Beach |
10027 | Street Snap |
10028 | Sweet |
10029 | First Kiss |
10030 | Afternoon |
10031 | Vitality |
10032 | Hazy |
10033 | Joyful |
10034 | Fashion |
10035 | Bubbles |
10036 | Lemon |
10037 | Cotton Candy |
10038 | Brook |
10039 | Beauty |
10040 | Coffee |
10041 | Tender Bud |
10042 | Passion |
10043 | Gradual Warmth |
10044 | Breakfast |
10045 | White Tea |
10046 | Fair |
10047 | Holy |
10048 | Forest |
10049 | Surfing |
10050 | Milk Coffee |
10051 | Clear |
10052 | Breeze |
10053 | Sunset |
10054 | Water Glow |
10055 | Japanese Style |
10056 | Starlight |
10057 | Sunshine |
10058 | Falling Leaves |
10059 | Vitality |
10060 | Sweetheart |
10061 | Elegance |
10062 | Spring |
10063 | Rome |
10064 | Green |
10065 | Gentle Breeze |
10066 | Warm Heart |
10067 | Seawater |
10068 | Mysterious |
10069 | Vintage 1 |
10070 | Vintage 2 |
10071 | Snowy Peak |
10072 | Sunlight |
10073 | Floating Clouds |
10074 | Flowing Colors |
10075 | Film |
10076 | Nostalgia |
10077 | Cheese |
10078 | Butterfly |
Response
Processing Flow
-
Handle
Public Parameters
:First, parse and validate the
Public Parameters
, checking the status code or response message to ensure the request is successful and no errors are present. -
Handle
Business Parameters
:If the public parameters are valid and no exceptions are found, proceed to process the business logic in the
Business Parameters
.
Public Parameters
Viewing Public Parameters and Error CodesBusiness Parameters
Field | Type | Description |
---|---|---|
data | object | The content of the result data returned. |
+image_url | string | Resulting image URL address. |
tip
The URL address is a temporary address, valid for 24 hours, and will not be accessible after it expires. If you need to save the file for a long time or permanently, please visit the URL address within 24 hours and download the file to your own storage space.
Example
{
"request_id": "",
"log_id": "",
"error_code": 0,
"error_code_str": "",
"error_msg": "",
"error_detail": {
"status_code": 200,
"code": "",
"code_message": "",
"message": ""
},
"data": {
"image_url": ""
}
}
Code example
If you'd like to see the actual effects, please visit the experience page for a trial.