Skip to main content

Face Match

Run Face Match

POST /verifications/{id}/face-match

Compares the uploaded selfie to the document photo.

Request:

curl -X POST https://api.dev.valydar.com/verifications/{id}/face-match \
-H "Authorization: Bearer YOUR_API_KEY"

Prerequisites:

  • Document uploaded via /verifications/{id}/documents
  • Selfie uploaded via /verifications/{id}/selfie

Response:

{
"passed": true,
"confidence": 0.87,
"threshold": 0.45,
"algorithm": "combined",
"document_face_detected": true,
"selfie_face_detected": true,
"document_face": {
"x": 120,
"y": 80,
"width": 200,
"height": 200
},
"selfie_face": {
"x": 150,
"y": 100,
"width": 180,
"height": 180
}
}
FieldTypeDescription
passedbooleanWhether faces match (confidence >= threshold)
confidencefloatMatch confidence (0.0 to 1.0)
thresholdfloatPass threshold (default: 0.45)
algorithmstringAlgorithm used (combined)
document_face_detectedbooleanWhether a face was found in document
selfie_face_detectedbooleanWhether a face was found in selfie
document_faceobjectDocument face bounding box (or null)
selfie_faceobjectSelfie face bounding box (or null)

Score Thresholds

ScoreMeaning
> 0.7High confidence match
0.45 - 0.7Match (above threshold)
< 0.45No match (below threshold)