Face Match with Liveness
Face match with liveness is an analytics to compare a real-time self-portrait photo (selfie) with a reference photo. The output from this process is 2 output consist of the liveness check result and the percentages of similarity result.
post
https://api.cloud.nodeflux.io
/v1/analytics/face-match-liveness
Face Match Liveness

Request Body

Note for image input:
    Maximum allowed image file size is 2 MB per image
    The image should be represented in base64 data based on a.JPG format. You can use any online jpg-to-base64 encoder to get the base64 data.
    Please provide exactly 2 images and ensure arranged in the correct order as: Image of the Identity Card (IC) or known as well as KTP, and Self-portrait (Selfie) image of the KTP's owner and please ensure only a single face is presented on the frame.
For more detail about image configuration please check the page Image Configuration Guideline.
Your request body should follow this format:
Required Field
All Fields
1
{
2
"images": [
3
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_KTP}",
4
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_YOUR_SELFIE}"
5
]
6
}
Copied!
1
{
2
"additional_params": {
3
"similarity_threshold": 0.85,
4
"liveness_threshold": 0.85,
5
"auto_orientation": false,
6
"get_main_face": true
7
},
8
9
"images": [
10
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_KTP}",
11
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_YOUR_SELFIE}"
12
],
13
"client_ref": "client234"
14
}
Copied!
Key
Type
Details
Compulsory
images
array of a URI base64 image
This parameter containing 2 indexes base64 image JPEG with URI format
required
similarity_threshold
float
This value is to set the face matching threshold, to define the face whether match or not match. You can fill it with a float between 0 to 1. The default value is 0.7.
optional
liveness_threshold
float
This value is to set the face liveness threshold to define the face is real or spoof. You can fill it with a float between 0 to 1. The default value is 0.6.
optional
auto_orientation
boolean
This parameter helps you to adjust image orientation. The default is false, to activate please fill it with true
optional
get_main_face
boolean
This parameter helps you to filter the main face, it will take the bigger face on the frame to prevent multiple face detection. To activate this feature please fill the parameter with true.
optional
client_ref
string
Valid input only alphanumeric with minimum length is 6 digits and the maximum is 128 digits. The client_ref will be returned on the request. The client_ref should be unique.
optional
Follow the example here:
1
{
2
"images": [
3
"data:image/jpeg;base64,iVB\
4
ORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEU\
5
AAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8\
6
yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAEl\
7
FTkSuQmCC",
8
"data:image/jpeg;base64,iVB\
9
isdjnjOOJNBVSUhEUgAOSKSIACOEAAAQAQMAAAAlPW0iAAAABlBMVEU\
10
AAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8\
11
yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/ASKOASKDOKASNASLNKL\
12
FTkSuQmCC"
13
]
14
}
Copied!
The base64 encoded jpeg string should follow the data URI scheme format. See below:
data:[<media type>][;base64],<data>
Valid base64 encoded jpeg string example:
data:image/jpeg;base64,iVB ORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEU AAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8 yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAEl FTkSuQmCC

Error Message

Error
Error Response
Explanation
No face detected
{
"job_id": "hex",
"status": 417,
"message": "No face detected",
"result": []
}
It's caused by selfie image too blurry so that the face detection can not verify the image
Multiple faces are detected
{
"job_id": "hex",
"status": 417,
"message": "Multiple faces are detected",
"result": []
}
There are more than one image is detected
Face landmark does not meet the criteria
{
"job_id": "hex",
"status": 417,
"message": "Face landmark does not meet the criteria",
"result": []
}
Face landmark is not detected because no face detected
No image required
{
"code": "invalid-argument",
"errors": [
"images cannot be empty"
],
"message": "Required field(s) is not supplied or having an invalid type please check again",
"ok": false
}
No image is detected on the parameter
Parameter Missing or Invalid
{
"job": {
"id": <job_id>,
"result": {
"status": "incompleted",
"analytic_type": "FACE_LIVENESS",
"result": []
}
},
"message": "Parameter Missing or Invalid",
"ok": false
}
missing required parameter
Broken Base64
{
"code": "bad-request",
"errors": [
"unexpected EOF"
],
"message": "Error on image decoding process",
"ok": false
}
Wrong Base64 encode
Invalid Token
{"code":"not-authenticate","errors":[],"message":"Invalid HMAC Token","ok":false}
Wrong authorization token
Image size is exceeded
{
"job_id": "hex",
"status": 417,
"message": "Please re-check your image file size",
"result": []
}
Image size is too large
Every response which returns job_id is charged by our system.
Last modified 14d ago