Skip to navigation

Deepfake Detection

Analyze audio, images, and video for synthetic tampering. Submit media for detection and retrieve structured metrics and visualizations.

For a single-file request, you can also opt in to Resemble watermark detection and SynthID by setting detect_watermark: true. Watermark evidence is returned separately and never changes the deepfake verdict.

Choose an Integration

WorkflowUse it forInterface
Single detectionPersisted analysis of one audio, image, or video file, with synchronous waiting, polling, or a callback.Create Detection
Batch detectionPersisted analysis of up to 50 files in one request.Batch Detection
Streaming audioLive, audio-only analysis with per-window results while audio is still arriving. Streaming results are not persisted as Detect jobs.Streaming Audio Detection

Media can be referenced by a public HTTPS url or by a media_token issued from the Secure Upload API. Use a secure upload when you prefer not to host the source file publicly — the API reads it once via the signed token, which expires 1 hour after issuance.

Request Schema

interface DetectionRequest {
url?: string; // publicly accessible media URL
media_token?: string; // token from POST /secure_uploads (mutually exclusive with url)
callback_url?: string;
visualize?: boolean;
frame_length?: number;
start_region?: number;
end_region?: number;
max_video_secs?: number;
modality?: "audio" | "video" | "all"; // video only
face_only?: boolean; // visual video analysis only; default false
intelligence?: boolean;
detect_watermark?: boolean; // single-file audio/image/video only; default false
audio_source_tracing?: boolean;
use_reverse_search?: boolean; // image only
use_ood_detector?: boolean;
zero_retention_mode?: boolean;
}

Face-only Video Analysis

Set face_only: true to focus visual video detection on faces by masking non-face regions before analysis. Face-only mode is effective only for video inputs that run visual analysis (modality: "all" or modality: "video"). Audio, image, and audio-only video requests are accepted, but their effective value is false.

Face-only mode does not disable audio analysis or select which video components run. Use modality for that. It also does not change billing or the structure of detection verdicts and reports. Detection responses expose the effective setting in face_only for auditing.

Optional Watermark Analysis

Set detect_watermark: true on a single audio, image, or video detection to run the same decode detectors as the standalone Watermark API:

  • Audio checks Resemble Perth v1, Resemble Perth v2, and SynthID.
  • Image and video check the Resemble image/video watermark detector and SynthID.

The option defaults to false. When omitted or false, no Watermark job is created, no extra charge is added, and the watermark response field is omitted. When enabled, the existing Watermark detection charge is added to the request; SynthID does not add a separate charge.

Watermark analysis uses the standalone source limit of 200 MB for audio, image, and video. It is not supported for batch or zip submissions.

Response Shapes

interface DetectIntelligenceResult {
uuid: string;
status: "processing" | "completed" | "failed";
error_message: string | null;
description: string | IntelligenceDetails | null;
created_at: string;
detect_uuid: string;
}
interface DetectWatermarkResult {
status: "pending" | "processing" | "completed" | "failed";
metrics?: object; // Resemble detector metrics plus optional synthid boolean
error_message?: string; // present only when the watermark analysis failed
}
interface BaseDetectionResult {
success: true;
item: {
uuid: string;
created_at: string;
updated_at: string;
duration: string;
media_type: string;
status: string; // "processing" | "completed" | "failed"
face_only: boolean; // effective value for this detection
url?: string;
audio_url?: string; // alias of url
filename?: string;
zero_retention_mode: boolean;
file_deleted_at: string | null;
visualize?: boolean;
audio_source_tracing_enabled?: boolean;
use_ood_detector?: boolean;
extra_params?: object;
error_message?: string;
// GET /detect/{uuid}?experts=true returns an array; other responses use one result.
intelligence?: DetectIntelligenceResult | DetectIntelligenceResult[] | null;
// Present only when detect_watermark=true was requested.
watermark?: DetectWatermarkResult;
audio_source_tracing?: {
label: string;
error_message: string | null;
} | null;
};
}
interface AudioDetectionResult extends BaseDetectionResult {
item: BaseDetectionResult["item"] & {
metrics: {
label: string;
score: string[];
consistency: string;
aggregated_score: string;
image?: string;
};
};
}
interface ImageDetectionResult extends BaseDetectionResult {
item: BaseDetectionResult["item"] & {
image_metrics: {
type: string;
label: string;
image: string;
score: number;
children: any[];
ifl?: {
score: number;
heatmap: string; // URL to heatmap visualization
};
reverse_image_search_sources?: Array<{ // present when use_reverse_search is enabled
url: string;
title: string;
reason: string;
verdict: string; // e.g. "known_fake"
similarity: number;
}>;
};
};
}
interface VideoAttackType {
code: string; // e.g. "F1"
name: string; // e.g. "Face swap"
prob: number; // 0-1; the entries in one list sum to 1
}
interface VideoDetectionResult extends BaseDetectionResult {
item: BaseDetectionResult["item"] & {
metrics: AudioDetectionResult["item"]["metrics"];
video_metrics: {
label: string;
score: number;
certainty: number;
treeview?: string;
children: Array<{ // VideoResult
type: string;
conclusion: string;
score: number;
certainty: number;
"certainty (%)": string;
attack?: VideoAttackType[]; // only when scored fake; highest prob first
children: Array<{ // VideoChunkResult, one per analyzed window
type: string;
conclusion: string;
score: number;
certainty: number;
"certainty (%)": string;
chunk_index: number;
start_time: number; // seconds
end_time: number; // seconds
attack?: VideoAttackType[]; // only when this chunk is scored fake
children: Array<{ // VideoFrameResult
type: string;
conclusion: string;
score: number;
certainty: number;
"certainty (%)": string;
timestamp: number;
children?: Array<{
type: string;
conclusion: string;
score: number;
certainty: number;
"certainty (%)": string;
}>;
}>;
}>;
}>;
};
};
}

