Facial verification
Compare Faces
API keyCompares two facial images to confirm they belong to the same person — typically a live capture against the photo on an identity record. Returns a match verdict and the distance between the two faces.
POST
https://api.sprintcheck.megasprintlimited.com.ng/api/v1/compare-faceAuthorization
Send your secret API key in the Authorization header. Keys are issued per business — find them under Developers in your dashboard.
Authorization: <api_key>Parameters
Body parameters
image1stringrequiredThe first face image, Base64-encoded (JPEG or PNG).
Example: base64_encoded_image_1
image2stringrequiredThe second face image, Base64-encoded (JPEG or PNG).
Example: base64_encoded_image_2
PAYLOAD='{
"image1": "base64_encoded_image_1",
"image2": "base64_encoded_image_2"
}'
SIGNATURE=$(printf '%s' "$PAYLOAD" | tr -d '[:space:]' \
| openssl dgst -sha512 -hmac "$SPRINTCHECK_ENCRYPTION_KEY" \
| awk '{print $NF}')
curl -X POST "https://api.sprintcheck.megasprintlimited.com.ng/api/v1/compare-face" \
-H "Authorization: $SPRINTCHECK_API_KEY" \
-H "signature: $SIGNATURE" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"{
"success": 1,
"message": "Matched Successfully",
"data": {
"distance": 0,
"verified": true,
"threshold": 0.4,
"facial_areas": {
"img1": {
"h": 935,
"w": 707,
"x": 172,
"y": 376,
"left_eye": [
687,
713
],
"right_eye": [
346,
721
]
},
"img2": {
"h": 935,
"w": 707,
"x": 172,
"y": 376,
"left_eye": [
687,
713
],
"right_eye": [
346,
721
]
}
}
}
}Representative example — field values are illustrative.
Test this endpoint
Simulated run — returns the example payload without calling the live API.