from kupe import Kupe
client = Kupe()
session = client.realtime.sessions.create(
agent_id="agt_...",
voice="priya",
)
with client.realtime.connect(session) as rt:
rt.send_text("Hi — remind them EMI is due tomorrow.")
for event in rt:
if event.type == "response.output_audio_transcript.done":
print(event.transcript)
Project API key (sk-kupe-...) or a Supabase user JWT.
Body
application/json
agent_id
string | null
Existing agent id. Alias: id.
name
string | null
Agent name. Reuses a live agent with this name, or creates one.
id
string | null
Alias for agent_id.
org_id
string | null
project_id
string | null
voice
string | null
Voice name or voice id. Alias: voice_id.
voice_id
string | null
Alias for voice — library voice_id or row id.
prompt
string | null
System prompt. Alias: instructions.
instructions
string | null
greeting
string | null
Spoken first message. Alias: greetings.
greetings
string | null
tools
Tools · object[] | null
OpenAI-style function tools, or webhook/MCP tools (http_url / type=mcp).
mcp
Mcp · object
MCP server(s): {url, headers?, tools?} where tools are names or full defs.
Mcp · object
Mcp · object[]
variables
Variables · object | null
Show child attributes
Response
Successful Response
id
string
required
client_secret
RealtimeClientSecret · object
required
Show child attributes
websocket_url
string
required
object
string
default:realtime.session
model
string
default:kupe-realtime
modalities
string[]
instructions
string
default:""
voice
string
default:""
input_audio_format
string
default:pcm16
output_audio_format
string
default:pcm16
tools
Tools · object[]
session_id
string | null
agent_id
string | null
⌘I
Python
from kupe import Kupe
client = Kupe()
session = client.realtime.sessions.create(
agent_id="agt_...",
voice="priya",
)
with client.realtime.connect(session) as rt:
rt.send_text("Hi — remind them EMI is due tomorrow.")
for event in rt:
if event.type == "response.output_audio_transcript.done":
print(event.transcript)