For an otherwise successful Detect with watermark analysis, item.status remains processing until the nested Watermark job is terminal. A core detection failure still reports failed. A failed Watermark job is reported in item.watermark without failing an otherwise successful deepfake detection. Intelligence remains independently asynchronous unless its own wait behavior is requested.

Video Attack Type

When a video is scored fake, video_metrics also reports how the fake was most likely made, for example face swap, lip sync, or text-to-video. No request parameter is needed; the field is returned automatically on fake video results.

FieldDescribes
video_metrics.children[0].attackThe whole video: the average of its fake chunks’ distributions.
video_metrics.children[0].children[i].attackOne analyzed chunk (a window of about 4 seconds). Use it to see when each attack appears.

Each attack is a probability distribution over every attack type: an array of { code, name, prob } sorted from most to least likely, with prob values that sum to 1. attack[0] is the most likely attack. There is no confidence cut-off: the first entry is always the best guess, and its prob shows how sure the model is. A video that combines two techniques shows the probability split between them, and its chunks show where each one appears.

"attack": [
{ "code": "F1", "name": "Face swap", "prob": 0.9976 },
{ "code": "F5", "name": "Audio-driven portrait animation", "prob": 0.0011 },
{ "code": "L3", "name": "Object insertion", "prob": 0.0006 }
]

The example is trimmed; a real response lists every attack type.

attack appears only on results scored fake (score of 0.5 or higher). A video scored real has no attack field, and chunks scored real are left out of the video’s average. Attack type is reported for video only; image responses do not include it. It does not change the deepfake score or verdict.

CodeAttack typeWhat it means
S0Generated, mode unknownFully generated video, either text-to-video or image-to-video.
S1Text-to-videoGenerated from a text prompt only.
S2Image-to-videoA single still image animated into a video.
V1Style / appearance transferThe whole frame is restyled while keeping the source video’s layout and motion.
V2Neural rendering / enhancementA generative model repaints every frame of a non-camera source, such as a game render, to look photoreal.
V3Instruction video-to-video, scope unknownA video editing model was used, but not whether it restyled, edited a region, or swapped a face.
L1Region replace / inpaintA region of the frame is regenerated with different content.
L2Erase / object removalAn object is removed and the area filled with background.
L3Object insertionNew content is added to the scene.
L4Background replacementThe subject is kept and the background is regenerated.
L5OutpaintingThe original frame is kept and extended with generated borders.
L6Text / overlay editRendered text or graphics, such as signs or captions, are changed.
F1Face swapA person’s face is replaced with another identity, keeping pose, expression, and scene. Includes real-time swaps in live calls.
F2Lip sync / visual dubbingThe same person and footage, with the mouth re-rendered to match new audio.
F3Face attribute / expression editThe same identity with attributes such as age, hair, expression, or gaze changed.
F4Video-driven reenactmentA face animated with the motion and expressions of a driver video.
F5Audio-driven portrait animationA single face image animated into a talking head from speech audio.
F6Proprietary talking-person productMade with a commercial avatar product whose method is not disclosed.
X0Fake, method unknownFake, but the method could not be determined.

S0, V3, F6, and X0 are broad categories that each cover several of the specific types. Group codes are never returned as attack[0].

New attack types may be added in future releases. If you receive a code you don’t recognize, show its name instead of treating it as an error.

FieldTypeDescription
pipelinestring | nullDeprecated field that may appear on older image/video detects returned by the API. Ignored for new detections.

Use the endpoints below to submit jobs and retrieve detection results for each modality.