Detect AI-generated speech, verify a speaker by voice and find out who answered a phone call, with one account and one API key. Your first request in three steps, then authentication, errors, audio limits, webhooks and every endpoint.

DetectifAI checks voices. Three products share one account, one set of API keys and one balance. Each product has one page with everything about its API: what it does, a quickstart, every endpoint with its parameters, responses and errors, and live phone calls over a WebSocket.

Products

Product The question it answers You get Use it through
Deepfake detection (Aletheia) Is this a real voice? real or fake REST upload, live call stream, MCP
Speaker verification (Eidos) Is this the right person? match or no_match REST upload, live call stream, MCP
Noesis Who or what answered the call? human, voicemail, ivr, hold and more Live call WebSocket, recorded calls, MCP
MCP Use every product from an AI assistant Tools for Claude, Cursor, VS Code, Codex and others One MCP server
Live call streams Check a phone call while it happens Deepfake verdicts and, in the same stream, speaker verification or enrollment Twilio, Plivo, Telnyx, Exotel, Vonage, FreeSWITCH, a relay, your own code

Quickstart

From nothing to your first result in three steps. The example checks a recording for AI-generated speech; the other products work the same way.

1. Get an API key

Sign in at platform.detectif.ai and verify your email address. Open API keys in the dashboard and create a key. It is shown once, so copy it straight away and keep it in an environment variable:

Shell
export DETECTIF_API_KEY="dtf_live_..."

2. Send a recording

Send a recording with at least 2 seconds of speech (at least 10 seconds of speech gives the most reliable result) as the multipart field file:

cURL
curl https://platform.detectif.ai/v1/deepfake/detect \
  -H "Authorization: Bearer $DETECTIF_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F "file=@clip.wav"

The Idempotency-Key makes the request safe to retry: send it again with the same key and you get the same result back instead of a second check.

3. Read the result

JSON
{
  "request_id": "req_8f14e45fceea167a5a36dedd",
  "operation_id": "op_6f1ed002ab5595859014ebf0951522d9",
  "object": "deepfake.detection",
  "result": {
    "verdict": "real",
    "score": 0.07,
    "duration_seconds": 12.4
  }
}

Decide with result.verdict: real, or fake (likely AI-generated). Keep the request_id if you need help with a request.

Next:

  • Deepfake detection: every field of the result, and how to check a phone call live.
  • Speaker verification: enroll a voice and verify recordings or callers against it.
  • Noesis: stream a call and learn who or what answered.
  • MCP: connect Claude, Cursor, VS Code or Codex and ask in plain words.
  • Live call streams: check a phone call from Twilio, Plivo, Telnyx, Exotel, Vonage, FreeSWITCH or your own code, for AI-generated speech and the caller's identity in one stream.

Base URLs

What URL
Deepfake detection, speaker verification and the account endpoints https://platform.detectif.ai
Live call streams for deepfake detection and speaker verification wss://platform.detectif.ai/v1/stream
Noesis REST endpoints https://api.noesis.detectif.ai
Noesis live calls wss://api.noesis.detectif.ai/v1/detect/stream
MCP server https://platform.detectif.ai/mcp

Paths start with /v1 and go after their base URL, for example https://platform.detectif.ai/v1/deepfake/detect.

Authentication

Every request needs an API key, sent as a bearer token in the Authorization header:

Shell
curl https://platform.detectif.ai/v1/speakers \
  -H "Authorization: Bearer $DETECTIF_API_KEY"

The same keys work for every product and the MCP server. Noesis keys need the Noesis permission; see Noesis authentication.

API keys

  • Create keys under API keys in the dashboard. A key is shown once, when you create it.
  • Keys can be limited to specific actions when you create them. Give each key only what it needs.
  • Keep keys in an environment variable or a secret manager, never in code you share.
  • Never put a key in a URL. Requests with a key in the URL are refused. Telephony platforms that cannot set headers use a short-lived stream token instead (see Live call streams and Noesis).
  • Use one key per app or environment, so you can revoke one without affecting the others.
  • Rotate or revoke a key in the dashboard at any time. A revoked key stops working on the next request.

