Skip to main content
POST
Face Analyzer

Request

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

Image requirements

  • Image format: JPG JPEG PNG BMP
  • Image size: No more than 5 MB.
  • Image resolution: Less than 2000x2000px.

Headers

Body

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

Response Example

Authorizations

ailabapi-api-key
string
header
required

API Key for authentication

Body

multipart/form-data
image
file
max_face_num
string

The maximum number of faces processed. When set to 1, only the largest face in the image is detected. A smaller value leads to faster processing speed.

face_attributes_type
string

Whether to return attributes such as age, gender, mood, etc. AttributesInfo is returned for up to 5 faces with the largest area, and AttributesInfo for more than 5 faces (the 6th and later faces) are not referenced.

need_rotate_detection
string

Whether to enable image rotation recognition support. When the face in the picture is rotated and there is no exif information in the picture, if you don't turn on the picture rotation recognition support, you can't detect and recognize the face in the picture correctly. If you are sure that the picture contains exif information or you are sure that the face in the input picture will not be rotated, please do not turn on this parameter. If this parameter is turned on, the overall time required may increase by hundreds of milliseconds.

  • 0: Close.
  • 1: Open.

Response

200 - application/json

Success

The response is of type object.