Skip to main content
POST
Create voice session
Every endpoint on this page requires either a Clerk-issued JWT (Authorization: Bearer <token>) or an organization API key (x-api-key: pk_…). Anonymous calls return 401 Unauthorized. See Authentication for the full setup.
The agent must have voiceEnabled: true and a voicePipelineMode set. See Create Agent for voice configuration details.

Code examples

Connecting via LiveKit

Use the token and serverUrl from the response to connect with the LiveKit client SDK:
Node.js

Sample response

Authorizations

x-api-key
string
header
required

Organization API key. Obtain from the dashboard. Format: pk_live_…

Body

application/json
agentId
string<uuid>
required
metadata
object

Response

Voice session created with LiveKit token.

id
string
agentId
string<uuid>
token
string

LiveKit access token.

serverUrl
string

LiveKit server WebSocket URL.

createdAt
string<date-time>