When a key is refused

A missing, mistyped or revoked key returns 401. A key that is not allowed to do something, or an account whose email address is not verified yet, returns 403. The error body says which; see Errors.

Requests and responses

  • Recordings are sent as multipart/form-data, with the audio in the file field (up to 100 MB; Noesis recordings: WAV, up to 50 MB).
  • Every response is JSON and has a request_id, also sent in the X-Request-Id header.
  • Send an Idempotency-Key header with each upload and reuse it when you retry. A retried request returns the same result instead of running again.
  • Results of checks, enrollments and verifications are kept 30 days; fetch one again with its operation_id (Get a result).
  • Results are signals, not proof. Decide with the verdict or decision field, use it with your other checks, and have a person review decisions that matter.

Audio and limits

Formats

WAV, MP3, M4A, FLAC, OGG and WebM. Recordings are converted to mono before they are checked, so stereo files work. Live call streams take phone-call audio (μ-law, A-law or 16-bit PCM at 8 or 16 kHz); Noesis takes its own formats, see Noesis.

Recording length

Check Length Speech needed
Deepfake detection Up to 300 seconds (5 minutes) At least 2 seconds
Enroll a voice 15 to 60 seconds At least 10 seconds
Verify a voice 3 to 60 seconds At least 2 seconds
Noesis recorded call 1 second to 15 minutes (WAV)

A speaker can have up to 5 enrolled recordings. Recordings from different days or devices help.

File size

Through Largest file How the audio is sent
REST API 100 MB A multipart upload in the file field
MCP 25 MB Base64 text in the audio_base64 argument

For larger files: send a compressed format (FLAC keeps every detail and is much smaller than WAV; MP3, M4A and OGG are smaller still), trim the recording to the part you need, and allow for the upload time in your client's timeout.

Stored audio

Every uploaded file that was read successfully is stored for 30 days, then deleted. A request with store_audio=false is refused (400 store_audio_not_supported). See Privacy.

Busy, try again

If the service is busy you get 503 with a Retry-After header; if you send too many requests at once you get 429. Wait for the Retry-After seconds, then send the same request again with the same Idempotency-Key.

Errors

Every error response has the same JSON body:

JSON
{
  "error": {
    "type": "not_found",
    "code": "speaker_not_found",
    "message": "No speaker with this speaker_id exists in your account.",
    "param": "speaker_id"
  },
  "request_id": "req_8f14e45fceea167a5a36dedd"
}
  • Use error.code in your code; it does not change. Show error.message to people; its wording can change.
  • error.param names the field the error is about, when there is one.
  • Include the request_id when you contact support at info@detectif.ai.

Noesis lists its own codes and its WebSocket close codes on the Noesis page; live call streams list theirs under close codes.

Error codes

