Deepfake Detection
A Deep Fake Detection API is specifically designed to identify counterfeit or fraudulent profiles during the onboarding process, primarily by detecting fake faces generated using deep fake technologies. As of the current state, this API exclusively supports video input requests.
This API is for demo purposes only and currently in active development. For production, the feature or contract may change in the future.
Deepfake Detection Object
- Name
status
- Type
- string
- Description
A short string indicating the status of the result.
success
failed
- Name
result
- Type
- object
- Description
The result of deepfake detection.
- Name
deepfake_status
- Type
- string
- Description
Enum code indicating the deepfake status. See Responses below for details.
REAL
FAKE
- Name
confidence_score
- Type
- number
- Description
Confidence score of the model producing the output (in percentage).
Deepfake Detection
Detect fake faces generated using deep fake technologies from a video or list of frame. Use form-data if you want to request with video file. Use raw json body if you want to request with list of base 64 encoded frame.
Parameter
- Name
video
- Type
- file (.mp4)
- Description
The video file to be detected. The maximum video size is 6MB.
- Name
frames
- Type
- list of string base64 encoded
- Description
The list of frames to be detected. The maximum total size is 6MB.
Sample Request
1
2
3
4
curl -v -L -X POST 'https://api.vision.glair.ai/face/v1/deepfake' \
-H "Authorization: Basic $(printf "%s" "USERNAME:PASSWORD" | base64)" \
-H 'x-api-key: API_KEY' \
-F 'video=@"/path/to/video.mp4"'
Sample Response
1
2
3
4
5
6
7
{
"status": "success",
"result": {
"deepfake_status": "FAKE",
"confidence_score": 0.99768
}
}
Request ID
An associated request identifier is generated for every request made to this endpoint.
This value can be found in the response headers under Request-Id
Responses
Various responses for this endpoint, in addition to general responses specified in Errors.
200 - OK
Success, detect deepfake in the video input.
Response
1
2
3
4
5
6
7
{
"status": "success",
"result": {
"deepfake_status": "FAKE",
"confidence_score": 0.99768
}
}
200 - OK
Success, no deepfake in the video input.
Response
1
2
3
4
5
6
7
{
"status": "success",
"result": {
"deepfake_status": "REAL",
"confidence_score": 0.06772
}
}
400 - Bad Request
Input video
not found.
Response
1
2
3
4
{
"status": "failed",
"error_message": "Video Not found"
}
Content-Type
not found in request header.
Response
1
2
3
4
{
"status": "failed",
"error_message": "Headers[Content-Type] Not Found."
}