Deepfake
This method helps you to detect deepfake from face image..
🎈Endpoint
| Method | Endpoint |
|---|---|
| POST | https://api.verihubs.com/v1/face/deepfake |
🎈Request
Headers
| Key | Type | Notes | Description |
|---|---|---|---|
| App-ID | String | Required | Application ID that generated from Application Menu in Verihubs Client Dashboard. To hit in Testing and Live mode you need a Production Application ID. |
| API-Key | String | Required | API-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
| Code | Description |
|---|---|
| 200 | Successful Response |
| 400 | Bad Request |
| 401 | Unauthorized |
| 500 | Internal Server Error |
Details for 200 and 201
| Key | Type | Description |
|---|---|---|
| message | string | Message that describe the overall response. |
| status_code | string | Status that indicate the billing calculation. See status code list in this link. |
| session_id | string | Unique ID for each transaction |
| image_quality | object | Describes image quality detail, consist of blur and dark |
| blur | boolean | Describes whether input image is considered as blur (If it exceeds the threshold, it will detected as blur) |
| dark | boolean | Describes whether input image is considered as dark (If it exceeds the threshold, it will detected as dark) |
| attributes | object | Describes image attributes detail |
| sunglasses_on | boolean | Describes whether sunglasses is detected on input image |
| mask_on | boolean | Describes whether mask is detected on input image |
| veil_on | boolean | Describes whether veil is detected on input image |
| hat_on | boolean | Describes whether hat is detected on input image |
| face_blocker | boolean | Describes whether any object is detected blocking the face on input image (available on 1st october 2025) |
| rotation | integer | Shows rotation degrees need to be done to detect face in image |
| bounding_box | object | Shows result of bounding box |
| TopLeftX | string | |
| TopLeftY | string | |
| BottomRightX | string | |
| BottomRightY | string | |
| Width | string | |
| Height | string | |
| face_landmark | object | Shows result of face landmark |
| LeftEyeX | string | |
| LeftEyeY | string | |
| RightEyeX | string | |
| RightEyeY | string | |
| NoseX | string | |
| NoseY | string | |
| MouthLeftX | string | |
| MouthLeftY | string | |
| MouthRightX | string | |
| MouthRightY | string | |
| nface | integer | Shows how many faces are detected in the input image. |
| deepfake | boolean | Shows if the result of the image inputted is deepfake (true) or authentic (false) |
| timestamp | number | Shows time when the process is successfully done |
Error Code
| Response Code | Error Message | Description |
|---|---|---|
| 400 | INVALID_PAYLOAD | no value in payload or empty string more than 1 |
| 400 | INVALID_PAYLOAD_IMAGE_MISSING | invalid payload image not a standard b64/url or image empty string |
| 400 | INVALID_PAYLOAD_IMAGE_SIZE | invalid payload image size too large |
| 400 | MISSING_PAYLOAD_IMAGE | missing payload image |
| 400 | INVALID_PAYLOAD_IMAGE_TIMEOUT | timeout getting image from url in 15 seconds |
| 400 | FACE_NOT_DETECTED | face not detected from image |
| 400 | INVALID_PAYLOAD_QUALITY_VALIDATION_DEPENDENCY | is_quality must be true if validate_quality true |
| 400 | INVALID_PAYLOAD_ATTRIBUTE_VALIDATION_DEPENDENCY | is_attribute must be true if validate_attribute true |
| 200 | FAIL_ON_2 | fail on attribute |
| 200 | FAIL_ON_4 | fail on quality |
| 200 | FAIL_ON_6 | fail on attribute and quality |
| 403 | INSUFFICIENT_QUOTA_DEEPFAKE | usage reach it quota limit for deepfake (only appears on testing mode) |
| 500 | INTERNAL_SERVER_ERROR | internal server error |
Sample Responses
Response Code | Response | Descriptions |
|---|---|---|
200 | | Request data parameter is valid. |
400 | | Invalid Payload. Transaction that is considered failed due to validation errors, an error_field will appear explaining the error. |
400 | | Request image is invalid (not a face image). |
401 | | 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 | | The transaction is in Testing mode and not enough remaining quota. Please contact Verihubs Customer Support. |
500 | | Internal server error. |
Updated about 2 months ago
