Skip to content

Verification

The v1 process-video endpoint has been split, in API v2, into three focused verification endpoints:

EndpointPurposeServices
POST /v2/livenessAnti-spoof / liveness on a captured videoFace Liveness Detection, Active Speaker Detection, Visual Speech Recognition
POST /v2/face-verifyVerify a face against the user’s enrolled templateFace Recognition
POST /v2/voice-verifyVerify a voice against the user’s enrolled templateVoice Recognition

All three take an opaque user_id and the spoken phrase in the JSON request part (see API Calls), plus a media file. They return the standard success envelope, and — when a scoring system is configured for your API key — a decision object.

Requirements for the video

The user records a short video where they show their face and say a set of numbers out loud. The services compare the numbers in the phrase field with what the user says in the video.

Authorization

These endpoints require an API token as Bearer in the Authorization header. Go to Authorization guide for details.


Liveness

Request

POST https://api.biometrysolutions.com/api-gateway/v2/liveness

request part fields

FieldTypeDescription
user_id*stringOpaque, customer-provided identity key.
phrase*stringSet of numbers the user says out loud in the video.
session_idstringOptional. Link this transaction to a session.
triggerstringOptional. Contextual trigger event name (e.g. authentication).
vocabularystringOptional. Speech-recognition vocabulary; defaults to en_digits.
services.excludestring[]Optional. Services to skip: face_liveness_detection, active_speaker_detection, visual_speech_recognition, face_recognition, voice_recognition.

File parts

  • video* (formData file) — the captured video.

Sample

curl --location 'https://api.biometrysolutions.com/api-gateway/v2/liveness' \
--header 'Authorization: Bearer eyJhbGciO...ANYea8r2xOG-Urc' \
--form 'request={"user_id":"user-123","phrase":"one two three four five six seven eight"}' \
--form 'video=@"/[path to your file]/video.mp4"'
{
"data": {
"face_liveness_detection": { "code": 0, "description": "Successful check", "result": true, "score": 76.65 },
"active_speaker_detection": { "code": 0, "description": "Successful check", "result": 97.79, "score": 98.77 },
"visual_speech_recognition": { "code": 0, "description": "Successful check", "result": "ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT", "score": 88.64 }
},
"decision": { "status": "pass", "score": 0.91, "reasons": [] },
"meta": { "request_id": "fc5605c5-...-87cc-979cd72564d4", "message": "liveness analysis complete" }
}

Face verification

Verifies the face in the video/image against the user’s enrolled face template. The user must have been enrolled first via Face Enrollment.

Request

POST https://api.biometrysolutions.com/api-gateway/v2/face-verify

request part fields

FieldTypeDescription
user_id*stringOpaque, customer-provided identity key.
phrase*stringSet of numbers the user says out loud.
session_idstringOptional. Reuse the session’s stored video by omitting the video part and setting use_session_video.
use_session_videobooleanOptional. Reuse the video captured earlier in the session instead of uploading one.

File parts

  • video (formData file) — required unless use_session_video is true.
{
"data": { "face_recognition": { "code": 0, "description": "Successful check", "score": 61.52 } },
"decision": { "status": "pass", "score": 0.88, "reasons": [] },
"meta": { "request_id": "fc5605c5-...", "message": "face verification completed" }
}

Voice verification

Verifies the voice against the user’s enrolled voice template (see Voice Enrollment).

Request

POST https://api.biometrysolutions.com/api-gateway/v2/voice-verify

request part fields

Same as face verification (user_id, phrase, session_id, use_session_video).

File parts

  • voice (formData file) — audio/video containing the user’s speech. Required unless use_session_video is true.
{
"data": { "voice_recognition": { "status": "good", "id": "user-123", "score": 0.99, "imposter_prob": 0.01, "log_odds": "1.0" } },
"decision": { "status": "pass", "score": 0.95, "reasons": [] },
"meta": { "request_id": "fc5605c5-...", "message": "voice verification completed" }
}

Error responses

{ "error": { "code": "invalid_request", "message": "user_id is required" }, "meta": {} }