Skip to main content

Overview

The Reality Defender SDK allows you to integrate powerful AI-based deepfake detection capabilities into your applications. With this SDK, you can:
  • Upload media files for deepfake and manipulation analysis
  • Submit social media URLs for deepfake and manipulation analysis
  • Receive detailed results about the authenticity of media
  • Get model-specific confidence scores and detection results
  • Integrate via event-based or polling approaches
  • Process multiple files concurrently with configurable concurrency limits
  • Handle image, video, audio, text files, and social media URLs with optimized processing
  • Submit user scan feedback for completed results

Available SDKs

SDK implementations are available for multiple programming languages:

Getting Started

  1. Obtain an API key from the Reality Defender Platform
  2. Choose the SDK for your preferred programming language
  3. Follow the installation and usage instructions in the language-specific README
Every SDK can analyze either a local media file or a social media URL. In both cases the SDK submits the media to Reality Defender, returns a requestId, and then uses that requestId to retrieve the analysis result — the same flow regardless of the input. Each language-specific README documents installation, supported social platforms, and usage. For complete, runnable examples in each language, see:

Supported Local File Types

  • Images: .jpg, .jpeg, .png, .gif, .webp
  • Audio: .mp3, .wav, .m4a, .aac, .ogg, .flac, .alac
  • Video: .mp4, .mov
  • Text: .txt
Note: The free tier only supports uploading audio and image files.

Size Limits

  • Text: up to 5MB
  • Images: up to 10MB
  • Audio: up to 20MB
  • Video: up to 250MB

Architecture

The SDKs follow a consistent architecture across all language implementations:
  • Client Layer: Handles HTTP communication with the Reality Defender API
  • Core: Manages configuration, constants, and event handling
  • Detection: Processes media uploads, social media URL submissions, and results
  • Types/Models: Defines data structures for API responses and SDK interfaces
  • Utils: Provides file operations and helper functions

Key Features

  • Cross-language compatibility: Consistent patterns across TypeScript, Python, Go, Rust, and Java
  • Async/Sync support: Both asynchronous and synchronous programming models
  • Score normalization: All scores are normalized to a 0-1 range (0.0 to 1.0)
  • Resource management: Proper cleanup of resources to prevent leaks
  • Flexible integration: Event-based or polling-based approaches
  • Batch processing: Process multiple files concurrently with optimized performance
  • Media type support: Handle audio, image, video, text files, and social media URLs with appropriate processing strategies
  • User feedback: Record a label and feedback category (REAL / SYNTHETIC / … and FALSE_POSITIVE / CONFIRMATION / …) against a completed detection’s requestId

Support

For questions, issues, or feature requests, please file an issue in this repository or contact [email protected]