1
SourceReference only2
TargetLiveness here3
AnalyzeSource · Reference only
Source is sent as gallery for face comparison.
Liveness does not use Source. It runs on Target in the next step.
menu_bookAPI reference: Compare with livenessexpand_more
Official docs: docs.verifik.co/biometrics/compare-with-liveness
POST /v2/face-recognition/compare-with-liveness
Compare first; if the face score meets compare_min_score (or it is omitted), liveness runs on the probe image against liveness_min_score.
| Header | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
In this demo, Source is the gallery image (step 1). Target is the probe (step 2). You can optionally detect the largest face in the Source and crop the image to that region in the browser before sending. The Target image is not cropped here. Server integrations may also support cropping via cropFace.
| Param | Type | Req | Description |
|---|---|---|---|
| probe | string | Yes | Base64 live capture |
| gallery | string[] | Yes | Reference images (base64; https URLs supported server-side) |
| liveness_min_score | number | No | Default 0.6 if omitted |
| compare_min_score | number | No | 0.67 to 0.95, optional threshold |
// 200 OK, example response shape
{
"data": {
"comparison": { "score": 0.88 },
"liveness": {
"liveness_score": 0.91,
"min_score": 0.6,
"passed": true
}
}
}- Comparison runs first; liveness on probe only if compare passes your threshold (or threshold omitted).
liveness_min_scoredefaults to 0.6 when not sent.- Gallery may use https URLs; the service fetches and converts them.