# Changelog Source: https://docs.realitydefender.com/api-reference/changelog Changes to the Reality Defender Platform API and SDKs This page lists changes to the Reality Defender Platform API and SDKs, newest first. Use the filters to show only breaking changes, improvements, fixes, or other changes that may affect an existing integration. **November 5, 2026** ## Breaking changes * **Audio uploads are blocked on the Free API plan.** `POST /api/files/aws-presigned` now returns HTTP `403` with the code `free-tier-restriction` and the message "Forbidden: Video, audio, and text uploads require a paid plan" when an organization on the Free API plan requests an upload URL for an audio file. See [Free Plan Restriction](/api-reference/endpoint/presigned#free-plan-restriction) for details. If your integration uploads audio on the Free API plan, upgrade to a paid plan or contact Sales. After an upgrade, it can take a few minutes for access to take effect. ## Model updates * **Audio analysis covers the full file.** Speech in some files could previously be mistaken for silence and left out of the analysis. This speech is now analyzed, so results reflect more of each file. The response format is unchanged. Scores for the same file can differ from earlier results. ## Fixed * **YouTube downloads resolve more reliably.** YouTube links submitted to `POST /api/files/social` that point to non-MP4 files are now downloaded and analyzed instead of failing. If the download provider reports a failed download, the request now ends promptly with `DOWNLOAD_FAILED` in `overallStatus` instead of staying in `DOWNLOADING`. Request and response formats are unchanged, and no change is needed if you use an official SDK. * **YouTube Shorts links work again.** YouTube Shorts links submitted to `POST /api/files/social` are downloaded and analyzed. **October 29, 2026** ## Breaking changes None. ## Changes to be aware of * **Scans still analyzing after 2 hours now end as `UNABLE_TO_EVALUATE`.** If a scan stays in `ANALYZING` for 2 hours (previously 12 hours), `overallStatus` on `GET /api/media/users/{requestId}` is set to `UNABLE_TO_EVALUATE`. Resubmit the file to try again. The official SDKs already treat `UNABLE_TO_EVALUATE` as a final status, so no code change is needed. **October 22, 2026** ## Breaking changes None. ## Fixed * **YouTube links no longer fail.** YouTube links submitted to `POST /api/files/social` are downloaded and analyzed again. Since the beginning of October, these requests could end with `DOWNLOAD_FAILED` in `overallStatus`. If you have YouTube requests that failed this way since then, resubmit the links. YouTube Shorts links aren't supported yet. Request and response formats are unchanged, and no change is needed if you use an official SDK. **October 15, 2026** ## Breaking changes None. ## Model updates * **Image model retrained on newer image-to-video generators.** The image model is retrained with frames from videos made by newer image-to-video generators, including Google's Veo 3.1, to improve detection of this content. The response format is unchanged. Scores for the same image can differ from earlier results. ## Improved * **More stable video processing.** Video scans are more stable and less likely to slow down during heavy video traffic. **October 9, 2026** ## Breaking changes None. ## Model updates * **Image model retrained for OpenAI GPT Image content.** The image model is retrained to catch more images created with OpenAI's GPT Image models. The response format is unchanged. Scores for the same image can differ from earlier results. **October 8, 2026** ## Breaking changes None. ## Improved * Social media link imports now accepts TikTok `tiktok.com/t/` short links and TikTok mobile links `m.tiktok.com`. **October 1, 2026** ## Breaking changes None. ## Model updates * **Faster video results.** The video model was optimized for speed, so video results return faster. ## Improved * **More social media link formats.** Social media link imports now accept mobile and shortened links: `mobile.twitter.com`, `m.facebook.com`, and `web.facebook.com` links; `fb.me`, `instagram.com/share/` short links; Threads `share` links; and `vm.tiktok.com` and `vt.tiktok.com` short links for TikTok videos. ## Fixed * **Facebook share links for images.** Images shared with `facebook.com/share/p/` links were sometimes treated as videos and returned `DOWNLOAD_FAILED`. They now import and are analyzed as images. * **More reliable presigned uploads.** A presigned URL could stop working minutes after it was requested, before the lifetime it was given, because it was signed with credentials that were about to expire. These URLs now stay valid for the lifetime they were issued with. **September 25, 2026** ## Breaking changes None. ## Improved * **Image support for social media links.** Social media link imports now download and analyze images, not just videos. Image scans are supported only for public posts on X, Facebook, Instagram, and Threads. For posts with multiple images, only the first image is analyzed. Mobile and shortened links aren't supported yet. ## Fixed * **Social media imports no longer stall.** Imports that could stay in a downloading state indefinitely now time out. A timed-out import returns `DOWNLOAD_FAILED` in `overallStatus`, and `socialLinkDownloadFailed` is `true`. **September 17, 2026** ## Breaking changes * **Presigned uploads use a new domain.** The `signedUrl` returned by `POST /api/files/aws-presigned` now points to `api.prd.realitydefender.xyz` instead of AWS S3. If your network or client restricts which hosts it can upload to, allow `api.prd.realitydefender.xyz`. The official SDKs already use this flow, so no code change is needed if you use one. If you upload with your own HTTP client, send a PUT request to the `signedUrl` exactly as returned, with the file as the raw request body and a `Content-Type: application/octet-stream` header. ## Improved * **30-minute limit on video.** Video files longer than 30 minutes are no longer analyzed. Split longer recordings into segments of 30 minutes or less before uploading. Media Detail returns a not-applicable result instead of a processing error. overallStatus and resultsSummary.status are both NOT\_APPLICABLE. resultsSummary.metadata.reasons contains: ```json theme={null} "reasons": [ { "code": "duration: video too long", "type": "Not applicable", "name": "Video too long", "explanation": "Videos longer than 30 minutes are not analyzed. Trim the video to 30 minutes or less and try again.", "rawReason": "duration: video too long" } ] ``` * **Context-aware explainability fields withheld.** Media Detail still returns the image or video context model. Its data keeps score and decision. The sources field remains only when reverse-image results are already included. These undocumented fields are omitted: explanation, image\_description, manipulation\_reasons, potential\_source, image\_type, and recognizable\_identities. aggregation.json for scans run after this change omits contextResult. Files written earlier still include it. If your integration reads those fields, use the documented response fields only. * **Faster video results.** Video analysis now completes about twice as fast. * **Shorter queue times during busy periods.** Video processing capacity now scales with demand. **September 8, 2026** ## Breaking changes None. ## Changes to be aware of * **API keys and webhooks have their own pages.** In the web app, API keys and webhooks are now separate pages in the main navigation, each with a tab per product. To manage RealScan keys, go to **API keys > RealScan**. To manage RealScan webhooks, go to **Webhooks > RealScan**. **September 3, 2026** ## Breaking changes None. ## Improved * **Faster results for social media links that can't be downloaded.** When a submitted social media URL can never be downloaded, such as a post with no media attached or content that requires app-only access, the request now fails after the first confirmed error instead of retrying up to five times. You receive the failure result sooner. The set of links that fail is unchanged. # Create User Feedback Source: https://docs.realitydefender.com/api-reference/endpoint/create_user_feedback POST api/v2/user-feedback **requestId** `string` The media result identifier (required). This is the `requestId` returned when a file was processed; you can also obtain it from the [Media Detail](/api-reference/endpoint/get_media_detail) response or the web app when viewing a result. **label** `string` Your label for the content (required). One of: `REAL`, `SYNTHETIC`, `MANIPULATED`, `UNKNOWN`. **feedbackCategory** `string` The type of feedback (required). One of: `FALSE_POSITIVE`, `FALSE_NEGATIVE`, `CONFIRMATION`, `OTHER`. **comment** `string` Optional free-text comment. If omitted, no comment is stored. Submits user feedback for a completed scan result. The server records who submitted the feedback, links it to the result, and may trigger internal notifications. A successful request returns `201 Created` with the created feedback record. > [!NOTE] > > You may only submit feedback for a result you uploaded, for a result in your same organization, or, for certain roles, on behalf of your organization. If the `requestId` is unknown, the API returns `400`. If you are not allowed to comment on that result, the API returns `403`. ### Authorization You must include the `x-api-key` header in your request. The key must belong to a user with RealScan access to authenticate the request and properly attribute the feedback to the correct user and organization. ### Errors * **400 Bad Request** — No media result exists for the given `requestId` (`"Media result does not exist!"`). * **403 Forbidden** — The authenticated user cannot submit feedback for that result (`"You are not authorized to create feedback for this media result!"`). ### Sample request ```bash curl theme={null} curl -X POST \ 'https://api.prd.realitydefender.xyz/api/v2/user-feedback' \ -H 'X-API-KEY: your-api-key-here' \ -H 'Content-Type: application/json' \ -d '{ "requestId": "your-request-id", "label": "REAL", "feedbackCategory": "CONFIRMATION", "comment": "Looks correct in context." }' ``` ```python python theme={null} import requests url = "https://api.prd.realitydefender.xyz/api/v2/user-feedback" headers = { "X-API-KEY": "your-api-key-here", "Content-Type": "application/json", } payload = { "requestId": "your-request-id", "label": "REAL", "feedbackCategory": "CONFIRMATION", "comment": "Looks correct in context.", } response = requests.post(url, json=payload, headers=headers) print(response.status_code, response.json()) ``` ### Sample response `201 Created` — body shape is similar to: ``` { "id": "uuid", "userId": "user-id", "requestId": "your-request-id", "institutionId": "institution-id", "text": "Looks correct in context.", "category": "CONFIRMATION", "userName": "Jane Doe", "userEmail": "jane@example.com", "orgName": "Organization name", "mediaType": "VIDEO", "mediaViewUrl": "https://...", "mediaSource": "API", "label": "REAL", "createdAt": "2025-01-15T12:00:00.000Z" } ``` Field presence may vary slightly depending on the user profile and the stored result; the `text` field is only populated if a `comment` is included in the request. # All Media Source: https://docs.realitydefender.com/api-reference/endpoint/get_all_media GET api/v2/media/users/pages/{page_number} **size** `number` The number of results to return per page. Default is 10. **name** `string` Results where the file name matches the input name. **startDate** `string` Returns upload data from startDate to now. Use format 'yyyy-mm-dd'. **endDate** `string` Returns upload data from startDate (if entered) to endDate. Use format 'yyyy-mm-dd'. **page\_number** `string` Specifies which page to return when iterating through results. Use this endpoint to view the deepfake detection results for all submitted items, including uploaded files and social media URLs. > [!NOTE] > > This endpoint is specific to a given user's uploads. Although organization administrators can view organization-wide uploads, this endpoint will not return organization-wide uploads. ### Authorization You must include the `x-api-key` in your request headers. This key is essential for authenticating your request and ensuring secure access to the API. ### Pagination By default, if no page is defined, the API will return 100 responses. In order to paginate through responses, you will want to specify a page number in the URL: `/api/v2/media/users/pages/{page-number}`. ### Sample Request ```bash curl theme={null} curl -X GET "https://api.prd.realitydefender.xyz/api/v2/media/users" \ -H "X-API-KEY: your-api-key" \ -H "Content-Type: application/json" ``` ```python python theme={null} import requests url = "https://api.prd.realitydefender.xyz/api/v2/media/users" headers = { "X-API-KEY": "your-api-key", "Content-Type": "application/json" } response = requests.get(url, headers=headers).json() print(response) ``` ### Response The response contains a list of responses for each submitted item. For more detail on how to parse the individual response, please visit our [Media Detail](/api-reference/endpoint/get_media_detail) API documentation. > [!WARNING] > > We highly recommend that you leverage the ensemble results that are returned rather than building off the individual model results. # Media Detail Source: https://docs.realitydefender.com/api-reference/endpoint/get_media_detail GET api/media/users/{requestId} **requestId** `string` Returns deepfake detection result for specified requestId. This endpoint returns the results for a specific upload. When you upload a file or submit a social media URL, the response of a successful request will contain the `requestId`. You can also find your requestId in the URL path when you access the upload in the web application. ### Authorization To fetch media detail, you must include the `x-api-key` in your request headers. This key is essential for authenticating your request and ensuring secure access to the API. ### Sample Code Snippet Here's an example of how you can fetch the results for an uploaded file or social media URL. ```bash curl theme={null} REQUEST_ID="your-requestId" API_KEY="your-api-key" curl -X GET \ "https://api.prd.realitydefender.xyz/api/media/users/${REQUEST_ID}" \ -H "X-API-KEY: ${API_KEY}" \ -H "Content-Type: application/json" ``` ```python python theme={null} import requests requestId = "your-request-id" url = f"https://api.prd.realitydefender.xyz/api/media/users/{requestId}" headers = { "X-API-KEY": "your-api-key", "Content-Type": "application/json" } response = requests.get(url, headers=headers).json() print(response.get('filename','N/A')) print(response.get('overallStatus','N/A')) ``` ### Sample Response ``` { "filename": "rd-file-name", "originalFileName": "original-file-name", "requestId": "request-id", "uploadedDate": "uploaded-date", "mediaType": "media-type", // AUDIO, VIDEO, TEXT, IMAGE "socialLink": "social-link", // populated for social media submissions "socialLinkDownloaded": true, // populated for social media submissions "socialLinkDownloadFailed": false, // populated for social media submissions "showAudioResult": "show-audio-result", // True, False "audioRequestId": "audio-request-id", // populated if showAudioResult is True "userId": "user-id", "institutionId": "institution-id", "releaseVersion": "2.3.1", "overallStatus": "status", // AUTHENTIC, FAKE, SUSPICIOUS, NOT_APPLICABLE, UNABLE_TO_EVALUATE "resultsSummary": { "status": "status", // AUTHENTIC, FAKE, SUSPICIOUS, NOT_APPLICABLE, UNABLE_TO_EVALUATE "metadata": { "languages": ["language"], // detected languages include english, spanish, and portuguese "finalScore": score // overall score when present; > 0 and < 100. Authentic 0–44, Suspicious 45–55, Manipulated 56–100 } }, "models": [ { "name": "model-name", // see Possible models; names can change over time "data": { "score": 0.99, "decision": "ARTIFICIAL", // or AUTHENTIC "raw_score": 0.99 }, "status": "FAKE", // AUTHENTIC, FAKE, SUSPICIOUS, NOT_APPLICABLE, UNABLE_TO_EVALUATE, ANALYZING "predictionNumber": 0.99, // raw model score (typically 0–1); may be null "normalizedPredictionNumber": 99, // > 0 and < 100 when available; else null "rollingAvgNumber": null, "finalScore": 99, // > 0 and < 100 when available; else null "code": null // e.g. "not_applicable" when status is NOT_APPLICABLE } // additional model results... ], "storageLocation": "https://...presigned...", "thumbnail": "https://...presigned...", // may be "" when unavailable "aggregationResultUrl": "institution-id/request-id.ext/aggregation.json", "modelMetadataUrl": "https://...presigned.../aggregation.json", "audioModelMetadataUrl": "https://...presigned.../aggregation.json", // combined video+audio only; else "" "heatmaps": { "model-name": "https://...presigned.../heatmaps/model-name/heatmap.png" }, "explainabilityUrl": "" // text: pre-signed HTML URL; otherwise typically "" } ``` ## Response Schema ### Core fields | Field | Type | Description | | - | - | - | | `filename` | string | Display / upload filename | | `originalFileName` | string | Original uploaded filename | | `requestId` | string | ID used to fetch this result | | `uploadedDate` | string | Upload timestamp (ISO 8601) | | `mediaType` | string | `IMAGE`, `VIDEO`, `AUDIO`, or `TEXT` | | `overallStatus` | string | Overall media status. `AUTHENTIC` (0–44), `SUSPICIOUS` (45–55), or `FAKE` (56–100, shown as Manipulated in the product). Also `NOT_APPLICABLE` or `UNABLE_TO_EVALUATE`. | | `userId` | string | Uploading user ID | | `institutionId` | string \| null | Organization ID | | `releaseVersion` | string | Platform release version for the scan | | `resultsSummary` | object | Ensemble status, score, and optional reasons/errors | | `models` | array | Per-model detection results (see below) | ### `models[]` object Each entry in `models` has the following fields: | Field | Type | Description | | - | - | - | | `name` | string | Model slug (see [Possible models](#possible-models)). **Model names can change in the future** as detectors are added, renamed, or retired. | | `status` | string | Model status (`FAKE`, `AUTHENTIC`, `SUSPICIOUS`, `NOT_APPLICABLE`, `UNABLE_TO_EVALUATE`, `ANALYZING`, …) | | `predictionNumber` | number \| null | Raw model score when available (typically 0–1). Not restricted; can be exactly `0` or `1`. | | `normalizedPredictionNumber` | number \| null | Normalized score when available; always **> 0 and \< 100** (never exactly 0 or 100) | | `rollingAvgNumber` | number \| null | Rolling average when applicable (same 0–100 normalization/clamping as `normalizedPredictionNumber` when present) | | `finalScore` | number \| null | Final model score when available; always **> 0 and \< 100** (never exactly 0 or 100). **Authentic** 0–44, **Suspicious** 45–55, **Manipulated** 56–100 (API status `FAKE`). See [Score interpretation](#score-interpretation). | | `data` | object \| null | Model-specific payload (for example `decision`, `score`, `raw_score`; shape varies by model) | | `error` | object \| string \| null | Error details when the model failed | | `code` | string \| null | Machine-readable code (for example `not_applicable`) | Missing or in-flight models may appear with `status: "ANALYZING"` and null scores. Models that do not apply to the media type typically return `status: "NOT_APPLICABLE"` with `code: "not_applicable"` and `data: null`. ### Score interpretation When `finalScore` is present, Reality Defender maps it to one of three conclusions. The same bands apply to the overall score in `resultsSummary.metadata.finalScore` (reflected in `overallStatus` and `resultsSummary.status`) and to each model's `finalScore`. | Conclusion | Score | API status | Guidance | | - | - | - | - | | Authentic | 0–44 | `AUTHENTIC` | Low likelihood of manipulation or AI generation; continue normal workflows | | Suspicious | 45–55 | `SUSPICIOUS` | Moderate likelihood of manipulation; worth a closer look or human review | | Manipulated | 56–100 | `FAKE` | High likelihood that the content has been manipulated or AI-generated; trigger escalation or secondary validation | A higher score means a higher likelihood of manipulation. It does not mean the entire file is synthetic, or that every frame, second, or pixel was generated. Scores are restricted to **> 0 and \< 100** (never exactly 0 or 100). When metadata or context analysis sets the conclusion directly, the overall score may be absent and `overallStatus` is still the conclusion to use. ### Explainability and visualization fields These fields power the same visualization experience as the Reality Defender UI. | Field | Type | Media types | Description | | - | - | - | - | | `heatmaps` | object | **Image** (meaningful) | Map of model name → pre-signed PNG URL. Usable heatmaps are only for **artificial image models that are not ensemble** (`models[].status` = `FAKE` / decision `ARTIFICIAL`). The API may still return entries for non-artificial image models, ensemble models, or other media types, but those links are invalid. | | `explainabilityUrl` | string | **Text** (populated) | Pre-signed URL to HTML explainability output (for example `explainability-rd-llm-txt.html`). Empty string (`""`) for image/video/audio in typical responses. | | `thumbnail` | string | Video (common), Image (when available) | Pre-signed thumbnail URL, or `""` when unavailable | | `storageLocation` | string | All | Pre-signed URL to the original uploaded media (may be empty if originals were deleted by retention policy) | | `aggregationResultUrl` | string | All | Raw S3 object key for `aggregation.json` (not a downloadable URL) | | `modelMetadataUrl` | string | All | Pre-signed URL for the same `aggregation.json` referenced by `aggregationResultUrl`. Fetch this to build UI-like visualizations. | | `audioModelMetadataUrl` | string | Combined video+audio | Pre-signed URL for the extracted-audio aggregation JSON when `showAudioResult` is true; otherwise `""` | #### `aggregationResultUrl` / `modelMetadataUrl` and UI visualization * `aggregationResultUrl` is the storage key, typically shaped like: `{institutionId}/{requestId}{extension}/aggregation.json` (for example `.mp4`, `.png`, `.txt`, or an audio extension) * `modelMetadataUrl` is the browser-readable, pre-signed URL for that file. * For combined video+audio scans, `audioModelMetadataUrl` points at the extracted-audio aggregation JSON (a separate key/path from the video aggregation). * The Reality Defender UI loads this JSON to render report detail (bounding boxes, timelines/scenes, audio chunks, text conclusions, and related metadata). * Approximate contents by media type: * **Image**: `bboxes`, `conclusions`, optional `contextResult` * **Video**: frame/timeline fields (for example scenes, frames, tubes), `models`, `ensembles`, `conclusions`, optional `contextResult` * **Audio**: `chunks`, `languages`, `conclusions`, `models`, `ensembles`, plus audio metadata * **Text**: `models`, `ensembles`, `conclusions` Use `modelMetadataUrl` / `audioModelMetadataUrl` (not `aggregationResultUrl`) when downloading aggregation artifacts from a client. #### Pre-signed URL expiry `heatmaps`, `thumbnail`, `storageLocation`, `modelMetadataUrl`, `audioModelMetadataUrl`, and `explainabilityUrl` are pre-signed URLs that expire after **15 minutes** (`X-Amz-Expires=900`). If a URL returns access denied / expired: 1. Call this media detail endpoint again for the same `requestId`. 2. Use the newly returned pre-signed URLs. ### Possible models `models[].name` values you may see (depending on media type and release version): > [!NOTE] > > Model names are not a stable contract. Detectors can be added, renamed, or removed over time. Treat the list below as illustrative examples, and always read `models[].name` from the live response rather than hard-coding specific model slugs. **Image:** `rd-cedar-img`, `rd-elm-img`, `rd-oak-img`, `rd-pine-img`, `rd-img-ensemble`, `rd-context-img` **Video:** `rd-erie-vid`, `rd-tahoe-vid`, `rd-dynamics-vid`, `rd-vid-ensemble`, `rd-context-vid` **Audio:** `rd-slim-aud`, `rd-everest-aud`, `rd-aud-ensemble` **Text:** `rd-llm-txt` The exact set returned for a scan depends on your plan, institution settings, and `releaseVersion`. ## Response Details #### NOT\_APPLICABLE Reality Defender will return NOT\_APPLICABLE as a status if the file contains certain characteristics that are known to impact accuracy. The reason behind the NOT\_APPLICABLE response will be returned as a list in the `metadata` field. For example, see below for a `resultsSummary` returned for an image that was not applicable. ``` "resultsSummary": { "status": "NOT_APPLICABLE", "metadata": { "reasons": [ { "code": "relevance", "message": "no faces detected/faces too small" } ] } } ``` **Image Reasons** \ Possible reasons returned for `NOT_APPLICABLE` are: * code: relevance * message: no faces detected/faces too small **Video Reasons** \ Currently, our video files do not output reasons. For video visualization (timeline / scene detail), use `modelMetadataUrl` instead. **Audio Reasons** \ Possible reasons returned for `NOT_APPLICABLE` are: * code: duration * message: audio too short (\<1.5s) * code: detected * message: dialtone and/or music * code: cross-talk * message: more than one speaker detected * code: quality * audio too noisy * code: language * audio is more likely in language #### UNABLE\_TO\_EVALUATE Response Reality Defender will return UNABLE\_TO\_EVALUATE if an error occurred while processing the file. This is typically caused by timeouts. You can try again, or upload a smaller file. Here is an example of the `resultsSummary` returned for an image that is unable to be evaluated. ``` "resultsSummary": { "status": "UNABLE_TO_EVALUATE", "metadata": {}, "error": { "code": "model-error", "message": "An error occurred while processing the file. Please try uploading the file again." } } ``` # AWS Presigned URL Source: https://docs.realitydefender.com/api-reference/endpoint/presigned POST api/files/aws-presigned **fileName** `string` The file name of the file you would like to upload, including the file extension. Before uploading a file directly to our storage, you'll need to request a pre-signed URL. This URL provides secure, temporary access to upload your file. ### Authorization To request a pre-signed URL, you must include the `x-api-key` in your request headers. This key is essential for authenticating your request and ensuring secure access to the API. ### Supported File Types * Images: `.jpg`, `.jpeg`, `.png`, `.gif`, `.webp` * Audio: `.mp3`, `.wav`, `.m4a`, `.aac`, `.ogg`, `.flac`, `.alac` * Video: `.mp4`, `.mov` * Text: `.txt` > [!NOTE] > > The Free plan supports image uploads only. Video, audio, and text uploads require a paid plan. ### Free Plan Restriction If an organization on the Free plan requests a pre-signed URL for a video, audio, or text file, the request is rejected before any upload or analysis, and no scan or credit is used. The API returns HTTP `403` with the error code `free-tier-restriction` and the message "Forbidden: Video, audio, and text uploads require a paid plan". After upgrading, it can take a few minutes for access to take effect. ### Size Limits * Text: up to 900KB * Images: up to 50MB * Audio: up to 20MB * Video: up to 250 MB; max duration 30 minutes ### Filename Restrictions * Maximum length: 200 characters * Special characters will be converted to underscores * Case insensitive ### Sample Code Snippet Here's an example of how you can request a pre-signed URL and upload a file. ```bash curl theme={null} # First request to get the presigned URL curl -X POST \ 'https://api.prd.realitydefender.xyz/api/files/aws-presigned' \ -H 'X-API-KEY: your-api-key-here' \ -H 'Content-Type: application/json' \ -d '{"fileName": "your-file.mp4"}' # Second request to upload the file using the presigned URL # Important: The @ prefix is required before the filename when using --data-binary # This tells curl to read the file content (works on all platforms: macOS, Linux, Windows) # For filenames with spaces or special characters, wrap the entire @filename in quotes curl -X PUT \ 'presigned-url-from-previous-response' \ --data-binary '@your-file.mp4' # Example with a filename containing spaces: # curl -X PUT 'presigned-url-from-previous-response' \ # --data-binary '@filename with spaces.mp4' ``` ```python python theme={null} import requests file_path = "your-file.mp4" url = "https://api.prd.realitydefender.xyz/api/files/aws-presigned" payload = { "fileName": file_path } headers = { "X-API-KEY": "your-api-key-here", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) response_data = response.json() signed_url = response_data.get("response", {}).get("signedUrl") with open(file_path, 'rb') as file: file_data = file.read() response = requests.put(signed_url, data=file_data, timeout=20) ``` # Social Media URL Upload Source: https://docs.realitydefender.com/api-reference/endpoint/social POST api/files/social **socialLink** `string` The social media URL you would like to analyze. Use this endpoint to submit a social media link for deepfake detection. The returned response includes a `requestId` that you can use to fetch the analysis result from the media detail endpoint. ### Authorization To submit a social media URL, you must include the `x-api-key` in your request headers. ### Supported Social Platforms * Facebook * Instagram * Twitter/X * YouTube * TikTok * Threads ### Sample Code Snippet Here's an example of how you can submit a social media URL and then retrieve the result. ```bash curl theme={null} curl -X POST \ 'https://api.prd.realitydefender.xyz/api/files/social' \ -H 'X-API-KEY: your-api-key-here' \ -H 'Content-Type: application/json' \ -d '{"socialLink": "https://www.youtube.com/watch?v=6O0fySNw-Lw"}' ``` ```python python theme={null} import requests url = "https://api.prd.realitydefender.xyz/api/files/social" payload = { "socialLink": "https://www.youtube.com/watch?v=6O0fySNw-Lw" } headers = { "X-API-KEY": "your-api-key-here", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers).json() print(response) ``` # Quickstart Source: https://docs.realitydefender.com/api-reference/quickstart Getting started with our API for deepfake detection > [!WARNING] > > **Note:** The Reality Defender team now recommends leveraging the [Reality > Defender SDKs](../sdks/quickstart) for building most integrations. Consider > checking if your preferred language is included in Reality Defender's suite of > SDKs. ## Welcome It's easy to get started with the Reality Defender API. With a couple simple lines of code, you can upload files or submit social media URLs to Reality Defender! ## Authentication The Reality Defender API uses a secure and straightforward authentication mechanism via the X-API-KEY header. Every API request must include your unique API key in this header to authenticate and authorize your access to the platform's features and resources. You will need access to the Reality Defender web platform to generate an API key. Navigate to our [API key settings](https://app.realitydefender.ai/settings/manage-api-keys) to create a key. > [!NOTE] > > API keys are linked to a user. Organization administrators can view uploads > from all users, but only uploads for a given user show up by default in the > [Dashboard](https://app.realitydefender.ai/dashboard). ## Request a signed URL You must request a signed URL to which you will upload your file. ```curl curl theme={null} curl --location 'https://api.prd.realitydefender.xyz/api/files/aws-presigned' \ --header 'X-API-KEY: your-api-key-here' \ --header 'Content-Type: application/json' \ --data '{ "fileName": "your-file-path-here" }' ``` ```python python theme={null} import requests file_path = "your-file-path-here" url = "https://api.prd.realitydefender.xyz/api/files/aws-presigned" payload = { "fileName": file_path } headers = { "X-API-KEY": "your-api-key-here", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) signed_url = response.json().get("response", {}).get("signedUrl") print(signed_url) ``` ## Upload a file to the signed URL Next, upload a file to the signed URL that you received in the prior step. > [!TIP] > > When uploading the file, you should only pass in the file itself. You do not > need to include any other headers or metadata. ```curl curl theme={null} # The @ prefix is required to upload the file content (works on all platforms: macOS, Linux, Windows) # For filenames with spaces or special characters, wrap the entire @filename in quotes curl --location --request PUT "your-signed-url-here" \ --data-binary '@your-file.mp4' ``` ```python python theme={null} import requests file_path = "your-file-path-here" signed_url = "your-signed-url-here" with open(file_path, 'rb') as file: file_data = file.read() response = requests.put(signed_url, data=file_data, timeout=20) print(response) ``` ## Submit a social media URL Alternatively, instead of uploading a file, you can submit a social media URL for analysis. Send the URL to the social upload endpoint, then continue with [Request a result](#request-a-result) below using the returned `requestId`. Supported social platforms include Facebook, Instagram, Twitter/X, YouTube, TikTok, and Threads. ```curl curl theme={null} curl --location 'https://api.prd.realitydefender.xyz/api/files/social' \ --header 'X-API-KEY: your-api-key-here' \ --header 'Content-Type: application/json' \ --data '{ "socialLink": "https://www.youtube.com/watch?v=6O0fySNw-Lw" }' ``` ```python python theme={null} import requests url = "https://api.prd.realitydefender.xyz/api/files/social" payload = { "socialLink": "https://www.youtube.com/watch?v=6O0fySNw-Lw" } headers = { "X-API-KEY": "your-api-key-here", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers).json() print(response) ``` ## Request a result Now that you've uploaded a file or submitted a social media URL, you can request a result. You will need the request ID returned from the prior step. > [!WARNING] > > Larger files may take longer to analyze. You need to poll the API until the > results returns, or set up a webhook. ```curl curl theme={null} curl --location 'https://api.prd.realitydefender.xyz/api/media/users/{request_id}' \ --header 'X-API-KEY: your-api-key-here' \ --header 'Content-Type: application/json' ``` ```python python theme={null} import requests url = "https://api.prd.realitydefender.xyz/api/media/users/{request_id}" headers = { "X-API-KEY": "your-api-key-here", "Content-Type": "application/json" } response = requests.get(url, headers=headers).json() print(response) ``` ## Interpreting the results The Reality Defender API returns a lot of detailed information about our deepfake detection results. However, it's recommended to focus specifically on the ensemble results. View our [Media Detail](api-reference/endpoint/get_media_detail) documentation for more detail, including results from both file uploads and social media URL submissions. # Introduction Source: https://docs.realitydefender.com/introduction Welcome to Reality Defender's Documentation Portal This documentation is designed to guide you through the platform's features, integration processes, and best practices for leveraging Reality Defender to safeguard your organization. Whether you're a developer integrating our API, a content moderator, or an organization aiming to uphold content integrity, you'll find the resources you need to get started. ## Our Product Offerings Explore our multiple offerings and deployment options that best fit your needs. > [card] [SDKs](/sdks/quickstart) > > Easily integrate deepfake detection into your app with the Reality Defender SDK. > [card] [Platform REST API](/api-reference/quickstart) > > REST API for Reality Defender\ > (SDKs are recommended for most cases). > [card] [Web Conferencing](https://www.realitydefender.com/real-time-video-deepfake-detection) > > Protect your employees from real-time deepfake threats. > [card] [Contact Center](https://www.realitydefender.com/solutions/contact-centers) > > Explore our solutions for preventing audio deepfake fraud in contact centers. > [card] [Access Security & Fraud Prevention](https://www.realitydefender.com/solutions/access-security-fraud-prevention) > > Stop fraudsters using AI to open new accounts or manipulate existing ones. > [card] [Brand Safety](https://www.realitydefender.com/solutions/brand-monitoring) > > Scan social media content for potential deepfakes. # Reality Defender SDK Source: https://docs.realitydefender.com/sdks/quickstart The Reality Defender SDK provides tools and libraries for detecting deepfakes and manipulated media through the Reality Defender API. This SDK is available in multiple programming languages to fit your development needs. ## 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](https://github.com/Reality-Defender/realitydefender-sdk-typescript) - For web and Node.js applications * [Python SDK](https://github.com/Reality-Defender/realitydefender-sdk-python) - For Python applications and data science workflows * [Go SDK](https://github.com/Reality-Defender/realitydefender-sdk-go) - For Go applications * [Rust SDK](https://github.com/Reality-Defender/realitydefender-sdk-rust) - For Rust applications * [Java SDK](https://github.com/Reality-Defender/realitydefender-sdk-java) - For Java applications ## Getting Started 1. Obtain an API key from the [Reality Defender Platform](https://app.realitydefender.ai) 2. Choose the SDK for your preferred programming language 3. 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 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: | Language | Media file upload | Social media URL | | - | - | - | | TypeScript | [`examples/basic.ts`](https://github.com/Reality-Defender/realitydefender-sdk-typescript/blob/main/examples/basic.ts) | [`examples/social_media.ts`](https://github.com/Reality-Defender/realitydefender-sdk-typescript/blob/main/examples/social_media.ts) | | Python | [`examples/basic_usage.py`](https://github.com/Reality-Defender/realitydefender-sdk-python/blob/main/examples/basic_usage.py) | [`examples/social_media.py`](https://github.com/Reality-Defender/realitydefender-sdk-python/blob/main/examples/social_media.py) | | Go | [`examples/basic/main.go`](https://github.com/Reality-Defender/realitydefender-sdk-go/blob/main/examples/basic/main.go) | [`examples/social/main.go`](https://github.com/Reality-Defender/realitydefender-sdk-go/blob/main/examples/social/main.go) | | Rust | [`examples/basic.rs`](https://github.com/Reality-Defender/realitydefender-sdk-rust/blob/main/examples/basic.rs) | [`examples/social_media.rs`](https://github.com/Reality-Defender/realitydefender-sdk-rust/blob/main/examples/social_media.rs) | | Java | [`SimpleFileDetectionExample.java`](https://github.com/Reality-Defender/realitydefender-sdk-java/blob/main/src/main/java/ai/realitydefender/examples/SimpleFileDetectionExample.java) | [`SocialMediaDetectionExample.java`](https://github.com/Reality-Defender/realitydefender-sdk-java/blob/main/src/main/java/ai/realitydefender/examples/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` Note: The Free plan supports image uploads only. Video, audio, and text uploads require a paid plan. ## Size Limits * Text: up to 900KB * Images: up to 50MB * Audio: up to 20MB * Video: up to 250 MB; max duration 30 minutes ## 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`** * **Heatmaps**: `getResult` includes a `heatmaps` map (model name → pre-signed PNG URL) for image scans when a **non-ensemble** model is artificial (`MANIPULATED` in the SDK result; API `FAKE` / UI ARTIFICIAL). Ensemble models and authentic/non-artificial models are omitted. For video, audio, and text, `heatmaps` is `null`. These URLs expire after 15 minutes — re-fetch the result to refresh them. For other media-detail fields (aggregation metadata, explainability, thumbnails, etc.), see [Media Detail](/api-reference/endpoint/get_media_detail). ## Support For questions, issues, or feature requests, please file an issue in this repository or contact [support@realitydefender.com](mailto:support@realitydefender.com)