Skip to main content

DeepFake Liveness Detection

FACIA's DeepFake Liveness Detection is an advanced biometric security feature that identifies and prevents sophisticated spoofing attempts, including deepfake images, AI-generated faces, and other digital manipulations. By leveraging cutting-edge AI algorithms and real-time analysis, our technology detects inconsistencies in facial texture and depth, ensuring reliable and secure authentication.

Create DeepFake Liveness Transaction​

This endpoint initiates a deepfake detection request. Submit a request with the required image and configuration parameters to begin the verification process.

Endpoint

POSThttps://api.facia.ai/liveness

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 Sample​

//POST /liveness  HTTP/1.1
//Host: https://api.facia.ai
//Content-Type: application/json

{
"type": "liveness",
"file": "data:image/png;base64,your_image_base64_here", //Base64 data URI of a .jpg/.jpeg/.png image. Videos must be uploaded as multipart/form-data.
"detect_deepfake": 1,
"offsite_liveness": 1,
"client_reference": "your_client_reference_here" //Must be between 5 and 255 characters. If not provided, will be null (Optional)
}

Request Parameter​

ParametersDescription
typeRequired: Yes
Type: string
Example: type=liveness
Must be "liveness".
fileRequired: Yes
Type: file or string
multipart/form-data: the image file (.jpg, .jpeg, .png), or a video file (.mp4, .mov, max 15 MB) with file_type=video.
application/json: images only. 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.
file_typeRequired: Only for video uploads
Type: string
Example: file_type=video
Set to "video" when file is a video. With file_type=video, only an uploaded .mp4 or .mov file sent as multipart/form-data is accepted (max 15 MB). Base64 is not accepted for video.
offsite_livenessRequired: No
Type: boolean
Default: false
Example: offsite_liveness=true
Must be true or 1 to run offsite liveness. If omitted, the request runs as onsite liveness: quick for images, detail for video.
detect_deepfakeRequired: No
Type: boolean
Default: false
Example: detect_deepfake=true
Adds deepfake detection to the transaction. Only applies when offsite_liveness=1; otherwise it is ignored.
client_referenceRequired: No
Type: string
Example: client_reference=your_client_reference_here
Must be between 5 and 255 characters. If not provided, will be null.

Multipart Upload Samples​

Images can also be sent as files with multipart/form-data. Videos must be sent this way: with file_type=video, only an uploaded .mp4 or .mov file is accepted (max 15 MB, not Base64).

# image
curl -X POST https://api.facia.ai/liveness \
-H "Authorization: Bearer <token>" \
-F "type=liveness" \
-F "detect_deepfake=1" \
-F "offsite_liveness=1" \
-F "file=@/path/to/photo.jpg"

# video
curl -X POST https://api.facia.ai/liveness \
-H "Authorization: Bearer <token>" \
-F "type=liveness" \
-F "detect_deepfake=1" \
-F "offsite_liveness=1" \
-F "file_type=video" \
-F "file=@/path/to/video.mp4"

Response Sample​


{
"status": true,
"message": "Transaction Created",
"result": {
"data": {
"reference_id": "your_reference_id_here",
"services_performed": {
"liveness_mode": "offsite",
"liveness_type": "quick",
"detect_deepfake": true
}
}
}
}


Response Parameter​

ParametersDescription
reference_id Type: string
Example: reference_id=your_reference_id_here
The unique identifier associated with the created transaction.
services_performed Type: object
The verification checks attached to the created transaction. Not returned when wait_for_result is enabled.
services_performed.liveness_mode Type: string
Values: offsite / onsite
offsite when offsite_liveness=true, otherwise onsite.
services_performed.liveness_type Type: string
Values: quick / detail
detail when file_type=video, otherwise quick.
services_performed.detect_deepfake Type: boolean
true if deepfake detection is applied. Only true when offsite_liveness=true and detect_deepfake=true.

Retrieve DeepFake Liveness Result​

After initiating a deepfake request, use this endpoint to retrieve verification results. This includes deepfake status , score , proof and decline reason if request is declined.

Endpoint

POSThttps://api.facia.ai/result

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 Sample​

//POST /result HTTP/1.1
//Host: api.facia.ai
//Content-Type: application/json
//Authorization: Bearer <access-token-here>

{
"reference_id": "your_reference_id_here"
}

Request Parameter​

ParametersDescription
reference_id Required: Yes
Type: string
Example: reference_id=your_reference_id_here
The unique identifier associated with the created transaction.

Response Sample​

{
"status": true,
"message": "success",
"result": {
"data": {
"type": "deepfake",
"reference_id": "your_reference_id_here",
"client_reference": null,
"status": 0,
"deepfake_score": 0.2359273945279834,
"decline_code": "FADR25",
"decline_reason": "Deepfake Detected.",
"declined_proof": "https://api.facia.ai/api/image-url/67b1234567c7623feb123456?expires=1234567890&signature=3077f7405447fd12345678b7bb79d39ae5b495c0100f91e23feec336d8d4f2XX"
}
}
}

Response Parameter​

FieldTypeDescription
typestringSpecifies the type of request.
Example: deepfake.
reference_idstringThe unique identifier for the liveness verification request.
Example: 6042D9CB4974EAB.
client_referencestringThe reference provided by the client. If no reference is provided, it will be null.
Example: ABC2D9CB4974XYZ.
statusintegerStatus of deepfake detection.
Example: 1.
1 = Passed
0 = Failed.
deepfake_scorefloatThe confidence score representing the probability of a deepfake presence.
Example: 0.2359273945279834.
decline_codestringA specific decline code indicating the reason for rejection.
Example: FADR25.
decline_reasonstringThe reason for declining the request.
Example: "Deepfake Detected.".
declined_proofstringThe URL of the declined proof image used for verification. The URL expires after a set time.
Example: Declined Proof URL.

Summary​

FACIA's DeepFake Liveness Detection provides an advanced security layer by detecting and preventing deepfake and AI-generated facial fraud. The API endpoints allow seamless integration for liveness verification, ensuring a secure and robust biometric authentication process.