Tutorials
FPT.AI Reader - Liveness Detection
The system Liveness Detection is connected with FPT Gateways, so developers need to register for an account at Console and create API key to use this API (new API key default to be used for 100 requests)
API key must be put at headers of all requests as below:
api_key: generated_API_key
Use Python
import requests
url = "https://api.fpt.ai/dmp/liveness/v3"
payload={}
files=[
('video', ('video.mp4',open('video.mp4','rb'), 'application/octet-stream')),
('cmnd', ('face.jpg', open('face.jpg','rb'), 'application/octet-stream'))
]
headers = {
'api-key': 'xxxxxxx'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
Use Shell
curl --location --request POST 'https://api.fpt.ai/dmp/liveness/v3' \
--header 'api-key: xxxxxxxx' \
--form 'video=@"/video.mp4"' \
--form 'cmnd=@"/face.jpg"'
Use Postman
Headers
Body