Deepware Developer

Deepware Developer page is explaining how to use Deepware API and SDK to scan deepfake videos.

Overview

Deepware API is designed as RESTful.

You can quickly access API endpoints to scan videos and YouTube URLs.

How it Works?

When you send a "scan" request to Deepware API, your scan request will be added to a queue for processing. After that the video you uploaded will be scanned with Deepware AI model.

The whole process is working asynchronously. After your "scan" request, you need to handle "report-id" that you received in the response and you need to send it to "report" endpoint to get result. If "report" endpoint returns "complete" key as "true", it means your process has been completed, but it does not, you need to send another request to "report" endpoint with same "report-id" until you get "complete" as "true".

Authentication

Every endpoint is required a "X-Deepware-Authentication" token in HTTP headers for authentication. You must submit to get a token before using all the services.

To submit for a key please click the link below.

Get Access Key

Rate Limiting

Your test API key can perform limited "scan" requests. You need to contact us to extend your keys limitation.

API References

Code Samples

  curl -X POST  -H "X-Deepware-Authentication: [[apiKey]]"\
  -H "Accept: application/json"\
  -H "Content-Type: multipart/form-data"\
  "https://api.deepware.ai/api/v1/url/scan"
                  
  import io.swagger.client.*;
  import io.swagger.client.auth.*;
  import io.swagger.client.model.*;
  import io.swagger.client.api.ScannerApi;

  import java.io.File;
  import java.util.*;

  public class ScannerApiExample {

      public static void main(String[] args) {
          ApiClient defaultClient = Configuration.getDefaultApiClient();

          // Configure API key authorization: api_key
          ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
          api_key.setApiKey("YOUR API KEY");
          // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
          //api_key.setApiKeyPrefix("Token");

          ScannerApi apiInstance = new ScannerApi();
          String video/URL = video/URL_example; // String | 
          try {
              YtScan result = apiInstance.urlscan(video/URL);
              System.out.println(result);
          } catch (ApiException e) {
              System.err.println("Exception when calling ScannerApi#urlscan");
              e.printStackTrace();
          }
      }
  }
                
  import io.swagger.client.api.ScannerApi;

  public class ScannerApiExample {

      public static void main(String[] args) {
          ScannerApi apiInstance = new ScannerApi();
          String video/URL = video/URL_example; // String | 
          try {
              YtScan result = apiInstance.urlscan(video/URL);
              System.out.println(result);
          } catch (ApiException e) {
              System.err.println("Exception when calling ScannerApi#urlscan");
              e.printStackTrace();
          }
      }
  }
                
  Configuration *apiConfig = [Configuration sharedConfig];
  // Configure API key authorization: (authentication scheme: api_key)
  [apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Deepware-Authentication"];
  // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  //[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Deepware-Authentication"];
  String *video/URL = video/URL_example; //  (optional)

  ScannerApi *apiInstance = [[ScannerApi alloc] init];

  // Start a scan process by Youtube URL
  [apiInstance urlscanWith:video/URL
                completionHandler: ^(YtScan output, NSError* error) {
                              if (output) {
                                  NSLog(@"%@", output);
                              }
                              if (error) {
                                  NSLog(@"Error: %@", error);
                              }
                          }];
                
  var DeepwareVideoScannerApi = require('deepware_video_scanner_api');
  var defaultClient = DeepwareVideoScannerApi.ApiClient.instance;

  // Configure API key authorization: api_key
  var api_key = defaultClient.authentications['api_key'];
  api_key.apiKey = "YOUR API KEY"
  // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
  //api_key.apiKeyPrefix['X-Deepware-Authentication'] = "Token"

  var api = new DeepwareVideoScannerApi.ScannerApi()
  var opts = { 
    'video/URL': video/URL_example // {{String}} 
  };
  var callback = function(error, data, response) {
    if (error) {
      console.error(error);
    } else {
      console.log('API called successfully. Returned data: ' + data);
    }
  };
  api.urlscan(opts, callback);
                
  using System;
  using System.Diagnostics;
  using IO.Swagger.Api;
  using IO.Swagger.Client;
  using IO.Swagger.Model;

  namespace Example
  {
      public class urlscanExample
      {
          public void main()
          {

              // Configure API key authorization: api_key
              Configuration.Default.ApiKey.Add("X-Deepware-Authentication", "YOUR_API_KEY");
              // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
              // Configuration.Default.ApiKeyPrefix.Add("X-Deepware-Authentication", "Bearer");

              var apiInstance = new ScannerApi();
              var video/URL = video/URL_example;  // String |  (optional) 

              try
              {
                  // Start a scan process by Youtube URL
                  YtScan result = apiInstance.urlscan(video/URL);
                  Debug.WriteLine(result);
              }
              catch (Exception e)
              {
                  Debug.Print("Exception when calling ScannerApi.urlscan: " + e.Message );
              }
          }
      }
  }
                
  <?php
  require_once(__DIR__ . '/vendor/autoload.php');

  // Configure API key authorization: api_key
  SwaggerClientConfiguration::getDefaultConfiguration()->setApiKey('X-Deepware-Authentication', 'YOUR_API_KEY');
  // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  // SwaggerClientConfiguration::getDefaultConfiguration()->setApiKeyPrefix('X-Deepware-Authentication', 'Bearer');

  $api_instance = new SwaggerClientApiScannerApi();
  $video/URL = video/URL_example; // String | 

  try {
      $result = $api_instance->urlscan($video/URL);
      print_r($result);
  } catch (Exception $e) {
      echo 'Exception when calling ScannerApi->urlscan: ', $e->getMessage(), PHP_EOL;
  }
  ?>
                
  use Data::Dumper;
  use WWW::SwaggerClient::Configuration;
  use WWW::SwaggerClient::ScannerApi;

  # Configure API key authorization: api_key
  $WWW::SwaggerClient::Configuration::api_key->{'X-Deepware-Authentication'} = 'YOUR_API_KEY';
  # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  #$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Deepware-Authentication'} = "Bearer";

  my $api_instance = WWW::SwaggerClient::ScannerApi->new();
  my $video/URL = video/URL_example; # String | 

  eval { 
      my $result = $api_instance->urlscan(video/URL => $video/URL);
      print Dumper($result);
  };
  if ([email protected]) {
      warn "Exception when calling ScannerApi->urlscan: [email protected]
";
  }
                
  from __future__ import print_statement
  import time
  import swagger_client
  from swagger_client.rest import ApiException
  from pprint import pprint

  # Configure API key authorization: api_key
  swagger_client.configuration.api_key['X-Deepware-Authentication'] = 'YOUR_API_KEY'
  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  # swagger_client.configuration.api_key_prefix['X-Deepware-Authentication'] = 'Bearer'

  # create an instance of the API class
  api_instance = swagger_client.ScannerApi()
  video/URL = video/URL_example # String |  (optional)

  try: 
      # Start a scan process by Youtube URL
      api_response = api_instance.urlscan(video/URL=video/URL)
      pprint(api_response)
  except ApiException as e:
      print("Exception when calling ScannerApi->urlscan: %s" % e)