Deepfake

This method helps you to detect deepfake from face image..

🎈Endpoint

MethodEndpoint
POSThttps://api.verihubs.com/v1/face/deepfake

🎈Request

Headers

KeyTypeNotesDescription
App-IDStringRequiredApplication ID that generated from Application Menu in Verihubs Client Dashboard. To hit in Testing and Live mode you need a Production Application ID.
API-KeyStringRequiredAPI-Key that generated from Application Menu in Verihubs Client Dashboard that related to specific Application ID.

You can generate your Application ID and API-Key in the Application page in Verihubs Client Dashboard..

Body Parameters

Parameter

Type

Notes

Default

Description

image

String

Required

none

A base64 or URL image file. Image Type JPEG, JPG, PNG Max File size: 5MB

is_quality

boolean

optional

false

Determines whether Image Quality (blur and dark) will be computed and return as result

is_attribute

boolean

optional

false

Determines whether Image Attribute (sunglasses, mask, veil, hat, and face blocker object) will be detected and return as result

validate_quality

boolean

optional

false

Determines whether Quality validation will be executed. The validation consists of checking blur and dark. "validate_quality" can be TRUE only when "is_quality" is TRUE.

validate_attribute

boolean

optional

false

Determines whether Attribute validation will be executed. The validation consists of checking whether sunglasses, mask, or face blocker is detected in the input image. "validate_attribute" can be TRUE only when "is_attribute" is TRUE.

🎈Responses

Response Code

CodeDescription
200Successful Response
400Bad Request
401Unauthorized
500Internal Server Error

Details for 200 and 201

KeyTypeDescription
messagestringMessage that describe the overall response.
status_codestringStatus that indicate the billing calculation. See status code list in this link.
session_idstringUnique ID for each transaction
image_qualityobjectDescribes image quality detail, consist of blur and dark
blurbooleanDescribes whether input image is considered as blur (If it exceeds the threshold, it will detected as blur)
darkbooleanDescribes whether input image is considered as dark (If it exceeds the threshold, it will detected as dark)
attributesobjectDescribes image attributes detail
sunglasses_onbooleanDescribes whether sunglasses is detected on input image
mask_onbooleanDescribes whether mask is detected on input image
veil_onbooleanDescribes whether veil is detected on input image
hat_onbooleanDescribes whether hat is detected on input image
face_blockerbooleanDescribes whether any object is detected blocking the face on input image (available on 1st october 2025)
rotationintegerShows rotation degrees need to be done to detect face in image
bounding_boxobjectShows result of bounding box
TopLeftXstring
TopLeftYstring
BottomRightXstring
BottomRightYstring
Widthstring
Heightstring
face_landmarkobjectShows result of face landmark
LeftEyeXstring
LeftEyeYstring
RightEyeXstring
RightEyeYstring
NoseXstring
NoseYstring
MouthLeftXstring
MouthLeftYstring
MouthRightXstring
MouthRightYstring
nfaceintegerShows how many faces are detected in the input image.
deepfakebooleanShows if the result of the image inputted is deepfake (true) or authentic (false)
timestampnumberShows time when the process is successfully done

Error Code

Response CodeError MessageDescription
400INVALID_PAYLOADno value in payload or empty string more than 1
400INVALID_PAYLOAD_IMAGE_MISSINGinvalid payload image not a standard b64/url or image empty string
400INVALID_PAYLOAD_IMAGE_SIZEinvalid payload image size too large
400MISSING_PAYLOAD_IMAGEmissing payload image
400INVALID_PAYLOAD_IMAGE_TIMEOUTtimeout getting image from url in 15 seconds
400FACE_NOT_DETECTEDface not detected from image
400INVALID_PAYLOAD_QUALITY_VALIDATION_DEPENDENCYis_quality must be true if validate_quality true
400INVALID_PAYLOAD_ATTRIBUTE_VALIDATION_DEPENDENCYis_attribute must be true if validate_attribute true
200FAIL_ON_2fail on attribute
200FAIL_ON_4fail on quality
200FAIL_ON_6fail on attribute and quality
403INSUFFICIENT_QUOTA_DEEPFAKEusage reach it quota limit for deepfake (only appears on testing mode)
500INTERNAL_SERVER_ERRORinternal server error

Sample Responses

Response Code

Response

Descriptions

200

{
"message": "Request Success",
"session_id": "189ea654-a342-4796-9015-dc8b6d84d8d9",
"timestamp": 1675129190.662234,
"status_code": "FACE-3",
"rotation": "0",
"bounding_box": \{
"TopLeftX": "107.69689178466797",
"TopLeftY": "16.787113189697266",
"BottomRightX": "144.38543701171875",
"BottomRightY": "69.24873352050781",
"Width": "36.68854522705078",
"Height": "52.46162033081055"
},
"face_landmark": \{
"LeftEyeX": "113.55226135253906",
"LeftEyeY": "37.215999603271484",
"RightEyeX": "130.2599639892578",
"RightEyeY": "38.250545501708984",
"NoseX": "118.09809112548828",
"NoseY": "46.43742370605469",
"MouthLeftX": "113.84989166259766",
"MouthLeftY": "56.04047775268555",
"MouthRightX": "126.98597717285156",
"MouthRightY": "56.930213928222656"
},
"nface": 1,
"deepfake": false
}

Request data parameter is valid.

400

"message": "Invalid Payload",
"data": {
"message": "Syntax error"
}

Invalid Payload. Transaction that is considered failed due to validation errors, an error_field will appear explaining the error.

400

{
"message": "Face not detected in image",
"error_code": "FACE_NOT_DETECTED"
}

Request image is invalid (not a face image).

401

{
"message": "Authorization failed"
}

Authorization Failed; Transaction that unauthorized due to Application ID or API-Key issue. To hit in Testing and Live mode you need a Production Application ID and API-Key.

403

{
"message": "Insufficient deepfake quota",
"error_code": "INSUFFICIENT_QUOTA_DEEPFAKE"
}

The transaction is in Testing mode and not enough remaining quota. Please contact Verihubs Customer Support.

500

{
"message": "Internal server error"
}

Internal server error.