Face
Detect
The Face Detect method allows you to process images in order to detect human faces.
We highly recommend that you use this resource to evaluate the overall quality of the image.
Our face detection and recognition models do not consider faces that are not completely inside the given image input. For best results, consider using only non-ocluded faces.
Headers
Authorization REQUIRED / string (jwt token)
Body
image_file string (binary)
client_declaration_enduser_consent boolean (true/false)
Response
200
The Detect object
total_faces number
Total number of faces detected on a single image file.
faces array[object]
List of all faces by Perse model.
landmarks object
Object with coordinates (x,y) for each of face's landmarks.
bounding_box number
Array of coordinates that forms a bounding box around the face (top left corner, bottom right corner, width, height).
face_metrics object
An object with five properties indicating the overall picture quality of the detected face.
Those metrics are related to the cropped area of the image that has a face, not the whole image file.
- underexposure
number (0-1)
Indicates loss of shadow detail (closer to 0 is better). - overexposure
number (0-1)
Indicates loss of highlight detail (closer to 0 is better). - sharpness
number (0-1)
Indicates intensity of motion blur (closer to 1 is better). - color
number (0-1)
Indicates if there is a color degradation (closer to 0 is better). - rotation
number (0-360)
Indicates if the face is rotated .This metric uses the head orientation on the 3 axis (pitch,roll,yaw) and outputs the result score. This filter indicates if the person is looking straight to the camera. (closer to 0 is better)
liveness_score number
Indicates the confidence that a detected face is from a person or from a spoof attack
(1 means higher confidence of being a person).
default_thresholds object
An object that contains default and recommended thresholds to verify image quality.
- underexposure
number
Indicates the recommended threshold for underexposure. If the value is lower than the threshold, it means that the image is within the recommended limit for darkness. - overexposure
number
Indicates the recommended threshold for overexposure. If the value is lower than the threshold, it means that the image is within the recommended limit for brightness. - sharpness
number
Indicates the recommended threshold for sharpness. If the value is higher than the threshold, it means that the image is within the recommended limit for blur. - color
number
Indicates the recommended threshold for color. If the color
value is lower than the color
threshold, it means the image has no degradation in color. - rotation
number
Indicates the recommended threshold for rotation. If the rotation
value is lower than the rotation
threshold, it means the face is not rotated. - liveness
number
Indicates the recommended threshold for liveness. If the value is lower than the threshold, it means that the person on the image is probably not a real person. In order to have reliable results for liveness, the other quality parameters should be within their recommended thresholds.
image_metrics object
An object with three properties indicating the overall picture quality.
- underexposure
number(0-1)
It indicates loss of shadow detail (closer to 0 is better). - overexposure
number(0-1)
It indicates loss of highlight detail (closer to 0 is better). - sharpness
number(0-1)
It indicates intensity of motion blur (closer to 1 is better). - color
number(0-1)
Indicates if there is a color degradation (close to 0 is better).
time_taken number
Inference time taken in seconds.
400
The request was unacceptable, often due to a missing required parameter.
401
Session token is missing or invalid.
415
The content type or encoding is not valid.
Face Compare
The face compare method accepts two image files for similarity comparison.
The model will use the largest face (biggest bounding box area) on each source. Our face detection and recognition models do not consider faces that are not completely inside the given image input. For best results consider using only non-occluded faces.
TIP
We recommend using the key default_thresholds
to verify similarity.
Headers
Authorization REQUIRED / string (jwt token)
Body
If comparing the faces between 2 images:
image_file1 string (binary)
image_file2 string (binary)
client_declaration_enduser_consent boolean (true/false)
If comparing an enrolled face with an image:
image_file string (binary)
user_token string
client_declaration_enduser_consent boolean (true/false)
Response
200 object
The Compare object
defaultThresholds object
An object that contains default and recommended thresholds to verify similarity.
- similarity
number
Indicates the recommend threshold for similarity comparison. - liveness
number
Indicates the recommended threshold for liveness verification.
similarity number
Similarity score between the two compared faces on source files. Higher similarity scores imply higher probability that both faces are from the same person.
liveness_score number
The liveness score indicates the probability that the received images where captured in a 'live' environment. Higher scores indicate greater confidence that images are 'live'.
time_taken number
Inference time taken in seconds
400
The request was unacceptable, often due to a missing required parameter.
401
Session token is missing or invalid.
422
Face was not found on sent image.
415
The content type or encoding is not valid.
Voice
Voice Compare
The voice compare method accepts two audios files for similarity comparison.
Currently we only accept .wav or .ogg files.
Headers
Authorization REQUIRED / string (jwt token)
Body
audio_file1 string (binary)
audio_file2 string (binary)
client_declaration_enduser_consent boolean (true/false)
Response
200 object
The Compare object
similarity number
Similarity score between the two compared audios on source files. Higher similarity scores imply higher probability that both faces are from the same person.
time_taken number
Inference time taken in seconds
400
The request was unacceptable, often due to a missing required parameter.
401
Session token is missing or invalid.
415
The content type or encoding is not valid.
Enrollment
We save biometric facial features from enrolled faces for future use.
The enrollment endpoints allow you to create, update, delete and list enrolled faces.
When enrolling or updating an user, the model will extract the facial features of the largest face from the received image file.
Faces that are not completely inside (partial/occluded) the image will not be considered.
In order to ensure that enrolled faces perform well on our face recognition models, faces with underexposed or overexposed values greater than their respective thresholds will not be considered. The following error codes are returned in this case:
image_underexposed
image_overexposed
Headers
Authorization REQUIRED / string (jwt token)
Enroll User
This endpoint is responsible for creating new enrollments.
When a new face is enrolled, the endpoint returns the enrollment user_token.
Headers
Authorization REQUIRED / string (jwt token)
Body
image_file string(binary)
client_declaration_enduser_consent boolean (true/false)
Response
200 object
user_token number
The user_token of the enrolled face
time_taken number
Inference time taken in seconds
400
The request was unacceptable, often due to a missing required parameter.
401
Session token is missing or invalid.
422
Face was not found on sent image.
415
The content type or encoding is not valid
Delete User
Use this endpoint to delete an enrollment.
This endpoint expects an user_token in the url.
Headers
Authorization REQUIRED / string(jwt token)
Response
200 object
time_taken number
Inference time taken in seconds
400
The request was unacceptable, often due to a missing required parameter.
401
Session token is missing or invalid.
422
Face was not found on sent image.
415
The content type or encoding is not valid
List Users
Use this endpoint to get the complete list of the created user_tokens
Headers
Authorization REQUIRED / string (jwt token)
Response
200 object
user_tokens list
The list containing all user_tokens
total_users number
Total number of enrollments
time_taken number
Inference time taken in seconds
400
The request was unacceptable, often due to a missing required parameter.
401
Session token is missing or invalid.
422
Face was not found on sent image.
415
The content type or encoding is not valid
Update User
Use this endpoint to update a face enrollment with a new face image.
It receives an user_token and an image file to extract the biometric data. The user_token must have already been created.
Headers
Authorization REQUIRED / string (jwt token)
Body
image_file string (binary)
user_token string
client_declaration_enduser_consent boolean (true/false)
Response
200 object
user_token string
The user_token of the updated enrollment
time_taken number
Inference time taken in seconds
400
The request was unacceptable, often due to a missing required parameter.
401
Session token is missing or invalid.
422
Face was not found on sent image.
415
The content type or encoding is not valid