> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.resemble.ai/llms.txt.
> For full documentation content, see https://docs.resemble.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.resemble.ai/_mcp/server.

# Deepfake Detection

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

Media can be referenced by a public HTTPS `url` or by a `media_token` issued from the [Secure Upload API](/detect/secure-uploads). 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

```ts
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;
  intelligence?: boolean;
  audio_source_tracing?: boolean;
  use_reverse_search?: boolean; // image only
  use_ood_detector?: boolean;
  zero_retention_mode?: boolean;
}
```

## Response Shapes

```ts
interface BaseDetectionResult {
  success: true;
  item: {
    uuid: string;
    created_at: string;
    updated_at: string;
    duration: string;
    media_type: string;
    status: string; // "processing" | "completed" | "failed"
    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;
    intelligence?: {
      uuid?: string;
      description: string | IntelligenceDetails | null;
      created_at: string;
      detect_uuid?: string;
    } | null;
    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 VideoDetectionResult extends BaseDetectionResult {
  item: BaseDetectionResult["item"] & {
    metrics: AudioDetectionResult["item"]["metrics"];
    video_metrics: {
      label: string;
      score: number;
      certainty: number;
      treeview?: string;
      children: Array<{
        type: string;
        conclusion: string;
        score: number;
        certainty: number;
        "certainty (%)": string;
        children: Array<{
          type: string;
          conclusion: string;
          score: number;
          certainty: number;
          "certainty (%)": string;
          timestamp: number;
          children: Array<{
            type: string;
            conclusion: string;
            score: number;
            certainty: number;
            "certainty (%)": string;
          }>;
        }>;
      }>;
    };
  };
}
```

| Field      | Type             | Description                                                                                                    |
| ---------- | ---------------- | -------------------------------------------------------------------------------------------------------------- |
| `pipeline` | `string \| null` | Deprecated 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.

## Related Endpoints

* [Create Detection](/detect/create) - Submit a detection job
* [Get Detection](/detect/get) - Retrieve a single detection result
* [List Detects](/detect/list) - Retrieve all detection results with pagination