Voice · API Reference
Connect Voice Session
Opens a Voice WebSocket session with the specified agent. Send microphone audio as raw binary PCM frames and receive agent voice the same way. JSON frames carry events (`session.created`, `transcript`, `tool.called`, etc.). **Server auth:** `Authorization: Bearer ek_…` header on the WebSocket handshake. **Browser auth:** `?token=evt_…` query param using a token from Mint Voice Token — browsers cannot set WebSocket headers. Both auth methods require `voice:connect` scope. Connect over `wss://` only.
WS
/voice/{agentId}Scope:
voice:connectPath Parameters
agentIdstringrequired
The agent to run for this session. For browser clients, use the `agentId` from Mint Voice Token.
Responses
WebSocket
This endpoint opens a persistent WebSocket connection and cannot be tested from the browser playground.