Status Meaning Code How to fix
400 The request is invalid, for example a missing or malformed field. invalid_speaker_id Use 1 to 64 letters, digits or the characters _ . : -.
api_key_in_url Send the key only in the Authorization header, then rotate the key that was in the URL.
missing_file Send the audio as a multipart field named file.
invalid_parameter Check the field named in error.param.
401 The API key is missing, invalid or revoked. invalid_api_key Check that the whole key was copied, or create a new one in the dashboard.
missing_api_key Add the header Authorization: Bearer <your API key>.
revoked_api_key Create a new key in the dashboard.
402 Not enough credits are available for this operation. insufficient_credits Check your balance on the dashboard Overview page.
403 The key lacks the required scope, the email address is not verified, or the account is suspended. insufficient_scope Use a key that is allowed to do this, or create one in the dashboard.
email_not_verified Verify your email address, then try again.
404 Not found. Also returned for resources that belong to another account. speaker_not_found Check the speaker ID, or enroll the speaker first.
operation_not_found Check the operation ID; results are kept for 30 days.
408 The upload did not arrive in time (the whole file within 120 seconds, at least 64 KB per second). upload_timeout Retry on a faster connection, or send a smaller compressed file.
409 Conflict, for example a request with the same Idempotency-Key is still running, or the speaker already has the maximum number of samples. operation_in_progress Wait a moment, then fetch the result with the operation ID.
too_many_samples The speaker already has 5 recordings; delete the speaker and enroll again.
feedback_not_applicable
413 The upload is larger than 100 MB. file_too_large Send a smaller or compressed file: up to 100 MB through the API, 25 MB through MCP.
415 Not a supported audio format, or the request is not multipart/form-data. unsupported_format Send WAV, MP3, M4A, FLAC, OGG or WebM audio.
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. insufficient_speech Send a recording with more clear speech and fewer silences.
audio_too_short Send a longer recording; see Audio and limits.
audio_too_long Trim the recording; see Audio and limits.
silent_audio Check that the recording actually contains sound.
corrupt_audio Re-export the file and send it again.
idempotency_key_reuse Use a new Idempotency-Key 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. rate_limited Wait for the Retry-After seconds, then retry.
concurrency_limited Wait for a running request to finish, then retry.
500 Something went wrong on our side. No credits were used. internal_error Retry later; include the request_id if you contact support.
502 The check failed on our side. No credits were used; retry later. inference_failed Retry later with the same Idempotency-Key.
503 The service is busy, for example with many large uploads. Retry after the Retry-After seconds. server_busy Busy, try again after the Retry-After seconds.
inference_overloaded Busy, try again after the Retry-After seconds.
504 The check took too long. No credits were used; retry later. inference_timeout Retry later with the same Idempotency-Key.

Retrying

  • 429 and 503: wait for the Retry-After seconds, then retry with the same Idempotency-Key.
  • 500, 502 and 504: retry a few times with growing pauses, using the same Idempotency-Key.
  • Other 4xx errors: fix the request first; sending it again unchanged gives the same error.

Webhooks

Webhooks send results to your server as they happen: every finished deepfake check, enrollment and verification, and every live call stream from start to end. No connection to keep open and nothing to poll.

Add an endpoint

In the dashboard, open Webhooks and add the HTTPS URL that should receive events. Choose the events it gets (or all of them). The page then shows the endpoint's signing secret once: store it with your server's other secrets. You can have up to 5 endpoints.

  • The URL must use https:// and a public host name (not an IP address, not localhost), on port 443 or 1024-65535.
  • Send test event delivers a webhook.test event so you can check your handler.
  • Deliveries shows every event sent to the endpoint, with the HTTP status your server answered, and lets you send a failed one again.
  • Rotate secret makes a new secret; the old one stops working at once.

What we send

Each event is an HTTPS POST with a JSON body:

JSON
{
  "id": "evt_9d2Kq0fT3bLm8xYzA1cE5gH7",
  "type": "deepfake.completed",
  "created_at": "2026-11-11T09:31:24.512Z",
  "data": {
    "object": "deepfake.detection",
    "operation_id": "op_6f1ed002ab5595859014ebf0951522d9",
    "result": { "verdict": "real", "score": 0.0731, "duration_seconds": 10.4 }
  }
}

and these headers:

Header
webhook-id msg_...: the same on every retry of one delivery; use it to ignore repeats
webhook-timestamp When it was sent, in Unix seconds
webhook-signature v1, followed by the signature (see below)
content-type application/json
user-agent DetectifAI-Webhooks/1.0

Events

Type When data
deepfake.completed A deepfake check finished: from the API, the MCP server, the dashboard, or the final check of a stream The check's answer, as from Detect AI-generated speech; stream_id and reference for a stream
speaker.enrolled An enrollment finished (also from a stream) The answer of Enroll a voice sample
speaker.verified A verification finished (also from a stream, with early) The answer of Verify a speaker
stream.started A live call stream started stream_id, reference, checks, speaker_id
stream.deepfake.updated An early verdict or a live deepfake update during a stream stream_id, reference, sequence, early, seconds, speech_seconds, verdict, score
stream.completed A stream ended stream_id, reference, seconds, speech_seconds, ended_by, results, credits
webhook.test You pressed Send test event webhook_id

Checks that fail send no *.completed event: the API answers the error directly, and a stream reports it in stream.completed.

Verify the signature

