Voice Agent API
Agents is in beta. Request and response shapes on /v1/agents/* may still change before general availability. See the overview for details.
A voice agent holds a real-time spoken conversation: it listens, reasons with an LLM, and speaks back. This page takes you from an API key to a live agent you can talk to, then points to telephony and knowledge-base guides.
Create an agent
An agent bundles a prompt, a voice, and a default LLM. Agent voice IDs come from the curated agent voice catalog (GET /v1/agents/voices) - a different, smaller set than the Build TTS catalog. Built-in examples: sabrina (default), carly, dominic, lyla.
The response includes the agent’s id, which you pass to every agent-scoped call.
Start a conversation
POST /v1/agents/{id}/conversations provisions a realtime session and returns a short-lived token. The caller connects directly to the session; audio never flows through our server.
Embed it
The fastest way to hear the agent on a page is the drop-in web component:
Enable the Public toggle on the agent’s Embed tab and add your origin to the allowlist. Full details in Embed.
What an agent bundles
Cap call length
Set max_call_duration_seconds on an agent to hard-cap the wall-clock length of a single call. When a live call reaches the cap, the agent ends it automatically - useful for bounding the cost of a runaway call. Set it when you create or update an agent:
null (the default) means no per-agent cap: the call is bounded only by your plan’s call ceiling. That ceiling is also the hard upper bound for the field, so a value above it is rejected. In the dashboard the same control lives on the agent’s Advanced tab under Max call duration, entered in minutes.