Tutorials
FPT.AI Reader - Facematch
API Usage Guide
Authentication
The Facematch system has been connected to FPT Gateways, therefore, users need to create an account on Console and then generate an API key in order to send requests to the gateway (by default each new API key can only make 1000 requests).
The API key needs to be embedded in the header of all API requests as follows:
api_key: generated_API_key
Check similarity of faces in 2 images
Using Python
import requests
url = 'https://api.fpt.ai/dmp/checkface/v1'
headers = {
'api_key': 'xxxxxxxxxx'
}
files = [
('file[]', open('/tmp/image1.jpg', 'rb')),
('file[]', open('/tmp/image2.jpg', 'rb'))
]
r = requests.post(url, headers=headers, files=files)
Using Shell
curl --location --request POST 'https://api.fpt.ai/dmp/checkface/v1' \
--header 'api_key: xxxxxxxxxx' \
--form 'file[]=@/private/tmp/image1.jpg' \
--form 'file[]=@/private/tmp/image2.jpg'
Using Postman software
Headers
Body