Skin Analyze Advanced
curl --request POST \
--url https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced \
--header 'Content-Type: multipart/form-data' \
--header 'ailabapi-api-key: <api-key>' \
--form image='@example-file' \
--form 'face_quality_control=<string>' \
--form 'return_rect_confidence=<string>' \
--form 'return_maps=<string>'import requests
url = "https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced"
files = { "image": ("example-file", open("example-file", "rb")) }
payload = {
"face_quality_control": "<string>",
"return_rect_confidence": "<string>",
"return_maps": "<string>"
}
headers = {"ailabapi-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('image', '<string>');
form.append('face_quality_control', '<string>');
form.append('return_rect_confidence', '<string>');
form.append('return_maps', '<string>');
const options = {method: 'POST', headers: {'ailabapi-api-key': '<api-key>'}};
options.body = form;
fetch('https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"face_quality_control\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_rect_confidence\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_maps\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"ailabapi-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"face_quality_control\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_rect_confidence\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_maps\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ailabapi-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced")
.header("ailabapi-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"face_quality_control\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_rect_confidence\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_maps\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ailabapi-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"face_quality_control\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_rect_confidence\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_maps\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"request_id": "",
"log_id": "",
"error_detail": {
"code": "",
"code_message": "",
"message": ""
},
"warning": [],
"face_rectangle": {
"top": 0,
"left": 0,
"width": 0,
"height": 0
},
"result": {
"skin_color": {
"value": 0,
"confidence": 0.89
},
"skin_age": {
"value": 9
},
"left_eyelids": {
"value": 0,
"confidence": 0.89
},
"right_eyelids": {
"value": 0,
"confidence": 0.89
},
"eye_pouch": {
"value": 0,
"confidence": 0.89
},
"dark_circle": {
"value": 0,
"confidence": 0.89
},
"forehead_wrinkle": {
"value": 0,
"confidence": 0.89
},
"crows_feet": {
"value": 0,
"confidence": 0.89
},
"eye_finelines": {
"value": 0,
"confidence": 0.89
},
"glabella_wrinkle": {
"value": 0,
"confidence": 0.89
},
"nasolabial_fold": {
"value": 0,
"confidence": 0.89
},
"skin_type": {
"skin_type": 0,
"details": {
"0": {
"value": 1,
"confidence": 0.89
},
"1": {
"value": 1,
"confidence": 0.89
},
"2": {
"value": 0,
"confidence": 0.01
},
"3": {
"value": 0,
"confidence": 0.01
}
}
},
"pores_forehead": {
"value": 0,
"confidence": 1
},
"pores_left_cheek": {
"value": 0,
"confidence": 1
},
"pores_right_cheek": {
"value": 0,
"confidence": 1
},
"pores_jaw": {
"value": 0,
"confidence": 1
},
"blackhead": {
"value": 0,
"confidence": 1
},
"acne": {
"rectangle": [
{
"width": 3,
"top": 17,
"height": 1,
"left": 35
},
{
"width": 4,
"top": 20,
"height": 1,
"left": 35
}
]
},
"closed_comedones": {
"rectangle": [
{
"width": 3,
"top": 17,
"height": 1,
"left": 35
},
{
"width": 4,
"top": 20,
"height": 1,
"left": 35
}
]
},
"mole": {
"rectangle": [
{
"width": 3,
"top": 17,
"height": 1,
"left": 35
},
{
"width": 4,
"top": 20,
"height": 1,
"left": 35
}
]
},
"skin_spot": {
"rectangle": [
{
"width": 3,
"top": 17,
"height": 1,
"left": 35
},
{
"width": 4,
"top": 20,
"height": 1,
"left": 35
}
]
}
}
}AI PORTRAIT > Portrait Analysis
Skin Analyze Advanced
Skin Analyze Advanced API detects skin type, tone, eye bags, dark circles, wrinkles, acne, spots, and other skin conditions.
POST
/
api
/
portrait
/
analysis
/
skin-analysis-advanced
Skin Analyze Advanced
curl --request POST \
--url https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced \
--header 'Content-Type: multipart/form-data' \
--header 'ailabapi-api-key: <api-key>' \
--form image='@example-file' \
--form 'face_quality_control=<string>' \
--form 'return_rect_confidence=<string>' \
--form 'return_maps=<string>'import requests
url = "https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced"
files = { "image": ("example-file", open("example-file", "rb")) }
payload = {
"face_quality_control": "<string>",
"return_rect_confidence": "<string>",
"return_maps": "<string>"
}
headers = {"ailabapi-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('image', '<string>');
form.append('face_quality_control', '<string>');
form.append('return_rect_confidence', '<string>');
form.append('return_maps', '<string>');
const options = {method: 'POST', headers: {'ailabapi-api-key': '<api-key>'}};
options.body = form;
fetch('https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"face_quality_control\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_rect_confidence\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_maps\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"ailabapi-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"face_quality_control\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_rect_confidence\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_maps\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ailabapi-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced")
.header("ailabapi-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"face_quality_control\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_rect_confidence\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_maps\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.ailabapi.com/api/portrait/analysis/skin-analysis-advanced")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ailabapi-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"face_quality_control\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_rect_confidence\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"return_maps\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"request_id": "",
"log_id": "",
"error_detail": {
"code": "",
"code_message": "",
"message": ""
},
"warning": [],
"face_rectangle": {
"top": 0,
"left": 0,
"width": 0,
"height": 0
},
"result": {
"skin_color": {
"value": 0,
"confidence": 0.89
},
"skin_age": {
"value": 9
},
"left_eyelids": {
"value": 0,
"confidence": 0.89
},
"right_eyelids": {
"value": 0,
"confidence": 0.89
},
"eye_pouch": {
"value": 0,
"confidence": 0.89
},
"dark_circle": {
"value": 0,
"confidence": 0.89
},
"forehead_wrinkle": {
"value": 0,
"confidence": 0.89
},
"crows_feet": {
"value": 0,
"confidence": 0.89
},
"eye_finelines": {
"value": 0,
"confidence": 0.89
},
"glabella_wrinkle": {
"value": 0,
"confidence": 0.89
},
"nasolabial_fold": {
"value": 0,
"confidence": 0.89
},
"skin_type": {
"skin_type": 0,
"details": {
"0": {
"value": 1,
"confidence": 0.89
},
"1": {
"value": 1,
"confidence": 0.89
},
"2": {
"value": 0,
"confidence": 0.01
},
"3": {
"value": 0,
"confidence": 0.01
}
}
},
"pores_forehead": {
"value": 0,
"confidence": 1
},
"pores_left_cheek": {
"value": 0,
"confidence": 1
},
"pores_right_cheek": {
"value": 0,
"confidence": 1
},
"pores_jaw": {
"value": 0,
"confidence": 1
},
"blackhead": {
"value": 0,
"confidence": 1
},
"acne": {
"rectangle": [
{
"width": 3,
"top": 17,
"height": 1,
"left": 35
},
{
"width": 4,
"top": 20,
"height": 1,
"left": 35
}
]
},
"closed_comedones": {
"rectangle": [
{
"width": 3,
"top": 17,
"height": 1,
"left": 35
},
{
"width": 4,
"top": 20,
"height": 1,
"left": 35
}
]
},
"mole": {
"rectangle": [
{
"width": 3,
"top": 17,
"height": 1,
"left": 35
},
{
"width": 4,
"top": 20,
"height": 1,
"left": 35
}
]
},
"skin_spot": {
"rectangle": [
{
"width": 3,
"top": 17,
"height": 1,
"left": 35
},
{
"width": 4,
"top": 20,
"height": 1,
"left": 35
}
]
}
}
}Authorizations
API Key for authentication
Body
multipart/form-data
Main Image.
Whether to restrict the quality of faces in incoming images.
0: No face quality control is performed, and skin measurement results are returned as long as the face can be detected.1: Perform face quality control, if the face quality does not pass it will prompt an error.
The confidence level of the area whether to return acne, occlusion, blemishes and moles.
0: No regional confidence is returned.1: Returns the regional confidence.
Enter a comma-separated string containing the type of skin chromatography image to be returned.
Response
200 - application/json
Success
The response is of type object.
⌘I

