Skip to main content
Version: 2.0.0

Description

The Resemble Deepfake Detection API endpoints provide functionality to detect deepfakes in media files (audio, images, and video). These endpoints allow you to submit a media file for deepfake detection, and retrieve detection results.

interface DetectionRequest {
url: string

// Optional parameters for all media types
callback_url?: string
visualize?: boolean

// Optional parameters for audio/video detection
frame_length?: number
start_region?: number
end_region?: number

// Video-specific optional parameters
max_video_fps?: number
max_video_secs?: number
}
// Base interface for all detection responses
interface BaseDetectionResult {
success: true
item: {
uuid: string
created_at: string
updated_at: string
duration: string
media_type: string
url?: string
}
}

// For audio media type
interface AudioDetectionResult extends BaseDetectionResult {
item: BaseDetectionResult['item'] & {
metrics: {
label: string
score: string[]
certainty: string
aggregated_score: string
image?: string
}
}
}

// For image media type
interface ImageDetectionResult extends BaseDetectionResult {
item: BaseDetectionResult['item'] & {
image_metrics: {
type: string
score: number
label: string
image?: string
children: Array<{
type: string
label: string
description: string
}>
}
}
}

// For video media type
interface VideoDetectionResult extends BaseDetectionResult {
item: BaseDetectionResult['item'] & {
metrics: {
label: string
score: string[]
certainty: string
aggregated_score: string
image?: string
}
video_metrics: {
label: string
score: number
certainty: number
posterior: number
children: Array<{
type: string
score: number
certainty: number
posterior: number
conclusion: string
children?: Array<{
type: string
score: number
certainty: number
posterior: number
conclusion: string
children?: Array<{
type: string
score: number
certainty: number
posterior: number
conclusion: string
patch_type?: string
}>
}>
violations?: string[]
description?: string
}>
image?: string
treeview?: string
}
}
}