1. Home
  2. APIs
  3. Face & documents

Face match API

Compare a selfie with the photo on an ID.

Mode: Instant
Checked against: Yetlix face model

Overview

Send two images: a live selfie and an ID photo (or the photo from Aadhaar e-KYC). You get a similarity score and a clear match / no-match decision at the threshold you choose.

POST/v1/face/match

Where it’s used

  • Video-less digital KYC
  • Account recovery
  • Gig worker identity at shift start

How the check runs

  1. You send two images: a selfie and a reference photo (ID card, Aadhaar e-KYC photo, DL photo).
  2. We detect faces in both, check image quality and align them.
  3. Our model compares the faces and returns a similarity score.
  4. We apply your threshold to give a MATCH / NO_MATCH result.

Request

FieldDescription
selfieImage, base64 or URL
id_photoImage, base64 or URL
thresholdOptional. Default 75
curl -X POST https://api.yetlix.com/v1/face/match \
  -H "x-client-id: $YETLIX_CLIENT_ID" \
  -H "x-client-secret: $YETLIX_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"selfie":"data:image/jpeg;base64,/9j/4AAQ…","id_photo":"https://cdn.example.com/kyc/aadhaar-photo.jpg","threshold":75}'

Response fields

Inside the data object. The envelope (status, request_id, billable, timestamp) is the same for every API and is described in the docs.

FieldTypeMeaning
scorenumber0–100 similarity.
resultenumMATCH or NO_MATCH at your threshold.
faces_detectedobjectNumber of faces found in each image. Anything other than 1 should be rejected.
warningsarraye.g. LOW_LIGHT, BLURRY, FACE_TOO_SMALL, EYES_CLOSED, MULTIPLE_FACES.

Outcomes and what to do

Every check can end in a handful of ways. Decide up front what your product does in each case, so nothing falls through to a support ticket.

MATCH, no warnings

Same person.

Do this: Approve.

NO_MATCH

Different person or a very poor image.

Do this: Retry once with guidance, then manual review.

warnings present

Poor image.

Do this: Ask the user to retake with better light.

Sandbox test values

Send these values in threshold with your sandbox key to get each result. Anything else returns INVALID_INPUT in sandbox.

ValueReturns
75Match (score 91.4)
95Below a strict threshold

Run these in the playground

Best practices

  • Start with a threshold of 75 and tune it on your own data. Old ID photos score lower.
  • Always pair with Liveness. Face match alone can be fooled by a photo of a photo.
  • Guide users before capture: good light, no glasses or masks, face filling the oval.

Compliance note. Face images are biometric-adjacent personal data. Tell users why you capture the selfie and how long you keep it.

Frequently asked

What image size should I send?

At least 480 px on the short side, under 2 MB, JPEG or PNG.

Often used with