web call
your browser joins the call directly over webrtc. lowest latency, and the
media never passes through your servers.
realtime socket
a plain websocket carrying base64 pcm. no webrtc stack — good for
servers, native apps and anything that already has audio buffers.
which one
the choice of transport does not affect what a call costs — see
billing for that, which depends on your plan rather than on how the
caller connected.
authentication
every endpoint takes your api key as a bearer token:agent scope. keys created in the dashboard have it by
default; older keys were granted it automatically, so nothing you already ship
stops working.
before you start
1
create an agent
in the dashboard, open agents and build one. note its id (a UUID) or its
handle (
ua_…) — either works everywhere an agent is named.2
deploy it
press deploy. saving records a draft; deploying is what puts a version
live. the API refuses an agent that has never been deployed with
409 agent_not_deployed, so it can never answer a caller with a
configuration you did not release.3
create an api key
api keys → new key. the full key is shown once.
4
check your capacity
GET /v1/agent/limits tells you how many concurrent calls
your plan allows and how many are running right now.errors
all four endpoints answer with the same envelope the rest of the API uses:
a
429 carries the numbers you need to back off intelligently:
billing
how a call is paid for depends on which plan the account is on. the two work differently enough that it is worth knowing which one you are testing against —plan in /v1/agent/limits tells you.
- credits (payg)
- concurrency (unlimited)
every second is billed from your balance, at the agent’s per-minute rate.a call is capped at what your balance can fund: if you can only afford 40
seconds, the call ends after 40 seconds rather than being refused up front.
if you cannot afford a usable call at all, the start returns
402 insufficient_balance.new accounts also get a small grant of free agent seconds, which is spent
before your balance is touched.concurrency is used first, and credits are never a fallback
an account can hold a concurrency plan and a credit balance at the same time. when it does:1
the plan is used first
while a slot is free, the call runs on the plan. your credit balance is not
touched — not partially, not for the overflow, not at all.
2
when the slots run out, the call is refused
a call that arrives with every slot busy gets
429 concurrency_limit_exceeded.
it does not fall through to your credits, even if the balance would
comfortably cover it.