Face match API
Compare a selfie with the photo on an ID.
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
- You send two images: a selfie and a reference photo (ID card, Aadhaar e-KYC photo, DL photo).
- We detect faces in both, check image quality and align them.
- Our model compares the faces and returns a similarity score.
- We apply your threshold to give a MATCH / NO_MATCH result.
Request
| Field | Description |
|---|---|
selfie | Image, base64 or URL |
id_photo | Image, base64 or URL |
threshold | Optional. 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}'
{
"status": "success",
"request_id": "req_7Hq2kD91",
"data": {
"score": 91.4,
"result": "MATCH",
"faces_detected": {
"selfie": 1,
"id_photo": 1
},
"warnings": []
}
}
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.
| Field | Type | Meaning |
|---|---|---|
score | number | 0–100 similarity. |
result | enum | MATCH or NO_MATCH at your threshold. |
faces_detected | object | Number of faces found in each image. Anything other than 1 should be rejected. |
warnings | array | e.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.
| Value | Returns |
|---|---|
75 | Match (score 91.4) |
95 | Below a strict threshold |
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.