SprintCheck

Facial verification

Compare Faces

API key

Compares 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.

POSThttps://api.sprintcheck.megasprintlimited.com.ng/api/v1/compare-face

Authorization

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

  • image1stringrequired

    The first face image, Base64-encoded (JPEG or PNG).

    Example: base64_encoded_image_1

  • image2stringrequired

    The second face image, Base64-encoded (JPEG or PNG).

    Example: base64_encoded_image_2

POST /compare-face
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"
Response · 200
{
  "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.

POSThttps://api.sprintcheck.megasprintlimited.com.ng/api/v1/compare-face