Facematch
Compares extracted image from user’s personal document with the frame from the /process-video.
Authorization
This endpoint requires a API token as Bearer in the Authorization header. Go to Authorization guide for details.
Request (POST)
POST https://api.biometrysolutions.com/api-gateway/match-faces
Headers
- Authorization* - Your API Token.
- X-User-Fullname (If consent is given) - Pass the full name of end-user to process Voice and Face recognition services.
- X-Session-ID - Include the session ID to link transactions within a unified group.
- X-Use-Prefilled-Video - If this header is set to
true
, the video will be taken from the /process-video from the same session that provided theX-Session-ID
header.
Parameters
- video* (formData file) - Video file that you want to process. Required parameter. If
X-Use-Prefilled-Video
header is set totrue
, this parameter is not required. - image* (formData file) - Image of the desired person’s face or a scan of their passport (or driver’s license). The image should be in JPEG, PNG, or JPG format. Required parameter.
Responses
The object with data
and message
fields.
-
data
- Contains the results of facematch. It contains of details about the matching faces.anchor
- Contains the results of user’s document image.code
- Contains the code of the facematch result.percentages
- Contains the list of percentages of facematch fpr each frame in range from 0 to 100.result
- Contains the results of certain facematch. 1 if the faces match, 0 if they don’t.score
- Contains the score of the facematch in range from 0 to 100.target
- Contains the results of the video frame.
-
message
- Message with the status of face match.
Response sample:
{ "data": { "anchor": "object", "result": "float", "target": "object", }, "message": "string"}
Bad Request error object.
Response sample:
{ "error": "string"}
Internal server error object.
Response sample:
{ "error": "string"}
Sample
Request
Pass the video and image from your local machine to the --form
.
curl --location 'https://api.biometrysolutions.com/api-gateway/match-faces' \ --header 'X-User-Fullname: John Doe' \ --header 'Authorization: Bearer eyJhbGciO...ANYea8r2xOG-Urc' \ --form 'video=@"/[path to your file]/video.mp4"' \ --form 'image=@"/[path to your file]/image.jpg"' \
Response
{ "data": { "anchor": { "code": 0, "description": "Successful check" }, "code": 0, "description": "Successful check", "percentages": [66.12, 70.51, 75.62, 80.75, 85.12, 90.26, 95.34], "result": 1, "score": 95.12, "target": { "code": 0, "description": "Successful check" } }, "message": "faces match result is here"}