Skip to main content

Face Match (1:1)

Within FACIA, the Face Match service takes center stage as a dynamic endpoint, propelling transaction requests into the realm of facial matching algorithms. This innovative algorithm meticulously evaluates the likeness between a Selfie (Photo) and either a Document or another Selfie (Photo), adopting a seamless 1:1 matching approach.

Create Face Match Transaction​

This endpoint initiates a transaction request for the face match algorithm, serving as a 1:1 service. The endpoint accepts three fields in the request payload, as mentioned in the request parameters.

Endpoint

POSThttps://api.facia.ai/face-match

Authorization:​

Token Type: Bearer
Description:

This API utilizes Access token or Client-Secret key in header for authentication.

You can use your client_id and client_secret key when using the "/request-access-token" endpoint to obtain a Bearer token for authorization while connecting to this API. For additional details on Authorization, click Here

Run in Postman

Request Body Samples:​

//POST /face-match  HTTP/1.1
//Host: https://api.facia.ai
//Content-Type: application/json
//client-secret: <your client_secret key>

{
"type": "photo_id_match",
"face_frame": "data:image/png;base64,your_image_base64_here",
"id_frame": "data:image/png;base64,your_image_base64_here",
"client_reference": "your_client_reference_here",
"allow_override": 0,
"enroll_face":true
}

Request Parameter​

ParametersDescription
type Required: Yes
Type: string
Example: type=photo_id_match
The type must be "photo_id_match".
face_frameRequired: Yes
Type: file or string
multipart/form-data: the image file (.jpg, .jpeg, .png).
application/json: a Base64 data URI including the prefix, e.g. data:image/jpeg;base64,/9j/4AAQ.... Plain Base64 without the data:image/...;base64, prefix is rejected.
The live face (selfie) image.
id_frameRequired: Yes
Type: file or string
multipart/form-data: the image file (.jpg, .jpeg, .png).
application/json: a Base64 data URI including the prefix, e.g. data:image/jpeg;base64,/9j/4AAQ.... Plain Base64 without the data:image/...;base64, prefix is rejected.
The ID document image.
client_reference Required: No
Type: string
Minimum: 5 characters
Maximum: 255 characters
Example: client_reference="your_client_reference_here"
Required if allow_override field set to 1.
allow_overrideRequired: No
Type: boolean
Accepted values: 1 / 0 (or true / false in JSON requests)
Default: 0
Set to 1 to replace the latest previously enrolled image with the new one for the given client_reference. client_reference is required when this is set to 1.
enroll_face
Required: No
Type: boolean
Example: enroll_face=true
Default value: true
If you do not want the system to enroll the face then set the value of the key as false.

Multipart Upload Sample​

Image fields can also be sent as files with multipart/form-data instead of Base64 JSON:

curl -X POST https://api.facia.ai/face-match \
-H "Authorization: Bearer <token>" \
-F "type=photo_id_match" \
-F "face_frame=@/path/to/selfie.jpg" \
-F "id_frame=@/path/to/id_card.jpg"

Response Sample​


{
"status": true,
"message": "Transaction Created",
"result": {
"data": {
"reference_id": "your_reference_id_here",
"similarity_status": "1",
"similarity_score": "0.98",
"client_reference": "your_client_reference_here"
}
}
}


Response Parameter​

ParametersDescription
reference_id Type: string
Example: reference_id=your_reference_id_here
The unique identifier associated with the created transaction.
similarity_status Type: string
Example: similarity_status=1
1 means matched and 0 means not matched.
similarity_score Type: string
Example: similarity_score=0.98
Indicates the calculated similarity score of the images provided.
client_reference Type: string
Example: client_reference=your_client_reference_here
Contains the unique ID defined for the end user.