Every delivery is signed with your endpoint's secret, following Standard Webhooks. Sign {webhook-id}.{webhook-timestamp}.{raw body} with HMAC-SHA256, using the base64-decoded part of the secret after whsec_, and compare it with each v1, value of webhook-signature. Reject timestamps more than 5 minutes old. Always check the raw body, before parsing it.

Python
import base64, hashlib, hmac, time

def verify(secret: str, headers: dict, body: bytes) -> bool:
    msg_id, ts = headers["webhook-id"], headers["webhook-timestamp"]
    if abs(time.time() - int(ts)) > 300:
        return False
    key = base64.b64decode(secret.removeprefix("whsec_"))
    expected = base64.b64encode(hmac.new(key, f"{msg_id}.{ts}.".encode() + body, hashlib.sha256).digest()).decode()
    return any(hmac.compare_digest(expected, part.split(",", 1)[1])
               for part in headers["webhook-signature"].split() if part.startswith("v1,"))

The Standard Webhooks libraries (for example standardwebhooks for Python and JavaScript) verify these signatures too.

Answer quickly, retry safely

  • Answer with any 2xx status within 10 seconds. Do the work afterwards (queue it).
  • Anything else (another status, a timeout, a redirect) is a failed delivery. It is sent again after 30 seconds, 2 minutes, 10 minutes, 30 minutes, 1 hour, 3 hours, 6 hours, 12 hours and 24 hours: 10 attempts over about two days. You can also send it again from the dashboard.
  • Events can arrive more than once and out of order. Ignore a webhook-id you have already handled, and order by created_at (and sequence for live stream updates).
  • An endpoint that keeps failing for a day (50 failed deliveries in a row) is turned off and the dashboard says so. Turn it on again when it is fixed.

Deliveries are kept 30 days in the dashboard's log.

Privacy

  • Audio you upload (through the REST API, the dashboard or MCP) is stored for 30 days, then deleted. Files that are refused, for example because they are corrupt or too large, are not kept.
  • On a live call stream, only the speech used for a verification or an enrollment is kept like an upload; the rest of the call is checked as it arrives and is not kept. The stream's record (its parameters, results and why it ended) is kept 30 days.
  • Enrolled voice profiles are stored encrypted until you delete the speaker or your account.
  • Results are kept for 30 days, so you can fetch them again with their operation ID.
  • Stored audio is private to your account. DetectifAI staff can open it only through a short-lived link, and every such access is logged.
  • API keys are stored only in a form that cannot be turned back into the key; the full key is shown once.
  • Delete a speaker at any time with Delete a speaker, which also deletes the recordings used to enroll it, or delete your whole account from the dashboard, which deletes all of its stored audio.
  • Calls sent to Noesis are recorded for 30 days unless you opt out; see Noesis data and recording.

API endpoints

Every endpoint of every product, with a link to its full reference.

Deepfake detection endpoints

Deepfake detection: Is this a real voice? Documented on Deepfake detection.

Base URL: https://platform.detectif.ai (live stream: wss://platform.detectif.ai).

Method Path Reference
WS /v1/stream Live call stream
POST /v1/deepfake/detect Detect AI-generated speech
POST /v1/operations/{operation_id}/feedback Say whether a result was right

Speaker verification endpoints

Speaker verification: Is this the right person? Documented on Speaker verification.

Base URL: https://platform.detectif.ai (live stream: wss://platform.detectif.ai).

Method Path Reference
WS /v1/stream Live call stream
POST /v1/speakers/enroll Enroll a voice sample
POST /v1/speakers/verify Verify a speaker
GET /v1/speakers List speakers
GET /v1/speakers/{speaker_id} Get a speaker
DELETE /v1/speakers/{speaker_id} Delete a speaker

Noesis endpoints

Call intelligence: Who or what answered? Documented on Noesis.

Base URL: https://api.noesis.detectif.ai (live stream: wss://api.noesis.detectif.ai). Same API keys as the other products; the key needs the Noesis permission.

