---
title: "Detect AI-generated speech"
method: POST
path: "/v1/deepfake/detect"
tags: ["Deepfake detection"]
---

# Detect AI-generated speech

`POST /v1/deepfake/detect`

## Request

- Base URL: `https://platform.detectif.ai`
- URL: `https://platform.detectif.ai/v1/deepfake/detect`
- Auth: HTTP bearer

Checks whether a recording contains AI-generated speech. Send one audio file longer than 4 seconds and at most 120 seconds. Use the result's `verdict`: `real`, `fake`, or `not_sure` when the recording cannot be judged reliably (try a longer or cleaner recording). `score` (0 to 1, higher means more likely AI-generated) is kept for older clients together with `label` and `is_synthetic`. A `not_sure` verdict uses credits like any result, except when the check could not run completely: then `credits.charged` is 0. Main failures: the file is not audio or is damaged (415/422), 4 seconds or shorter or longer than 120 seconds (422), not enough credits (402), the service is busy (503, retry later). Requires scope `deepfake:detect`.

## Headers

- `Idempotency-Key` string, nullable: Optional (recommended) key that makes retries safe for 24 h: a retry with the same key and the same request returns the stored response without charging again.

## Response `200`

The check completed.

- DeepfakeResponse
  - `request_id` string, required
  - `operation_id` string, required
  - `object` 'deepfake.detection', required
  - `result` DeepfakeResult, required
    - `verdict` 'real' | 'fake' | 'not_sure', required: The decision: `real`, `fake` (AI-generated), or `not_sure` (try a longer or cleaner recording).
    - `label` 'synthetic' | 'genuine' | 'uncertain', required: The same decision in the older wording: `synthetic` (fake), `genuine` (real), `uncertain` (not sure).
    - `is_synthetic` boolean, required: true only when the verdict is `fake`.
    - `score` number, required: How likely the recording is AI-generated, from 0 to 1.
    - `threshold` number, required: The main model's threshold (0.62). Informational: decide with `verdict`.
    - `score_semantics` string, required: A short reminder of what `score` means.
    - `duration_seconds` number, required: Length of the checked audio, in seconds.
    - `segments` Segment[], required: Scores for consecutive, overlapping parts of the recording.
      - `start` number, required: Start of this part of the recording, in seconds.
      - `end` number, required: End of this part of the recording, in seconds.
      - `score` number, required: How likely this part is synthetic (0 to 1).
  - `model` ModelInfo, required
    - `name` string, required: Model family: `aletheia` (deepfake detection) or `eidos` (speaker verification).
    - `version` string, required: Opaque model version; it changes whenever the model is updated.
  - `credits` CreditsCharged, required
    - `charged` integer, required: Credits used by this request. A repeated request with the same Idempotency-Key uses none: it reports 0 here and what the original request used in `original_charge`.
    - `balance` integer, nullable, required: Your available credits after this request; null on the unlimited plan.
    - `original_charge` integer, nullable: Only on repeated requests (`charged` is then 0): the credits the original request used.
    - `unlimited` boolean, nullable: Present (true) only for accounts on the unlimited plan, where checks use no credits.
  - `latency_ms` number, required
  - `idempotent_replay` boolean, required

## Other responses

- `400`: The request is invalid, for example a missing or malformed field.
- `401`: The API key is missing, invalid or revoked.
- `402`: Not enough credits are available for this operation.
- `403`: The key lacks the required scope, the email address is not verified, or the account is suspended.
- `408`: The upload did not arrive in time (the whole file within 120 seconds, at least 64 KB per second).
- `409`: Conflict, for example a request with the same Idempotency-Key is still running, or the speaker already has the maximum number of samples.
- `413`: The upload is larger than 100 MB.
- `415`: Not a supported audio format, or the request is not multipart/form-data.
- `422`: The audio cannot be used (damaged, too short, too long, silent or too little speech; the message says what is needed), or the Idempotency-Key was already used for a different request.
- `429`: Too many requests or too many operations at the same time. Wait for the number of seconds in Retry-After.
- `500`: Something went wrong on our side. No credits were used.
- `502`: The check failed on our side. No credits were used; retry later.
- `503`: The service is busy, for example with many large uploads. Retry after the Retry-After seconds.
- `504`: The check took too long. No credits were used; retry later.

---

[API](https://skmtc.dev/detectif/apis/detectifai-developer-api.md) · [All operations](https://skmtc.dev/detectif/apis/detectifai-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/detectif/apis/detectifai-developer-api/revisions/24295482ed77?raw)
