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
Face Match Liveness

https://api.cloud.nodeflux.io/v1/analytics/face-match-liveness
Send a POST request to https://api.cloud.nodeflux.io/v1/analytics/face-match-liveness by providing these arguments as application/json. This endpoint allows you to run the liveness check and face matching process in one pipeline.
Request
Response
Request
Headers
Content-type
required
string
application/json
Authorization
required
string
"YOUR AUTHORIZATION KEY"
x-nodeflux-timestamp
required
string
"the x-nodeflux-timestamp from your authorization key"
Response
201: Created
HTTP Mapping
{
"job": {
"id": "a-very-long-job-id",
"result": {
"status": "success",
"analytic_type": "FACE_MATCH_LIVENESS",
"result": [
{
"face_liveness": {
"live": true,
"live_score": 0.845223
}
},
{
"face_match": {
"match": true,
"smimilarity": 0.94731
}
}
],
}
},
"message": "Job successfully submitted!",
"ok": true
}

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:

{
"images": [
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_KTP}",
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_YOUR_SELFIE}"
]
}

Follow the example here:

{
"images": [
"data:image/jpeg;base64,iVB\
ORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEU\
AAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8\
yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAEl\
FTkSuQmCC",
"data:image/jpeg;base64,iVB\
isdjnjOOJNBVSUhEUgAOSKSIACOEAAAQAQMAAAAlPW0iAAAABlBMVEU\
AAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8\
yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/ASKOASKDOKASNASLNKL\
FTkSuQmCC"
]
}

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