Method Path Reference
WS /v1/detect/stream Live call stream
POST /v1/detect/stream-tokens Create a stream token
POST /v1/detect/file Analyse a call recording
GET /v1/detect/sessions/{session_id} Get a call session
GET /v1/detect/sessions List call sessions
GET /v1/detect/usage Get your Noesis usage
GET /v1/health Check service health

Account endpoints

Stored results of deepfake checks, enrollments and verifications, live call stream tokens and records, your balance, your usage and the service status. Documented below.

Base URL: https://platform.detectif.ai.

Method Path Reference
POST /v1/stream/tokens Create a stream token
GET /v1/streams/{stream_id} Get a stream's results
GET /v1/operations/{operation_id} Get a result
GET /v1/credits Get your balance
GET /v1/usage List your usage
GET /v1/health Check service health

OpenAPI and Postman

Account

Endpoints every product shares: the stored result of an earlier deepfake check, enrollment or verification, your balance, your usage (Noesis reports its own, see Get your Noesis usage) and the service status. In MCP: the account tools.

Get a result

GET /v1/operations/{operation_id}

Returns the stored outcome of a detection, enrollment or verification by its operation_id (kept for 30 days), for example after your connection dropped before the response arrived. Requires the scope of the operation's type.

Full URL: https://platform.detectif.ai/v1/operations/{operation_id}. Send your API key as Authorization: Bearer <your API key>.

Request

Headers:

Name Type Required Description
Authorization string yes Bearer <your API key>. Keys are created in the dashboard; see Authentication.

Path parameters:

Name Type Required Description
operation_id string yes The operation_id from a response (op_...).

Response

200: Success.

Field Type Always there Description
request_id string yes
object string yes (always "operation")
operation_id string yes
type string yes (one of deepfake.detect, speaker.enroll, speaker.verify, noesis.stream, noesis.file, deepfake.stream)
status string yes (one of pending, reserved, running, succeeded, failed)
source string yes (one of api, dashboard, mcp, x_bot)
parent_operation_id string or null yes
credits_charged integer yes
created_at string yes
completed_at string or null yes
result object or null yes The original success response body (without request_id).
error object or null yes
error.type string yes (one of invalid_request, authentication, permission, not_found, conflict, rate_limited, insufficient_credits, payload_too_large, unsupported_media, unprocessable_audio, overloaded, internal)
error.code string yes Stable snake_case error code.
error.message string yes Human-readable explanation. Do not parse.
error.param string or null no The request field the error refers to, if any.
partial object or null no For a failed verification whose synthetic-speech check completed: that result.

Example response:

JSON
{
  "request_id": "req_8f14e45fceea167a5a36dedd",
  "object": "operation",
  "operation_id": "op_6f1ed002ab5595859014ebf0951522d9",
  "type": "deepfake.detect",
  "status": "succeeded",
  "source": "api",
  "created_at": "2026-10-13T09:30:00Z",
  "completed_at": "2026-10-13T09:30:01Z",
  "result": {
    "operation_id": "op_6f1ed002ab5595859014ebf0951522d9",
    "object": "deepfake.detection",
    "result": {
      "label": "genuine",
      "score": 0.0731
    }
  }
}

Errors

Status Meaning
400 The request is invalid, for example a missing or malformed field.
401 The API key is missing, invalid or revoked.
403 The key lacks the required scope, the email address is not verified, or the account is suspended.
404 Not found. Also returned for resources that belong to another account.
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.

Every error body has the shape described in Errors, with a stable error.code.

Example

cURL
curl "https://platform.detectif.ai/v1/operations/op_0123456789abcdef0123456789abcdef" \
  -H "Authorization: Bearer $DETECTIF_API_KEY"

Get your balance

GET /v1/credits

Returns your plan, your available credits and the credits held by checks that are still running. On the unlimited plan unlimited is true and available is null. Requires scope credits:read.

Full URL: https://platform.detectif.ai/v1/credits. Send your API key as Authorization: Bearer <your API key>.

Request

Headers:

Name Type Required Description
Authorization string yes Bearer <your API key>. Keys are created in the dashboard; see Authentication.

Response

200: Success.

