Skip to content

Video Processing

Process the video through Biometry services to check liveness and authorize user.

Requirements for the video

User should record a short video where he shows his/her face and says out loud some set of numbers. Services will compare the provided numbers from the request with what user says in the video.

Authorization

This endpoint requires an API token as Bearer in the Authorization header. Go to Authorization guide for details.

Request

POST https://api.biometrysolutions.com/api-gateway/process-video

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. How to start a session
  • X-Device-Info (JSON. Optional) - Pass the device information in JSON format to include in transaction. More about device information

Parameters

  • video* (formData file) - Video file that you want to process. Required parameter.
  • phrase* (string) - Set of numbers that user needs to say out loud in the video.

Responses

The object with data and message fields.

  • data - Contains the results of processed video. It contains a list of service objects through which was video processed.

    • service - Contains the results of certain service (for example: Active Speaker Detection).
  • message - Message with the status of processed video.

Consists of response headers: - X-Request-Id - equivalent of transaction_id and can be used to get the data provided by user using Get samples and Result tagging

Response sample:

{
"data": {
"serviceName1": "object",
"serviceName2": "object",
},
"message": "string"
}

Sample

Request

Pass the video from your local machine to the --form.

curl --location 'https://api.biometrysolutions.com/api-gateway/process-video' \
--header 'X-User-Fullname: John Doe' \
--header 'Authorization: Bearer eyJhbGciO...ANYea8r2xOG-Urc' \
--form 'video=@"/[path to your file]/video.mp4"' \
--form 'phrase="one two three four five six seven eight"'
Response
{
"data": {
"Active Speaker Detection": {
"code": 0,
"description": "Successful check",
"result": 97.79,
"score": 98.77
},
"Face Liveness Detection": {
"code": 0,
"description": "Successful check",
"result": true,
"score": 76.65
},
"Face Recognition": {
"code": 0,
"description": "Successful check",
"score": 61.52
},
"Visual Speech Recognition": {
"code": 0,
"description": "Successful check",
"result": "ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE",
"score": 88.64
},
"Voice Recognition": {
"status": "fail",
"id": "Emirlan_Rasulov",
"score": -0.495,
"imposter_prob": 0,
"log_odds": ""
}
},
"scoring_result": "pass",
"message": "video processed successfully"
}
Response header
X-Request-Id: fc5605c5-...-87cc-979cd72564d4