Feel free to reach techsupport@surepass.io for any technical support or guidance.
liveness_score and antispoof_score per face, plus a configurable threshold for fine-tuned decisioning.Authorization HTTP header in the format:Authorization: Bearer <YOUR_JWT_TOKEN>| Environment | Base URL |
|---|---|
| Sandbox | https://sandbox.surepass.app |
| Production | https://kyc-api.surepass.app |
⚠️ Important: Sandbox and production environments use separate authentication tokens. Never use a production token against the sandbox endpoint or vice versa.
| Header | Required | Description |
|---|---|---|
Authorization | Yes | JWT Bearer token in the format Bearer <token> |
Content-Type | Yes | Must be multipart/form-data when uploading a file |
multipart/form-data. At least one of file or link is mandatory.| Parameter | Type | Required | Description |
|---|---|---|---|
file | File (binary) | Conditional | The image or PDF file to be analyzed. Must be sent as application/octet-stream. Required if link is not provided. |
link | String (URL) | Conditional | A publicly accessible URL pointing to the image to be analyzed. Required if file is not provided. |
use_pdf | Boolean | Conditional | Set to true when the input file is a PDF document. Only applicable for file uploads. |
{
"link": "https://example.com/path/to/face-image.jpg"
}| Parameter | Type | Description |
|---|---|---|
status_code | Integer | HTTP status code of the response (e.g., 200 for success). |
success | Boolean | true if the request was processed successfully, false otherwise. |
message | String | Human-readable status message (e.g., "Success"). |
message_code | String | Machine-readable status code (e.g., "success"). |
data | Object | Container object holding the liveness analysis result. |
data.client_id | String | A unique identifier assigned to this specific API request. |
data.detail | Object | The core analysis result object containing all liveness verdicts and face data. |
data.detail Fields| Parameter | Type | Description |
|---|---|---|
ok | Boolean | true if the API successfully analyzed the image without errors. |
live | Boolean | true if the primary detected face is determined to be a live person. |
verdict | String | Human-readable verdict for the primary face. Possible values: "live", "spoof". |
score | Float | The liveness confidence score for the primary face (0.0 – 1.0). Higher values indicate greater confidence of liveness. |
reason | String | Reason code associated with the verdict (e.g., "ok"). |
face_count | Integer | Total number of faces detected in the submitted image. |
threshold | Float | The liveness score threshold used to determine the verdict. Scores above this value are classified as live. |
frame | Object | Dimensions of the analyzed image frame. |
frame.width | Integer | Width of the input image in pixels. |
frame.height | Integer | Height of the input image in pixels. |
faces | Array | Array of face objects. Each element contains detection and liveness data for one detected face. |
faces[] Object Fields| Parameter | Type | Description |
|---|---|---|
bbox | Object | Bounding box of the detected face within the frame. |
bbox.x | Integer | X-coordinate (pixels) of the top-left corner of the bounding box. |
bbox.y | Integer | Y-coordinate (pixels) of the top-left corner of the bounding box. |
bbox.width | Integer | Width of the bounding box in pixels. |
bbox.height | Integer | Height of the bounding box in pixels. |
detection_score | Float | Confidence score for face detection (0.0 – 1.0). Higher values indicate a more confidently detected face. |
liveness_score | Float | Liveness confidence score for this specific face (0.0 – 1.0). |
antispoof_score | Float | Anti-spoofing confidence score for this face (0.0 – 1.0). Higher values indicate lower probability of a spoofing attempt. |
is_live | Boolean | true if this specific face passed the liveness check. |
{
"data": {
"client_id": "face_liveness_v5_YbookLSDhSoVRtsCRvtO",
"detail": {
"ok": true,
"live": true,
"verdict": "live",
"score": 0.833,
"reason": "ok",
"face_count": 1,
"threshold": 0.7,
"frame": {
"width": 1896,
"height": 2735
},
"faces": [
{
"bbox": {
"x": 609,
"y": 1009,
"width": 852,
"height": 853
},
"detection_score": 0.9995,
"liveness_score": 0.833,
"antispoof_score": 0.9978,
"is_live": true
}
]
}
},
"status_code": 200,
"success": true,
"message": "Success",
"message_code": "success"
}{
"status_code": 401,
"success": false,
"message": "Authentication credentials were not provided or are invalid.",
"message_code": "unauthorized"
}Authorization header is missing, malformed, or contains an expired/invalid JWT token. Ensure you are using the correct token for the target environment (sandbox vs. production).detection_score and failed analyses.threshold is 0.7. For high-security applications, consider raising the threshold. For more permissive flows, a lower value may improve conversion rates — always balance security and UX.live is false or face_count is 0, provide users with actionable feedback (e.g., "Please ensure your face is clearly visible and try again") rather than displaying raw error messages.face_count > 1, prompt the user to ensure only one person is in frame during the liveness check to avoid ambiguous verdicts.5xx errors.client_id, timestamps, and verdicts for a minimum period as required by your compliance framework to support audit and dispute resolution.curl --location 'https://kyc-api.surepass.app/api/v1/ocr/face-liveness-v5' \
--header 'Authorization: Bearer <token>' \
--form 'file=@""'{
"data": {
"client_id": "face_liveness_v5_YbookLSDhSoVRtsCRvtO",
"detail": {
"ok": true,
"live": true,
"verdict": "live",
"score": 0.833,
"reason": "ok",
"face_count": 1,
"threshold": 0.7,
"frame": {
"width": 1896,
"height": 2735
},
"faces": [
{
"bbox": {
"x": 609,
"y": 1009,
"width": 852,
"height": 853
},
"detection_score": 0.9995,
"liveness_score": 0.833,
"antispoof_score": 0.9978,
"is_live": true
}
]
}
},
"status_code": 200,
"success": true,
"message": "Success",
"message_code": "success"
}