[Important Notice: API Integration Update Required]Dear Developers,Thank you for your continued support of the AILabTools API.We would like to inform you that the current API has been updated with changes to the request and response specifications. These changes involve adjustments to parameters and response fields, and may affect existing integrations that rely on the previous API behavior.To ensure your application continues to work correctly, we strongly recommend that you review and update your current API integration as soon as possible.If you have any questions or need assistance with updating your integration, please feel free to contact our support team:
📧 support@ailabtools.comThank you for your understanding and cooperation. We appreciate your continued trust in AILabTools.Best regards,AILabTools Support Team
Request
- URL:
https://www.ailabapi.com/api/portrait/analysis/skin-analysis-pro - Method:
POST - Content-Type:
multipart/form-data
Image requirements
- Image format:
JPGJPEG - Image size: No more than 8 MB.
- Image resolution: Larger than 200x200px, smaller than 4096x4096px.
- Minimum face pixel size: To ensure the effect, the minimum value of the face box (square) side length in the image should preferably be higher than 400px.
- Face quality: The higher the face quality, the more accurate the skin analysis. Factors affecting face quality include: occlusion of facial features, blurred images, improper lighting (bright, dark, backlight), excessive face angle (yaw ≤ ±30°, pitch ≤ ±40° recommended), etc.
Headers
Body
return_maps
-
Request Example
red_area,brown_area,texture_enhanced_pores,texture_enhanced_blackheads,texture_enhanced_oily_area,texture_enhanced_lines,water_area,rough_area,roi_outline_map,texture_enhanced_bw - Field Parsing
return_marks
-
Request Example
wrinkle_mark,right_nasolabial_list,right_mouth_list,right_eye_wrinkle_list,right_crowsfeet_list,right_cheek_list,left_nasolabial_list,left_mouth_list,left_eye_wrinkle_list,left_crowsfeet_list,left_cheek_list,glabella_wrinkle_list,forehead_wrinkle_list,dark_circle_outline,sensitivity_mark,melanin_mark,dark_circle_outline,cheekbone_mark - Field Parsing
roi_outline_color
- Request Example “
- Field Parsing
Example: The format
CC00FF represents the following RGB values:
- R (Red): CC (204 in decimal)
- G (Green): 00 (0 in decimal)
- B (Blue): FF (255 in decimal)
return_side_results
-
Request Example
jawline_info - Field Parsing
Response
Response Field Handling Flow-
Handle
Public Response FieldsParse and validate thePublic Response Fields, checking the status code or response message to ensure the request is successful and error-free. -
Handle
Business Response FieldsIf thePublic Response Fieldsare valid and error-free, proceed with processing the business logic in theBusiness Response Fields.
Public Response Fields
Viewing Public Response Fields and Error CodesBusiness Response Fields
left_side_result
right_side_result
face_rectangle
result
Image Quality Module
It returns the proportion of the face in the image, face coordinates, face angle values, and the proportion of bangs. The face coordinates can be used to extract the face for custom interactive design. The face proportion in the image, face angle values, and bangs proportion can be used as custom restrictions to determine whether the uploaded image is acceptable. For example, if the bangs proportion exceeds 0.4, the image needs to be retaken. If you have no special requirements, you can directly use the default configuration of the interface.Skin Quality Analysis Module
It analyzes the skin’s oil-dryness index.skin_type serves as an overall classification to determine the user’s skin type, while oily_intensity and water analyze the current state of the user’s skin in terms of moisture level and oiliness.
Skin Tone Analysis Module
skintone_ita is an upgraded version of skintone. You can use either of the two, but it’s recommended to use the combination of skintone_ita and skin_hue_ha.
skintone_ita
ITA (Individual Typology Angle) is an internationally recognized skin color standard. It classifies skin color based on measurements of color attributes in the Lab color space. This method is highly sensitive to ambient lighting conditions. For best results, we recommend using a flash to take high-definition photos of the face for processing. Measurements taken in natural or low-light conditions may be inaccurate or inconsistent.
Based on data from the smartphone’s rear flash, the current skin color classification reference is as follows:
You can also use the returned ITA value to define your classification based on the returned ITA angle at the time of access.
skin_hue_ha
HA (Hue Angle) is an internationally recognized skin color standard. It classifies skin color by measuring color attributes in the Lab color space. This method is highly sensitive to ambient lighting conditions. For accurate results, we recommend using a flash to take high-definition photos of the face for processing, as HA angle values measured in natural or low-light conditions may be inaccurate or inconsistent.
According to the data taken by the rear flash of the phone, the current skin tone classification reference.
You can also use the returned HA value to define your classification based on the returned HA angle at the time of access.
Roughness Analysis Module
blackheadindicates the severity of blackheads, whileblackhead_countrepresents the number of blackheads.enlarged_pore_countis the count of enlarged pores.pores_forehead,pores_rightcheek,pores_leftcheek, andpores_jawrepresent the severity of pores in different areas of the face. The overall severity of pores can be assessed based on the number or score of pores.roughmeasures the texture roughness of the facial skin and can provide the proportion of roughness across the entire face as well as the area proportion for different regions.
Pigmentation Analysis Module
melaninindicates the degree and area proportion of pigmentation on the face. The degree is represented by a score, with higher numbers indicating more severe pigmentation issues. The pigmentation score can be calculated using thescore_info > melanin_scorefield.melanin_markprovides the coordinates of the pigmentation areas, which can be used to directly draw these areas.
mole and brown_spot fields to get rectangular or polygonal bounding boxes.
Acne Analysis Module
acne,acne_pustule,acne_nodule,acne_mark, andclosed_comedonesrepresent different types of acne analysis. You can use the returned coordinates to draw rectangular and polygonal boxes around these types.- To assess the severity of acne, you can refer to the score provided in the
score_info > acne_scorefield.
Sensitivity Analysis Module
sensitivityindicates the degree of sensitivity on the face and the area proportion affected. The degree is represented by a score, with higher numbers indicating more severe sensitivity issues. The sensitivity score can be calculated using thescore_info > sensitivity_scorefield.sensitivity_markprovides the coordinates of the sensitive areas on the face, which can be used to directly draw these areas.
Aging Analysis Module
skin_ageassesses the overall skin condition and aging level of the face.- The
forehead_wrinkle_infoseries provides detailed information about wrinkles in specific areas, including severity and scores. To receive these details, you need to check the severity levels using the following fields:forehead_wrinkle_severity,left_eye_finelines_severity, andright_eye_finelines_severity. If the severity is returned as 0 (none), the wrinkle details (wrinkle_info) will not be provided. - It is recommended to use the following fields in combination for a comprehensive analysis:
- Severity fields:
nasolabial_fold_severity,left_mouth_wrinkle_severity,right_mouth_wrinkle_severity,forehead_wrinkle_severity,left_crows_feet_severity,right_crows_feet_severity,left_eye_finelines_severity,right_eye_finelines_severity,glabella_wrinkle_severity,left_nasolabial_fold_severity,right_nasolabial_fold_severity,left_cheek_wrinkle_severity,right_cheek_wrinkle_severity. - Wrinkle information fields:
forehead_wrinkle_info,left_eye_wrinkle_info,right_eye_wrinkle_info,left_crowsfeet_wrinkle_info,right_crowsfeet_wrinkle_info,glabella_wrinkle_info,left_mouth_wrinkle_info,right_mouth_wrinkle_info,left_nasolabial_wrinkle_info,right_nasolabial_wrinkle_info,left_cheek_wrinkle_info,right_cheek_wrinkle_info.
- Severity fields:
Eye Analysis Module
eye_pouchdetermines the presence of under-eye bags. The severity of the bags is provided only if the result is 1, and can be found ineye_pouch_severity.- Similarly,
dark_circleanddark_circle_severityindicate the presence and severity of dark circles.
left_eye_pouch_rectangleright_eye_pouch_rectangledark_circle_mark





