Documentation

Documentation

  • Conversation
  • Reader
  • Speech
  • Console
  • AI Agents
  • Languages iconJanpanese
    • Tiếng Việt
    • English

›API

概要

  • Driving License Recognition
  • ID Recognition
  • Passport Recognition
  • Facematch
  • Face Search
  • Reader
  • SDK eKYC
  • Liveness Detection

API

  • Driving Licence Recognition
  • ID Recognition
  • Passport Recognition
  • Face Search
  • Facematch
  • Liveness Detection

チュートリアル

  • Driving License Recognition
  • ID Recognition
  • Passport Recognition
  • Face Search
  • Facematch
  • SDK eKYC
  • Liveness Detection

API

FPT.AI Reader - Liveness Detection

Input image requirement

For video

  • The input video does not exceed 10MB and has the minimum resolution of 800x600 to ensure accuracy
  • The face area must take up at least 3/5 the total video frame
  • The video is 5-10 seconds long.

For attached image (to compare the face)

  • The image to be compared with video does not exceed 5MB and has the minimum resolution of 800x600.

  • The face area must take up at least 3/5 the total image

Standard image

1

Poor-quality image/video

  • Image with low quality or covered face
  • Video is blurry, made with low-quality camera

API Information

Request Url

POST https://api.fpt.ai/dmp/liveness/v3

Request Headers

ParameterRequestDefaultDescription
api_keyYesyour api_key (from console.fpt.ai)

Request Body

FormData containing the video and image to be checked

Parameter**Request **Description
videoYesVideo of customer’s face naturally moving
cmndNoImage to be compared with the straightest face in video

Sample Request

curl --location --request POST 'https://api.fpt.ai/dmp/liveness/v3' \
--header 'api-key: xxxxxxxx' \
--form 'video=@"/video.mp4"' \
--form 'cmnd=@"/face.jpg"'

Response

JSON

{
    "code": "200",
    "message": "request successful.",
    "is_live": true,
    "prob": "0.006677149",
    "need_to_review": false,
    "is_deepfake": false,
    "deepfake_prob": "0.0016087113",
    "face_match": {
        "isMatch": false,
        "similarity": 1.8187788133647025
    },
    "face_match_error": {}
}

Returned Information

TrườngDescription
codeCode/Error
is_liveVideo authentication result
is_deepfakeDeepfake detection result
face_matchFace matching result
face_match_errorFace matching error (if any)

Code

CodeMeaning
200No error, see more results in the above fields
408More than 1 face in the video
409No video uploaded/Wrong extension
410No face in the video
411The face is too small
412The face is too blurry
413Video is still image

Sample Response: Success

{
    "code": "200",
    "message": "request successful.",
    "is_live": true,
    "prob": "0.006677149",
    "need_to_review": false,
    "is_deepfake": false,
    "deepfake_prob": "0.0016087113",
    "face_match": {
        "isMatch": false,
        "similarity": 81.81878813647025
    }
}

Sample Response: Error

{
    "code": "200",
    "message": "request successful.",
    "is_live": true,
    "prob": "0.006677149",
    "need_to_review": false,
    "is_deepfake": false,
    "deepfake_prob": "0.0016087113",
    "face_match_error": {
        "code": "407",
        "data": "No faces detected"
    }
}

{
    "code": "200",
    "message": "request successful.",
    "is_live": true,
    "prob": "0.1212767",
    "need_to_review": true,
    "is_deepfake": true,
    "deepfake_prob": "0.99999964",
    "face_match": {
        "isMatch": false,
        "similarity": 8.060021979547948
    }
}

{
    "code": "200",
    "message": "request successful.",
    "is_live": false,
    "prob": "0.9255054",
    "need_to_review": false,
    "face_match": {
        "isMatch": false,
        "similarity": 22.457926631125535
    }
}

{
    "code": "408",
    "message": "request successful.",
    "data": "2 faces"
}

{
    "code": "409",
    "message": "request successful.",
    "data": "Allowed extensions are  mov, mp4, mkv, webm"
}

{
    "code": "410",
    "message": "request successful.",
    "data": "No faces"
}

{
    "code": "411",
    "message": "request successful.",
    "is_live": false,
    "need_to_review": false
}

{
    "code": "412",
    "message": "request successful.",
    "is_live": false,
    "need_to_review": false
}

{
    "code": "413",
    "message": "request successful.",
    "is_live": false,
    "need_to_review": false
}

← FacematchDriving License Recognition →
  • Input image requirement
    • For video
    • For attached image (to compare the face)
  • API Information
    • Request Url
    • Request Headers
    • Request Body
    • Sample Request
    • Response
Conversation
DocumentationAPI ReferenceTutorials (Video)
Reader
DocumentationAPI ReferenceTutorials
Speech
DocumentationAPI ReferenceTutorials
Copyright © 2025 FPT Corporation