Send a POST request to https://api.cloud.nodeflux.io/v1/analytics/face-liveness by providing these arguments as application/json.
"job": {"id": "a-very-long-job-id","result": {"status": "success","analytic_type": "FACE_LIVENESS","result": [{"face_liveness": {"live": true,"liveness": 0.8966461420059204}}]}},"message": "Job successfully submitted!","ok": true}
Note for image input:
The maximum allowed image file size is 1 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 a self-portrait or selfie image and make sure 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_YOUR_SELFIE}"]}
Please follow this example:
{"images": ["data:image/jpeg;base64,iVB\ORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEU\AAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8\yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAEl\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