Skip to main content
WSS
Real-time synthetic voice detection over WebSocket. Streams audio to the server and receives per-frame verdicts (synthetic, non-synthetic, or no-content) with confidence scores as analysis windows complete. For a conceptual explanation of how detection works — including windowing, silence trimming, and the no-content verdict — see Deepfake Detection.

Endpoint

Authentication

Pass your API key as a query parameter when opening the connection.
Unlike the batch endpoint, the streaming API does not use an X-API-Key header. The key must be in the query string at connection time.

Query parameters

For supported format values and format selection guidance, see Deepfake Detection.

Connection flow

  1. Connect with api_key, audio_format, and (for raw formats) sample_rate and num_channels.
  2. Stream audio as binary WebSocket frames. Frames can be any size.
  3. Receive frame JSON messages as analysis windows complete.
  4. Send an empty text frame ("") to signal end of audio.
  5. Receive a done message with total duration and frame count.
  6. The connection closes automatically.

Server messages

Frame result

Sent each time an analysis window is complete.

Done

Error

WebSocket close codes

An error JSON message is sent before the connection closes (except on 1000).

Rate limits

  • Concurrent connection limits apply per model.
  • A connection that exceeds a limit closes with 4029 (insufficient credits), 4030 (concurrent request limit), or 4031 (monthly usage limit).
query
type:object
Frame Result
type:object

A single frame detection result.

Done
type:object

Analysis complete - all frames have been delivered.

Error
type:object

An error occurred during connection or analysis.

Audio Data
type:string

A binary frame containing audio samples.

End of Stream
type:string

An empty text frame signalling that the client has finished sending audio.