Face Match
2 endpoints · Core API
This API is designed to compare faces captured in various KYC documents or photographs, enabling organizations to conduct thorough identity verification processes. By leveraging advanced facial recognition technology, it performs precise comparisons across different sources, ensuring accurate matching of individuals' identities. This capability is particularly valuable in scenarios where multiple documents or photographs need to be cross-referenced to confirm an individual's identity with a high degree of reliability. By facilitating seamless integration into existing systems, this API streamlines identity verification workflows, enhances security measures, and reduces the risk of fraudulent activities. Ultimately, it empowers organizations to maintain robust KYC processes, comply with regulatory requirements, and safeguard against identity theft and unauthorized access.
What you can do
This API compares faces across multiple KYC documents or photographs, facilitating accurate identity verification and ensuring reliable matching of individuals across different sources.
Get Face Match details
Compares the face in image1B64 with the face in image2B64. The match threshold is fixed and cannot be set in this request; use the verify endpoint if you need to set a similarity threshold.
Headers
- X-API-KEYstringrequiredYour secret API key for the environment you are calling (Stage and Live use different keys).
- X-API-APP-IDstringrequiredThe App ID issued together with the key.
- Content-Typestringrequiredapplication/json
Body parameters
application/json- image1B64stringrequiredRequired. Base64-encoded first image (a JPEG or PNG photo with a clearly visible face). Send the raw Base64 string without a data: prefix.minLength 1pattern ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2…default SGVsbG8gV29ybGQ=
- image2B64stringrequiredRequired. Base64-encoded second image to compare with the first (a JPEG or PNG photo with a clearly visible face). Send the raw Base64 string without a data: prefix.minLength 1pattern ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2…default SGVsbG8gV29ybGQ=
- getNumberOfFacesbooleanoptionalOptional. Boolean, default false. Set to true to also receive the number of faces found in each image in faceProperties.default false
- requestIdstringoptionalOptional. Your own reference for the request. Note the camelCase name (requestId), unlike the request_id used by most other APIs. A new one is generated when omitted.nullable
Sample request body
Responses
200OK
- successbooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 200
- messagestringoptionalNo description.nullabledefault XXXXX
- dataobjectoptionalResponse model containing face match comparison results.
5 fields
- matchstringoptionalIndicates whether the faces in the two images match.nullable
- matchScorenumber (double)optionalNumeric score indicating the degree of similarity between the two faces.
- reviewNeededstringoptionalIndicates whether manual review is recommended for the match result.nullable
- confidencenumber (double)optionalConfidence level of the face match determination.
- facePropertiesobjectoptionalNo description.
2 fields
- image1objectoptionalNo description.
1 field
- numberOfFacesinteger (int32)optionalNo description.
- image2objectoptionalNo description.
1 field
- numberOfFacesinteger (int32)optionalNo description.
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- isBillablebooleanoptionalWhether this request was charged: true if it was, false if not. Errors always show false. Flows that finish later (ITR Fetch, SHCIL eStamp, DigiLocker, eSign) show false here, because the charge is made when the result is ready. eSign charges each signer when they complete signing. DigiLocker deducts the credit when the link is created and refunds it automatically if the link expires before the user completes it.
400Bad Request
- dataobjectoptionalNo description.
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- successbooleanoptionalNo description.default false
- messagestringoptionalNo description.nullabledefault XXXXX
- isBillablebooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 400
401Unauthorized
- dataobjectoptionalNo description.
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- successbooleanoptionalNo description.default false
- messagestringoptionalNo description.nullabledefault XXXXX
- isBillablebooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 401
500Internal Server Error
- dataobjectoptionalNo description.
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- successbooleanoptionalNo description.default false
- messagestringoptionalNo description.nullabledefault XXXXX
- isBillablebooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 500
Code samplescurl · Node.js · Python
Verify a person's identity by comparing an live photo against any documents photo
Compares the face in source_image with the face in target_image. Pass an optional similarity_threshold (0–100) to control match strictness. Defaults to 70 if not provided.
Possible Results (match field):
yes: Faces match above the thresholdno: Faces do not matcherror: Image quality issue or no face detected
Error Messages:
No Face Detected: No detectable face found in one or both imagesLow Image Quality: Image format is invalid or image is too large
Headers
- X-API-KEYstringrequiredYour secret API key for the environment you are calling (Stage and Live use different keys).
- X-API-APP-IDstringrequiredThe App ID issued together with the key.
- Content-Typestringrequiredapplication/json
Body parameters
application/json- consentstringrequiredRequired. The end user's consent to this verification. Send `Y`.minLength 1default Y
- consent_textstringrequiredRequired. The consent statement shown to the end user. Send the default text from the sample.minLength 1default I hear by declare my consent agreeme…
- request_idstringoptionalOptional. Your own id to correlate this call in your logs. A unique id is generated if you leave it out.nullable
- source_imagestringrequiredRequired. Base64-encoded source image, for example the photo from an ID document (JPEG or PNG). Send the raw Base64 string without a data: prefix.minLength 1
- target_imagestringrequiredRequired. Base64-encoded target image to compare with the source image, for example a live selfie (JPEG or PNG). Send the raw Base64 string without a data: prefix.minLength 1
- similarity_thresholdnumber (float)optionalOptional. Minimum similarity score, from 0 to 100, for the faces to count as a match. Defaults to 70 when omitted.nullable
Sample request body
Responses
200OK
- successbooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 200
- messagestringoptionalNo description.nullabledefault XXXXX
- dataobjectoptionalNo description.
7 fields
- matchstringoptional"yes" if faces match above threshold, "no" otherwisenullable
- matchScorenumber (float)optionalSimilarity score (0-100). Null when faces do not match or on error.nullable
- reviewNeededstringoptional"yes" if score is borderline close to threshold and manual review is advised, "no" otherwisenullable
- confidencenumber (float)optionalFace detection confidence (0-100). Available for both matched and unmatched cases.nullable
- brightnessnumber (float)optionalImage brightness score (0-100). Null on error.nullable
- sharpnessnumber (float)optionalImage sharpness score (0-100). Null on error.nullable
- errorMessagestringoptionalError code for edge cases: "No Face Detected" | "Low Image Quality"nullable
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- isBillablebooleanoptionalWhether this request was charged: true if it was, false if not. Errors always show false. Flows that finish later (ITR Fetch, SHCIL eStamp, DigiLocker, eSign) show false here, because the charge is made when the result is ready. eSign charges each signer when they complete signing. DigiLocker deducts the credit when the link is created and refunds it automatically if the link expires before the user completes it.
400Bad Request
- dataobjectoptionalNo description.
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- successbooleanoptionalNo description.default false
- messagestringoptionalNo description.nullabledefault XXXXX
- isBillablebooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 400
401Unauthorized
- dataobjectoptionalNo description.
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- successbooleanoptionalNo description.default false
- messagestringoptionalNo description.nullabledefault XXXXX
- isBillablebooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 401
500Internal Server Error
- dataobjectoptionalNo description.
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- successbooleanoptionalNo description.default false
- messagestringoptionalNo description.nullabledefault XXXXX
- isBillablebooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 500