This endpoint accepts a single selfie image (Base64) and returns a liveness probability score plus face detection details. A liveness probability above 50 indicates that a real person was present; below that, the image may be a photo, print, or screen. Use the response to decide whether to allow the user to continue in your flow or to require a retry.Documentation Index
Fetch the complete documentation index at: https://docs.dojah.io/llms.txt
Use this file to discover all available pages before exploring further.
Request
[POST]
Header
| Header | Type | Description |
|---|---|---|
| AppId | string | Create an app to get your app ID on dashboard here |
| Authorization | string | Private/secret key. Use <key> not Bearer <key> |
Body parameter
| Parameter | Type | Description | Required |
|---|---|---|---|
| image | string | Image format should be in Base64 | required |
liveness_probability above 50 means liveness is confirmed.Response
Response
Response Fields
| Field | Type | Description |
|---|---|---|
| entity | object | Contains the response data |
| entity.liveness | object | Liveness detection results |
| entity.liveness.liveness_check | boolean | Whether the face passed the liveness check (true if liveness_probability > 50) |
| entity.liveness.liveness_probability | number | Probability score (0โ100) that the image contains a live person. Values above 50 indicate a real person; below 50 suggests a photo, print, or screen |
| entity.face | object | Face detection results and attributes |
| entity.face.face_detected | boolean | Whether a face was detected in the image |
| entity.face.message | string | Human-readable face detection status message |
| entity.face.multiface_detected | boolean | Whether multiple faces were detected in the image |
| entity.face.details | object | Detailed face attributes extracted from the image |
| entity.face.details.age_range | object | Estimated age range of the detected face |
| entity.face.details.age_range.low | integer | Lower bound of the estimated age |
| entity.face.details.age_range.high | integer | Upper bound of the estimated age |
| entity.face.details.smile | object | Smile detection result |
| entity.face.details.smile.value | boolean | Whether the person is smiling |
| entity.face.details.smile.confidence | number | Confidence score (0โ100) for the smile detection |
| entity.face.details.gender | object | Gender classification result |
| entity.face.details.gender.value | string | Detected gender (e.g., Male, Female) |
| entity.face.details.gender.confidence | number | Confidence score (0โ100) for the gender classification |
| entity.face.details.eyeglasses | object | Eyeglasses detection result |
| entity.face.details.eyeglasses.value | boolean | Whether the person is wearing eyeglasses |
| entity.face.details.eyeglasses.confidence | number | Confidence score (0โ100) for eyeglasses detection |
| entity.face.details.sunglasses | object | Sunglasses detection result |
| entity.face.details.sunglasses.value | boolean | Whether the person is wearing sunglasses |
| entity.face.details.sunglasses.confidence | number | Confidence score (0โ100) for sunglasses detection |
| entity.face.details.beard | object | Beard detection result |
| entity.face.details.beard.value | boolean | Whether the person has a beard |
| entity.face.details.beard.confidence | number | Confidence score (0โ100) for beard detection |
| entity.face.details.mustache | object | Mustache detection result |
| entity.face.details.mustache.value | boolean | Whether the person has a mustache |
| entity.face.details.mustache.confidence | number | Confidence score (0โ100) for mustache detection |
| entity.face.details.eyes_open | object | Eyes open detection result |
| entity.face.details.eyes_open.value | boolean | Whether the personโs eyes are open |
| entity.face.details.eyes_open.confidence | number | Confidence score (0โ100) for eyes open detection |
| entity.face.details.mouth_open | object | Mouth open detection result |
| entity.face.details.mouth_open.value | boolean | Whether the personโs mouth is open |
| entity.face.details.mouth_open.confidence | number | Confidence score (0โ100) for mouth open detection |
| entity.face.details.emotions | array | List of detected emotions ranked by confidence |
| entity.face.details.emotions[].type | string | Emotion type (e.g., CALM, HAPPY, SAD, ANGRY, SURPRISED, DISGUSTED, FEAR, CONFUSED) |
| entity.face.details.emotions[].confidence | number | Confidence score (0โ100) for the detected emotion |
| entity.face.quality | object | Image quality metrics for the detected face |
| entity.face.quality.brightness | number | Brightness score (0โ100) of the face region |
| entity.face.quality.sharpness | number | Sharpness score (0โ100) of the face region |
| entity.face.confidence | number | Overall confidence score (0โ100) that a face is present in the image |
| entity.face.bounding_box | object | Coordinates of the face bounding box as proportions of the image dimensions |
| entity.face.bounding_box.width | number | Width of the bounding box as a ratio (0โ1) of the image width |
| entity.face.bounding_box.height | number | Height of the bounding box as a ratio (0โ1) of the image height |
| entity.face.bounding_box.left | number | Left edge position as a ratio (0โ1) from the left side of the image |
| entity.face.bounding_box.top | number | Top edge position as a ratio (0โ1) from the top of the image |