When to use the API directly
Use API integration (instead of the drop-in widget) when you need to:- Start voice sessions from your own backend — inject user context, keep credentials server-side
- Render forms in your own UI — your design system, your component library
- Configure noise cancellation programmatically per character
- Control forms dynamically by voice — agent opens, watches, and submits forms in real time
- Pre-fill forms from your database before the call starts
- Connect your APIs as tools the agent can call
- Build a native mobile app or custom front-end
Pages in this section
| Page | What it covers |
|---|---|
| Sessions | Mint a LiveKit token from your backend, inject user metadata |
| Noise Cancellation | Configure NC engines via the appearance API, set defaults, self-host models |
| Form Handling | Define forms via API, receive submissions at your endpoint or fetch from managed storage |
| Voice Form Control | Agent opens, tracks, and submits forms over the LiveKit data channel — implement in your own UI |
| Form Pre-fill | Four ways to fill form fields via API: defaults, session metadata, agent tool args, direct POST |
| Agent Tools | Expose your REST endpoints as callable tools the agent invokes mid-call |
| Session History | List past sessions for a character with usage totals, durations, and inline transcripts |
| Chat History | Retrieve a single session’s full transcript and recording |
Authentication
All endpoints documented in this section use JWT bearer auth:POST /api/agents/agent-session/ — gated by Origin whitelisting instead of JWT so browsers can call it directly. If you proxy it through your backend (recommended), the Origin header from your server must still be on the character’s allowed_origins list.
Base URL
High-level flow
Quick links
- Endpoint reference: API Reference
- Widget-based embed instead: Widget Quickstart
