Skip to main content

Introduction to RealAPI

Build Reality Defender into your stack. Learn how to access and authenticate, understand versioning and visibility, explore sample code, and see how the API differs from the web app β€” plus details on performance, scaling, and volume.

Emily Essig avatar
Written by Emily Essig
Updated this week

πŸ“˜ Full API documentation can be found at docs.realitydefender.com

RealScan vs RealAPI

The Reality Defender Web App is ideal for:

  • Immediate, one-off scans

  • Manual upload of up to 10 files at a time

  • Instant, color-coded results and downloadable PDF report cards

The Reality Defender API is ideal for:

  • Large-scale, automated detection

  • Integrating deepfake detection directly into your backend, CMS, or verification flow

  • Scanning thousands (or millions) of assets in real time

If you have access to the web app, you already have access to the API β€” both use the same credentials and authentication layer.


Quickstart: Upload & Retrieve via API (Python)

1. Upload a file

import requests, os, sys

def get_signed_url(filename, token):

url = "https://api.prd.realitydefender.xyz/api/files/aws-presigned"

filesize = os.path.getsize(filename)

payload = {"fileName": filename, "fileSize": filesize}

headers = {"x-api-key": token, "Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

return response.json()

def upload_file(filename, token, signed_url):

with open(filename, 'rb') as file:

file_data = file.read()

response = requests.put(signed_url, data=file_data)

response.raise_for_status()

print(f"βœ… Upload successful: {filename}")

token = "ENTER_API_KEY_HERE"

path = sys.argv[1]

signed_url = get_signed_url(path, token)["response"]["signedUrl"]

upload_file(path, token, signed_url)

2. Retrieve analysis results

import requests, sys

def get_media_detail(request_id, token):

url = f"https://api.prd.realitydefender.xyz/api/media/users/{request_id}"

headers = {"x-api-key": token, "Content-Type": "application/json"}

response = requests.get(url, headers=headers)

return response.json()

token = "ENTER_API_KEY_HERE"

request_id = sys.argv[1] if len(sys.argv) == 2 else ""

print(get_media_detail(request_id, token))

πŸ“˜ Full API documentation: docs.realitydefender.com


A few key details…

  • Versioning: Every API authentication returns a version number. This number increments with each update to ensure compatibility and prevent breaking changes.
    ​

  • Visibility: Each account can view only its own uploads and remaining usage quota.
    ​

  • Access Tokens: Each account needs its own API token. Tokens should not be shared between users.
    ​

  • Performance & Scaling: The Reality Defender platform automatically scales up and down based on system load. There are no limits or costs for calling query endpoints (retrieving data).
    ​


Related FAQs

Topic

Answer

Do I need special access?

No. API access is included with your web app account.

Volume capacity?

The platform scales dynamically to handle high load.

Taxonomy or schema?

Refer to the API documentation for full field definitions.

Video/audio separation?

Managed via request type in the API; see details on media endpoints in documentation.

Did this answer your question?