Rate limits and audio limits

The limits below are the current defaults for the free plan. They can change; your code should handle 413, 422 and 429 responses rather than rely on exact numbers.

Audio limits

Limit Value
Upload size 20 MB per file
Decoding The server decodes the upload and converts it to 16 kHz mono. Decoding must finish within 20 seconds.
Operation Decoded duration Detected speech
Deepfake detection 0.5 to 120 seconds no minimum (silent files are rejected)
Speaker enrollment 5 to 60 seconds at least 3 seconds (10 seconds or more recommended)
Speaker verification 3 to 60 seconds at least 2 seconds
Verification with detect_deepfake=true 3 to 60 seconds at least 2 seconds

Other limits:

  • One recording per request.
  • Up to 5 active enrollment samples per speaker.
  • speaker_id: 1 to 64 characters from A-Z a-z 0-9 _ . : -.
  • Idempotency-Key: 1 to 128 printable characters.

Audio checks happen before credits are reserved, so a file that fails them is not charged. Duration and speech are measured on the decoded audio, so the same recording can pass or fail regardless of its container or bitrate.

Tips for usable audio

  • Send the original recording when you can. Repeated lossy re-encoding removes detail that both models use.
  • For enrollment, record the speaker alone, with little background noise. Use 10 seconds or more of clean speech per sample and enroll 2 to 3 samples from different sessions.
  • Speaker verification uses a default threshold of 0.53 (cosine), chosen for a low false-accept rate: on a held-out split of Svarah (Indian-accented English) the team measured 0.12% false accepts and 2.75% false rejects. When enrollment and verification recordings come from different sessions and conditions, false rejects rise: about 10% for full utterances and about 22% for 3 second clips in the team's VoxCeleb test. See the decision threshold.
  • Speaker verification is less reliable on 8 kHz telephone audio and codec-compressed audio (team-reported). Use wideband recordings where you can.
  • The deepfake detection threshold (0.62) is tuned for English speech. Results for other languages, including Hindi, are less reliable.
  • Deepfake scores for clips of 2 seconds or less are less reliable. Send longer recordings where you can.
  • Trim long silences at the start and end. They count toward duration but not toward speech.

Rate limits

Limit Default
Requests per API key 120 per minute
Model operations per account (free plan) 30 per minute
Concurrent model operations per account 2
Unauthenticated requests per IP address 60 per minute

Free endpoints (balance, usage, speakers, operations) count toward the per-key limit. Model operations count toward both the per-key and the per-account limits. A verification with detect_deepfake=true is one request that runs two operations.

When a limit is reached, the API returns 429 with a Retry-After header (in seconds):

error.code Cause
rate_limited Too many requests in the current window for the key, account or IP address.
concurrency_limited Your account already has the maximum number of model operations running.

Model capacity

Model requests share a bounded queue. When it is full, the API returns 503 inference_overloaded with a Retry-After header instead of holding your request. A request that waits too long returns 504 inference_timeout. Neither is charged.

Handling 429 and 503

Wait for Retry-After seconds and retry with the same Idempotency-Key. To stay under the concurrency limit, run at most two model requests at a time per account.

Example (cURL)
# cURL honours Retry-After when --retry is set
KEY=$(uuidgen)
curl https://platform.detectif.ai/v1/deepfake/detect --retry 4 \
  -H "Authorization: Bearer $DETECTIF_API_KEY" \
  -H "Idempotency-Key: $KEY" \
  -F "file=@call-recording.wav"