back  Back to APIs

Deepfake Detection

{{el |capitalize:true}}

{{username ? 'subscribe' : 'start free trial'}}

Remaining API Counts:

{{(token.limit-token.counter) || '0' }}
Remaining API Count : {{(token.limit-token.counter) || '0' }}

API Overview

The Deepfake Detection API employs advanced algorithms and deep learning techniques to distinguish genuine content from manipulated digital media. This ensures the credibility of visual content like images and videos in various applications like Identity verification, and more. Thus safeguarding against the rising threat of deepfake creations and identity fraud. Integrate this API seamlessly for enhanced security while seamlessly detecting potential fraud in your digital environment.

try it out

( Click on the image to enlarge )

Try the API

Please drag and drop files or click to browse.

Drag and Drop

or Click to browse files

Please wait...

Samples to try

Check out the API results using samples provided below.

Image Courtesy : Google

Samples to try

Check out the API results using samples provided below.

Video Courtesy : Google

Your document is processed successfully.

{{output.body.result |capitalize }}

{{output.body.result == 'real' ? 'Uploaded file is authentic' : 'Deepfake detected' }}


Documentation

POST

{{url}}/api/v1/deepfake-detection

API Token

  Regenerate

{{tokenDisplay}}  

Usage and Code Samples

curl --location --request POST '{{url}}/api/v1/deepfake-detection' \
--header 'token: < your private token >' \
--header 'content-type: application/json' \
--data-raw '{
    "doc_base64": '< base64 string of image / video>',
    "req_id": '< req id string>'
    "isIOS": '< boolean>',
    "doc_type": '< string (video/image)>',
    "orientation": '< int>'
}'
																						
OkHttpClient client = new OkHttpClient().newBuilder().build();
  MediaType mediaType = MediaType.parse("application/javascript");
  RequestBody body = RequestBody.create(mediaType, "{ "doc_base64": '< base64 string of image / video >',"req_id": '< req id string >', "isIOS": '< boolean >', "doc_type": '< string (video/image) >', "orientation":  '< int >'  }");
  Request request = new Request.Builder()
	.url("{{url}}/api/v1/deepfake-detection")
	.method("POST", body)
	.addHeader("token", "< your private token >")
	.addHeader("content-type", "application/json")
	.build();
  Response response = client.newCall(request).execute();
require "uri"
require "net/http"
url = URI("{{url}}/api/v1/deepfake-detection")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = "< your private token >"
request["content-type"] = "application/json"
request.body = "{"doc_base64": '< base64 string of image / video >',"req_id": < req id string >, "isIOS": '< boolean >', "doc_type": '< string (video/image) >', "orientation":  '< int >',  }"
response = https.request(request)
puts response.read_body
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
  curl_easy_setopt(curl, CURLOPT_URL, "{{url}}/api/v1/deepfake-detection");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  headers = curl_slist_append(headers, "token: < your private token >");
  headers = curl_slist_append(headers, "content-type: application/json");
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  const char *data = "{"doc_base64": '< base64 string of image / video >',"req_id": < req id string >, "isIOS": '< boolean >', "doc_type": '< string (video/image) >', "orientation":  '< int >',  }";
  curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
																					
var request = require('request');
var options = {
  'method': 'POST',
  'url': '{{url}}/api/v1/deepfake-detection',
  'headers': {
	'token': '< your private token >',
	'content-type':'application/json'
  },
  body: '{"doc_base64": "< base64 string of image / video >","req_id": < req id string >, "isIOS": '< boolean >', "doc_type": '< string (video/image) >', "orientation":  '< int >' }'
	};
	request(options, function (error, response) {
	if (error) throw new Error(error);
console.log(response.body);
});
var client = new RestClient("{{url}}/api/v1/deepfake-detection");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("token", "< your private token >");
request.AddHeader("content-type", "application/json");
var body = @"{" + "" +
@"    "doc_base64": '< base64 string of image / video >'," + "" +
@"    "req_id": < req id string >" + "" +
@"    "isIOS": < boolean >" + "" +
@"    "orientation": < int >" + "" +
@"    "doc_type": < string (video/image)  >" + "" +
@"  }";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{{url}}/api/v1/deepfake-detection');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
  'token' => '< your private token >',
  'content-type' => 'application/json'
));
$request->setBody('{"doc_base64": "< base64 string of image / video >","req_id": < req id string >,  "isIOS": '< boolean >', "doc_type": '< string (video/image) >', "orientation":  '< int >'  }');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
	echo $response->getBody();
  }
  else {
	echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
	$response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::V1_lengthofstayprediction_body->new(); # V1_lengthofstayprediction_body | 
my $token = token_example; # String | 
eval { 
	my $result = $api_instance->apiV1LengthOfStayPredictionPost(body => $body, token => $token, content-type=>'application/json');
	print Dumper($result);
};
if ($@) {
	warn "Exception when calling DefaultApi->apiV1LengthOfStayPredictionPost: $@";
}
																				
import requests
url = "{{url}}/api/v1/deepfake-detection"
payload = {"doc_base64": "< base64 string of image / video >", "req_id": < req id string >, "isIOS": '< boolean >', "doc_type": '< string (video/image) >', "orientation":  '< int >',  }
headers = {
  'token': '< your private token >',
  'content-type':'application/json'
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
	

Request Parameters

Header parameters

Name Description
token
String

Body parameters

Name Description
body {
  "req_id" : < string>,
  "doc_base64": < base64 encoded string>
  "doc_type": < string>
  "isIOS": < boolean >
  "orientation": < int >
}

Response Parameters

Status: 200 - API Request Successful

Body parameters

Name Description
body {
  "req_id" : < string>,
  "success" : < boolean>,
  "error_message" : < string> ,
  "doc_type" : < string> ,
  "result" : < string > ,
}

Field Details

Request Field Details

Fields Values/Description
req_id Unique request ID used for processing requests
doc_base64 Base64 encoded string of the image or video
doc_type Type of document uploaded (image or video)
isIOS boolean value if iOS
orientation integer

Response Field Details

Fields Values/Description
req_id Corresponding request id
success Flag if the request is processed successfully
error_message If success is False then: Error message
doc_type Type of document uploaded
result Result String