Face Comparison

Step 1 of 3
1
Source
2
Target
3
Analyze

Source Identification

The primary biometric signature used for verification.

menu_bookAPI reference: Face Comparisonexpand_more

Official docs: docs.verifik.co/biometrics/compare

Verifik's public pages may describe extra fields for other environments. This HumanAuthn demo calls the OpenCV route that accepts gallery, probe, and optional compare_min_score only.

POST /v2/face-recognition/compare

Compares probe image(s) to gallery image(s) and returns a similarity score. The backend sets passed when the score meets your compare_min_score (or the server default when omitted).

HeaderValue
Content-Typeapplication/json
AuthorizationBearer <token>
ParamTypeReqDescription
gallerystring[]YesReference face(s), base64 (no data URL prefix)
probestring[]YesFace(s) to match, base64
compare_min_scorenumberNo0.67 to 0.95. Server default 0.85 when omitted
await fetch("https://api.verifik.co/v2/face-recognition/compare", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${accessToken}`,
  },
  body: JSON.stringify({
    gallery: ["<base64>"],
    probe: ["<base64>"],
    compare_min_score: 0.85,
  }),
});
// 200 OK, example shape
{
  "id": "…",
  "data": {
    "result": {
      "score": 0.91,
      "compare_min_score": 0.85,
      "passed": true
    },
    "compare_min_score": 0.85
  },
  "signature": {
    "message": "Certified by Verifik.co",
    "dateTime": "…"
  }
}
  • Images must be real base64 payloads. Very short strings are rejected (for example 412:only_images_in_base64).
  • The Compare minimum score slider sets compare_min_score on the request (0.67 to 0.95; starts at the API client default 0.85).
  • Responses often include id and a signature block alongside data.