Face Comparison

This endpoint allows you to compare two facial images for verification purposes.

Endpoint: POST {baseurl}/v1/api/verification/face-comparison

Request Body

Parameter Type Required Description
reference string Yes A unique reference for the verification request.
customer string No ID of the customer (optional).
verificationGroup string No ID of the verification group (optional).
sourceImage string Yes Base64 encoded source image for comparison.
targetImage string Yes Base64 encoded target image for comparison.
similarityThreshold number Yes Acceptable threshold for both face comparison.

Sample Request

curl -X 'POST' \
  '{baseurl}/v1/api/verification/face-comparison' \
  -H 'accept: application/json' \
  -H 'x-api-key: {API-KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
  "reference": "09876543567890000002020008006",
  "customer": "68922a8c839016cfca2ff038",
  "verificationGroup": "68ada27c2e94452b66f779b0",
  "sourceImage": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
  "targetImage": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
  "similarityThreshold": 70
}'

Sample Response

{
  "statusCode": 200,
  "responseCode": "SUCCESS",
  "isValid": true,
  "data": {
    "isMatch": true,
    "similarity": 92.7,
    "confidence": 99.1,
    "matchDetails": {
      "boundingBox": {
        "width": 0.31,
        "top": 0.18,
        "left": 0.27,
        "height": 0.33
      },
      "quality": {
        "sharpness": 98.2,
        "brightness": 72.4
      }
    }
  },
  "referenceId": "cmp_123456789",
  "timeStamp": "2025-11-11T13:45:12.345Z"
}