Skip to main content

Liveness Score

Endpoint

POST https://api.verifik.co/v2/face-recognition/liveness-score

Returns a liveness score and pass/fail outcome for a single face image using Verifik’s presentation attack detection (PAD) stack. Use this when you need the score-focused liveness contract.

API stability: This is a production public endpoint. Request and response contracts follow Verifik’s standard API change and deprecation policy. Billing uses the same AppFeature as POST /v2/face-recognition/liveness.

vs /liveness

POST .../livenessPOST .../liveness-score
UseStandard liveness detectionScore-focused liveness response
BillingLiveness AppFeatureSame liveness AppFeature (path rewritten for credits)
Bodyos, image, optional collection_id, liveness_min_scoreSame

Presentation attack detection (PAD)

Verifik’s face liveness (including this endpoint and /liveness) uses our biometric stack with presentation attack detection (PAD). Liveness is iBeta Level 2 certified and aligned with ISO 30107 Level 1 and Level 2. It is designed to detect common spoofing vectors such as printed photos, video replay, and 3D masks, using a single-image liveness check.

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Params

NameTypeRequiredDescription
osstringYesOrigin of capture. Suggested: DESKTOP, IOS, ANDROID.
imagestringYesBase64 image data (data URI or raw base64). If an https URL is provided, it will be downloaded and converted internally.
collection_idstringNoOptional collection to associate with the liveness attempt.
liveness_min_scorenumberNoThreshold for pass/fail. Default: 0.6.

Request

const fetch = require("node-fetch");

async function run() {
const res = await fetch("https://api.verifik.co/v2/face-recognition/liveness-score", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
body: JSON.stringify({
os: "DESKTOP",
image: "<base64 or https url>",
liveness_min_score: 0.6,
}),
});
console.log(await res.json());
}

run();

Response

{
"id": "JQ4RM",
"data": {
"passed": true,
"min_score": 0.6,
"liveness_score": 0.98
},
"signature": {
"message": "Certified by Verifik.co",
"dateTime": "January 16, 2024 3:44 PM"
}
}

Notes

  • Ensure Authorization: Bearer <token> is present; otherwise you will receive 401/403.
  • image may be base64 or an https URL. If URL, the service fetches and converts it internally.
  • Pass/fail is determined by liveness_score > min_score (default min_score is 0.6, configurable via liveness_min_score).
  • Credits are charged against the same feature as /liveness.
  • Optional collection_id is validated for the authenticated client.