Face Liveness Check
curl --request POST \
--url https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/ \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"live_media": "<string>"
}
'import requests
url = "https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/"
payload = { "live_media": "<string>" }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({live_media: '<string>'})
};
fetch('https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'live_media' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/"
payload := strings.NewReader("{\n \"live_media\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"live_media\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"live_media\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"status": true,
"detail": "Liveliness Detected",
"response_code": "00",
"confidence": 0.968,
"confidence_in_percentage": 96.8,
"liveness_passed": true,
"verification": {
"status": "VERIFIED",
"reference": 76981
},
"widget_info": {},
"session": {}
},
"message": "Face Liveliness successful"
}Biometrics
Face Liveness Check
Verify that a submitted facial image belongs to a live person, not a photograph or pre-recorded video.
POST
/
api
/
onboarding
/
biometrics
/
face
/
liveliness_check
/
Face Liveness Check
curl --request POST \
--url https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/ \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"live_media": "<string>"
}
'import requests
url = "https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/"
payload = { "live_media": "<string>" }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({live_media: '<string>'})
};
fetch('https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'live_media' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/"
payload := strings.NewReader("{\n \"live_media\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"live_media\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"live_media\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"status": true,
"detail": "Liveliness Detected",
"response_code": "00",
"confidence": 0.968,
"confidence_in_percentage": 96.8,
"liveness_passed": true,
"verification": {
"status": "VERIFIED",
"reference": 76981
},
"widget_info": {},
"session": {}
},
"message": "Face Liveliness successful"
}The Face Liveness Check endpoint analyzes a submitted selfie — recommended as a short video, though a single photo is also accepted — to confirm it shows a live person, not a spoofed replay (a photo of a photo, a screen recording, etc.). It scores liveness directly; it does not compare the submission against any other image.
Both a video and a still photo are genuinely scored for liveness, so a still image works too — but a short video is the recommended submission, since motion gives the liveness check more to work with. The endpoint detects which was submitted from the file itself.
Endpoint
POST /api/onboarding/biometrics/face/liveliness_check/
Request
Headers
| Header | Value | Required |
|---|---|---|
x-access-token | Your API secret key | Yes |
Content-Type | application/json | Yes |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
live_media | string | Yes | URL of the short selfie video to check for liveness (recommended). Video formats: .mp4, .mov, .webm, .avi, .m4v — anything else is treated as a still image, which is also accepted. |
Example
curl -X POST "https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/" \
-H "x-access-token: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"live_media": "https://example.com/selfie_liveness.mp4"}'
Response
The HTTP status is
200 whenever the check ran to completion, regardless of whether liveness passed or failed — a failed liveness attempt is a normal, successful check outcome, not an error. Read status/data.status in the body to get the real verdict; a 400 means the request itself couldn’t be processed (missing field, unreadable file, authentication problem), not that liveness failed.200 OK — liveness passed
| Field | Type | Description |
|---|---|---|
data.status | boolean | true if liveness was detected, false otherwise |
data.detail | string | Human-readable result |
data.response_code | string | "00" on a pass, "01" on a fail |
data.confidence | number | Raw confidence score (0–1) |
data.confidence_in_percentage | number | Confidence as a percentage (0–100) |
data.liveness_passed | boolean | The underlying pass/fail verdict — the same value data.status is derived from |
data.verification.status | string | "VERIFIED" or "NOT_VERIFIED" |
data.verification.reference | number | Internal record ID for this check |
{
"status": "success",
"data": {
"status": true,
"detail": "Liveliness Detected",
"response_code": "00",
"confidence": 0.968,
"confidence_in_percentage": 96.8,
"liveness_passed": true,
"verification": {
"status": "VERIFIED",
"reference": 76981
},
"widget_info": {},
"session": {}
},
"message": "Face Liveliness successful"
}
200 OK — liveness failed (still a successful check)
{
"status": "failed",
"data": {
"status": false,
"detail": "Liveliness Not Detected",
"response_code": "01",
"confidence": 0.452,
"confidence_in_percentage": 45.2,
"liveness_passed": false,
"verification": {
"status": "NOT_VERIFIED",
"reference": 76982
},
"widget_info": {},
"session": {}
},
"message": "Liveness check failed"
}
400 Bad Request
Returned when the request itself couldn’t be processed — a missinglive_media field, an unreachable/unreadable URL, or an unexpected error from the underlying check.
{
"status": "failed",
"data": [],
"message": "live_media is required — provide the URL of the live selfie video or photo."
}
401 Unauthorized
{
"status": "failed",
"message": "Authentication credentials were not provided."
}
Authorizations
Your Adhere API secret key
Body
application/json
URL of the short selfie video to check for liveness (recommended — supported formats .mp4, .mov, .webm, .avi, .m4v). A still selfie photo is also accepted — anything that isn't one of those video formats is treated as a still image. Both a video and a still photo are genuinely scored for liveness; the endpoint detects which was submitted from the file itself.
Response
Liveness check ran to completion. Returned for both a pass and a fail — a failed liveness attempt is a normal, successful check outcome, not an error. Read data.status / data.liveness_passed for the real verdict.