Field Type Always there Description
request_id string yes
object string yes (always "credits")
plan string yes Your plan. (one of free, unlimited)
unlimited boolean yes true on the unlimited plan: checks use no credits and available is null.
available integer or null yes Credits you can use; null on the unlimited plan.
reserved integer yes Credits held by checks that are still running.
price_per_operation integer yes The least one completed check uses (0 on the unlimited plan).

Example response:

JSON
{
  "request_id": "req_8f14e45fceea167a5a36dedd",
  "object": "credits",
  "plan": "free",
  "unlimited": false,
  "available": 1000,
  "reserved": 0
}

Errors

Status Meaning
401 The API key is missing, invalid or revoked.
403 The key lacks the required scope, the email address is not verified, or the account is suspended.
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.

Every error body has the shape described in Errors, with a stable error.code.

Example

cURL
curl "https://platform.detectif.ai/v1/credits" \
  -H "Authorization: Bearer $DETECTIF_API_KEY"

List your usage

GET /v1/usage

Lists your detection, enrollment and verification requests with their outcome and the credits they used, newest first. Filter by operation or status; page with limit and cursor. Requires scope usage:read.

Full URL: https://platform.detectif.ai/v1/usage. Send your API key as Authorization: Bearer <your API key>.

Request

Headers:

Name Type Required Description
Authorization string yes Bearer <your API key>. Keys are created in the dashboard; see Authentication.

Query parameters:

Name Type Required Description
limit integer no How many entries to return (1-100). (1 to 100; default 20)
cursor string or null no next_cursor from the previous page. (at most 256 characters)
operation string or null no Only this kind of request.
status string or null no Only requests with this outcome.

Response

200: Success.

Field Type Always there Description
request_id string yes
object string yes (always "list")
data array of object yes
data.id string yes
data.operation_id string or null yes
data.type string yes (one of deepfake.detect, speaker.enroll, speaker.verify, noesis.stream, noesis.file, deepfake.stream)
data.source string yes (one of api, dashboard, mcp, x_bot)
data.status string yes (one of succeeded, rejected, failed, replayed)
data.http_status integer yes
data.error_code string or null yes
data.credits_charged integer yes
data.duration_seconds number or null yes
data.latency_ms number or null yes
data.request_id string yes
data.created_at string yes
has_more boolean yes
next_cursor string or null yes

Example response:

JSON
{
  "request_id": "req_8f14e45fceea167a5a36dedd",
  "object": "list",
  "data": [
    {
      "id": "use_812",
      "operation_id": "op_6f1ed002ab5595859014ebf0951522d9",
      "type": "deepfake.detect",
      "source": "api",
      "status": "succeeded",
      "http_status": 200,
      "duration_seconds": 6.4,
      "request_id": "req_8f14e45fceea167a5a36dedd",
      "created_at": "2026-10-13T09:30:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "eyJ0IjoiMjAyNi0xMC0xM1QwOTozMDowMFoiLCJpIjo4MTJ9"
}

Errors

Status Meaning
400 The request is invalid, for example a missing or malformed field.
401 The API key is missing, invalid or revoked.
403 The key lacks the required scope, the email address is not verified, or the account is suspended.
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.

Every error body has the shape described in Errors, with a stable error.code.

Example

cURL
curl "https://platform.detectif.ai/v1/usage" \
  -H "Authorization: Bearer $DETECTIF_API_KEY"

Check service health

GET /v1/health

Whether the service and its parts are up: status is ok, or degraded when a part is unavailable. No authentication needed.

Full URL: https://platform.detectif.ai/v1/health. No API key needed.

Response

200: Success.

Field Type Always there Description
request_id string yes
status string yes (one of ok, degraded)
version string yes
database string yes (one of ok, unavailable)
inference string yes (one of ok, unavailable)

Example response:

JSON
{
  "request_id": "req_8f14e45fceea167a5a36dedd",
  "status": "ok",
  "version": "1.0.0",
  "database": "ok",
  "inference": "ok"
}

Errors

Status Meaning
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.

Every error body has the shape described in Errors, with a stable error.code.

Example

cURL
curl "https://platform.detectif.ai/v1/health"