Skip to main content
POST
Skin Analyze Pro

Request

  • URL: https://www.ailabapi.com/api/portrait/analysis/skin-analysis-pro
  • Method: POST
  • Content-Type: multipart/form-data

Image requirements

  • Image format: JPG JPEG
  • 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,right_roi_outline_map,left_roi_outline_map
  • 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 {"pores_color":"0000FF","blackhead_color":"FF0000","wrinkle_color":"6E9900","fine_line_color":"8DFE2A","closed_comedones_color":"00FF00","acne_pustule_color":"9F21F6","acne_nodule_color":"FF00FD","acne_color":"FE0100","brown_spot_color":"7E2A28"}
  • 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)
The input format is restricted to a 6-digit hexadecimal string, case-insensitive.If no modifications are made, the default color parameters will be used for drawing.

return_side_results

  • Request Example jawline_info
  • Field Parsing

Response

Response Field Handling Flow
  1. Handle Public Response Fields Parse and validate the Public Response Fields, checking the status code or response message to ensure the request is successful and error-free.
  2. Handle Business Response Fields If the Public Response Fields are valid and error-free, proceed with processing the business logic in the Business Response Fields.

Public Response Fields

Viewing Public Response Fields and Error Codes

Business 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
  • blackhead indicates the severity of blackheads, while blackhead_count represents the number of blackheads.
  • enlarged_pore_count is the count of enlarged pores.
  • pores_forehead, pores_rightcheek, pores_leftcheek, and pores_jaw represent 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.
  • rough measures 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
  • melanin indicates 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 the score_info > melanin_score field.
  • melanin_mark provides the coordinates of the pigmentation areas, which can be used to directly draw these areas.
If detailed results on specific pigmentation issues (such as moles or spots) are not required, you can use the overall pigmentation area drawing results. For detailed drawing of pigmentation issues, you can use the mole and brown_spot fields to get rectangular or polygonal bounding boxes.
Acne Analysis Module
  • acne, acne_pustule, acne_nodule, acne_mark, and closed_comedones represent 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_score field.
Sensitivity Analysis Module
  • sensitivity indicates 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 the score_info > sensitivity_score field.
  • sensitivity_mark provides the coordinates of the sensitive areas on the face, which can be used to directly draw these areas.
Aging Analysis Module
  • skin_age assesses the overall skin condition and aging level of the face.
  • The forehead_wrinkle_info series 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, and right_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.
Eye Analysis Module
  • eye_pouch determines the presence of under-eye bags. The severity of the bags is provided only if the result is 1, and can be found in eye_pouch_severity.
  • Similarly, dark_circle and dark_circle_severity indicate the presence and severity of dark circles.
For drawing on areas such as dark circles and eye bags, use the following fields:
  • left_eye_pouch_rectangle
  • right_eye_pouch_rectangle
  • dark_circle_mark
Digital Scoring System Module
It includes a total score and 12 parameters. You can directly assess the level of each dimension based on these parameters.
Custom Module
Coordinate conversion formula between original image and black and white enhanced image
x_enhance = (x_img - left) * ratioy_enhance = (y_img - top) * ratioCoordinates of original image: x_img, y_img, coordinates of black and white enhanced image: x_enhance, y_enhance.

Skin Analysis Cases

Response Example

Authorizations

ailabapi-api-key
string
header
required

API Key for authentication

Body

multipart/form-data
image
file

Main Image.

left_side_image
file

Side face picture.(Left)

right_side_image
file

Side face picture.(Right)

return_maps
string

The type of skin problem detection mapping image to be returned. If the corresponding element parameter is passed in, the interface will return an image of the original size, which you can subsequently overlay with the original image to see the results. Use commas to separate multiple types.

return_marks
string

The type of skin problem detection mapping image to be returned. Use commas to separate multiple types.

roi_outline_color
string

Customize the color.

return_side_results
string

The side face information that needs to be returned. Use commas to separate multiple types.

Response

200 - application/json

Success

The response is of type object.