Start a call from your server
Start a live call with a secret key, hand the browser where to connect, and hear how it went through webhooks.
For a call inside your own app or page: your server starts it with a secret key, the person's browser connects to it, and your server hears what happened. Secret keys never go to a browser.
Get a secret key
On the dashboard's API keys page, make a secret key. Start with a test key (sk_test_…): its calls are real,
at most 60 seconds, 20 a day for your organization, and never charged. See authentication.
Start the call
Your server calls POST /v1/calls with the character. Send an Idempotency-Key, so a retry gives back the same call
instead of starting a second one (idempotency).
curl https://talk.madein10.com/v1/calls \
-H "Authorization: Bearer $ACME_SECRET_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-7-call-1" \
-d '{ "character_id": "chr_…", "metadata": { "ticket": 7 } }'It answers 201 with a CallStart:
{
"id": "call_…",
"status": "waiting",
"character_id": "chr_…",
"max_seconds": 300,
"ws_url": "wss://talk.madein10.com/live/a1b2c3d4?token=…", // for the person's browser
"events_url": "wss://talk.madein10.com/live-events/a1b2c3d4?token=ev.…", // for your server only
"ws": { "path": "/live/a1b2c3d4", "token": "…", "input_rate": 16000, "output_rate": 24000, "face": { … } },
"created_unix": 1793300000
}Hand the browser where to connect
Send the browser ws_url (or ws), never events_url: whoever holds it can make the character say anything and
end the call. The browser connects within 120 seconds; its token works once and for 5 minutes.
Our browser SDK does the rest: the microphone, playing the voice so echo cancellation removes it, the face, mute and end. Open the microphone first, straight from the person's click, then fetch the CallStart, so a refused microphone never starts a call.
import { Conversation } from "@acme/react";
import "@acme/react/theme.css";
<Conversation name="Sara" getCallStart={() => fetch("/api/calls", { method: "POST" }).then((r) => r.json())} />@acme/client and @acme/react aren't published yet: they will be when the product has its name. Until then,
the sound socket describes what a browser sends and receives, if you write your own.
Hear how it went
When the call has settled, your webhook endpoints get call.ended, with the charge, why it ended and
the transcript; call.analyzed follows with its summary, if you asked for one. Or read
GET /v1/calls/{call_id} at any time: it's the truth about a call.
To follow the call while it runs (each line of the transcript as it's said, and steering it with say, context
and end), your server listens on events_url. See live events.
What it costs
A call is charged per second from when the person's side connected to its end, rounded up, at least 30 seconds and
at most its max_seconds, at the price of the character's tier. A call that failed on our side, never connected, or
never played a reply costs nothing. Test calls are never charged. See calls.