AMDY API DOCS

Detection API,
in one stream.

Stream the first moments of an answered call over a secure WebSocket and receive a verdict as soon as the model is confident. Works with any dialer that can send 8 kHz audio.

QUICKSTART

Four steps
to a verdict.

Native install scripts cover ViciDial, Asterisk and FreeSWITCH. For everything else, the WebSocket API is the integration.

01

Get an API key

Create a key in your dashboard. Keep it server-side and rotate it if it is ever exposed.

02

Register your server

Allow-list each dialer server’s public IP once. The install scripts do this for you.

03

Open a WebSocket

Connect over TLS with your key in the request header and send one JSON config frame for the call.

04

Stream audio, read the verdict

Send 8 kHz, 16-bit, mono PCM in binary frames until a verdict arrives, then close the stream.

STREAMING PROTOCOL

Config frame,
then audio.

The first text frame describes the call. Everything after it is raw audio. The server replies with an empty frame while it listens, and a single JSON verdict when it decides.

Get the full reference
EXAMPLE · PYTHONWEBSOCKET
import json, websockets

async with websockets.connect(
    AMDY_ENDPOINT,
    extra_headers={"X-API-Key": API_KEY},
) as ws:
    await ws.send(json.dumps({
        "call_id": "8f2c-01",
        "sample_rate": 8000,
    }))
    async for chunk in pcm_frames(call):
        await ws.send(chunk)
        reply = await ws.recv()
        if reply:
            verdict = json.loads(reply)
            break  # {"status": "HUMAN", ...}
8 KHZ · 16-BIT · MONO PCMTLS
RESPONSE VALUES

Every verdict
you can receive.

Map each status to your own dialplan action. Only a confident person is returned as HUMAN.

HUMAN

A live person answered. Route to an agent.

MACHINE

Voicemail or a recorded greeting. Apply your voicemail rules.

SCREENING

A handset call-screening assistant answered.

TONE

Busy, SIT, fax, ringback or another fixed tone.

SILENCE

No speech was heard in the analysis window.

FALLBACK

The call was not judged. Run your native AMD.

READY FOR A BETTER FIRST HELLO?

Building a custom integration?

We’ll share the full protocol reference and help you test against real traffic.

Talk to AMDY