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:- TypeScript/JavaScript SDK - For web and Node.js applications
- Python SDK - For Python applications and data science workflows
- Go SDK - For Go applications
- Rust SDK - For Rust applications
- Java SDK - For Java applications
Getting Started
- Obtain an API key from the Reality Defender Platform
- Choose the SDK for your preferred programming language
- Follow the installation and usage instructions in the language-specific README
Analyze Media Files and Social Media Links
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 arequestId, 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:
| Language | Media file upload | Social media URL |
|---|---|---|
| TypeScript | examples/basic.ts | examples/social_media.ts |
| Python | examples/basic_usage.py | examples/social_media.py |
| Go | examples/basic/main.go | examples/social/main.go |
| Rust | examples/basic.rs | examples/social_media.rs |
| Java | SimpleFileDetectionExample.java | SocialMediaDetectionExample.java |
Supported Local File Types
- Images:
.jpg,.jpeg,.png,.gif,.webp - Audio:
.mp3,.wav,.m4a,.aac,.ogg,.flac,.alac - Video:
.mp4,.mov - Text:
.txt
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/ … andFALSE_POSITIVE/CONFIRMATION/ …) against a completed detection’srequestId