# Version
1.0
# Description
This interface is used for deepfake detection, identifying whether the uploaded image/video is AI-generated; based on large model algorithms, it effectively defends against face synthesis risks.
# Request URL
Singapore: https://api-sgp.yljz.com/finauth/v5/anti_deepfake
Indonesia: https://api-idn.yljz.com/finauth/v5/anti_deepfake
Note:In production environments, please use HTTPS for communication. HTTP communication is an insecure channel and poses security risks. Do not use it in production environments. Using HTTP in production environments will not be covered by service reliability guarantees.
# Request Method
POST Note: Use form-data format for the request.
# Authorization
Users can only call FinAuth Web APIs after they have integrated the FinAuth product. For the process of integrating FinAuth, please consult FinAuth business personnel.
# Parameters
| Required/Optional | Parameter | Type | Description |
| Required | sign | String | The signature of the client calling this API. For the specific method of generating the signature, please refer to the "Authentication Instructions" |
| Required | sign_version | String | Signature algorithm version number. Currently only supports: "hmac_sha1" |
| Required | data_type | int |
data_type 0:image 1:video |
| Required | image | File |
The image to be detected, passed in when "data_type=0". Recommendations for the uploaded image are as follows:
|
Required | video | File |
The video to be detected, passed in when "data_type=1". Recommendations for the uploaded video are as follows:
|
# Response Description
| Parameters | Type | Description |
| request_id | String |
Request ID, a unique string used to distinguish each request. This field is always returned except when error 404 (API_NOT_FOUND) occurs. |
| time_used | Int | Request time consumption, the total time spent on the request, in milliseconds. |
| result | Bool |
The result of the deepfake detection. Values are True or False. False indicates it is not a deepfake, True indicates it is a deepfake. |
| score | Float |
The score of the deepfake detection. Value range is [0,1]. A higher score indicates a greater possibility of an attack. |
| threshold | Float |
The threshold for deepfake detection. Value range is [0,1]. The default value is 0.5. |
| error | String |
Error message. This string is returned only when the request fails. For specific content, refer to the error information section below. Otherwise, this field does not exist. See status codes below for details. |
# Error Message
| Status Code | Error Message | Description |
| 400 | MISSING_ARGUMENTS:<key> | A required parameter is missing |
| 400 | BAD_ARGUMENTS | Parameter parsing failed. This occurs when a non-numeric string is input for a numeric-required parameter, the length exceeds the limit, or the input image/video format is invalid, causing parsing to fail |
| 400 | NO_FACE_FOUND | No face detected in the input image or video |
| 400 |
INVALID_IMAGE_SIZE: |
Image size exceeds the limit. The corresponding key indicating the oversized field will be attached in some cases |
| 400 | INTERNAL_TIMEOUT | Request timeout |
| 403 | AUTHENTICATION_ERROR | Invalid signature |
| 403 | AUTHENTICATION_ERROR:<reason> |
The api_key is deactivated, the call frequency exceeds the limit, you do not have permission to call this API, or you do not have permission to call this API via the current method. The possible values of <reason> are as follows:
|
| 403 | CONCURRENCY_LIMIT_EXCEEDED | The number of concurrent requests exceeds the limit |
| 404 | API_NOT_FOUND | The called API does not exist |
| 413 | Request Entity Too Large | The size of the request sent by the client exceeds the limit. The error is returned in plain text format, not JSON format |
| 500 | INTERNAL_ERROR | If this error occurs continuously, please contact Yuanli customer service or business personnel in time |
| 504 | 504 Gateway Timeout | Request timeout |
