Skip to main content
Kupe Realtime is an OpenAI-shaped voice WebSocket. You mint an ephemeral session over HTTP, then attach to wss://x.kupe.in/v1/realtime. The session always runs Kupe STT, TTS, and LLM. Voices are addressed by sanitized name (priya, not a vendor id). Tools attached to the agent run server-side. This path is web-only — it does not write telephony minutes.

Mint

POST /v1/realtime/sessions
string
required
Agent to hydrate (prompt, greeting, tools, default voice).
string
Catalog voice name. Overrides the agent’s voice for this session.
object
Values for {{placeholders}} in the prompt and greeting.
string
Optional when using an API key (GET /v1/me already has it).
string
Optional when using an API key.
The response includes client_secret.value (single-use ticket) and websocket_url.

Connect

You can also send Authorization: Bearer {secret} on the WebSocket handshake instead of the query string. ticket is an alias for client_secret. The SDK helper does this for you:
On accept, the server sends session.created with instructions, voice, tools, and pcm16 in/out formats.

Client → server

Text-turn example (what send_text encodes):
Mic path: send input_audio_buffer.append frames; server VAD emits speech start/stop and runs the turn.

Server → client

Every event has event_id and type. Audio deltas are base64 PCM16. The socket may also send dashboard-shaped { "kind": "transcript" | "latency" | "tool_call", ... } frames on the same connection.

Close codes

LiveKit web sessions

For the in-app web tester (room + JWT, not this WS), use POST /v1/sessions with channel: "web". That returns a LiveKit ws_url and participant token. Realtime mint + /v1/realtime is the API you want from Python, TypeScript, or cURL.