Install the SDKs

pip install kupe · npm install kupe-sdk · docs.kupe.in

Voice agents are easier than ever. Official Python SDK: pip install kupe — https://pypi.org/project/kupe/. Official TypeScript SDK: npm install kupe-sdk — https://www.npmjs.com/package/kupe-sdk. Full API reference, Try-it playground, and SDK docs: https://docs.kupe.in. On-site guides: /docs. Realtime walkthrough: /realtime.

Set KUPE_API_KEY (sk-kupe-... or a user JWT). Base URL defaults to https://x.kupe.in — passing /v1 is fine, the client will not drop it. Optional KUPE_BASE_URL. Coding agents: install Kupe MCP at https://mcp.kupe.in/mcp.

Python (pip install kupe): from kupe import Kupe; client = Kupe(); session = client.realtime.sessions.create(name="Priya", voice="priya", prompt="You collect overdue EMIs. Be warm and brief.", greeting="Hi, this is Priya from the bank."); then with client.realtime.connect(session) as rt: rt.send_text("...").

TypeScript (npm install kupe-sdk): import { Kupe } from "kupe-sdk"; const kupe = new Kupe(); const session = await kupe.realtime.sessions.create({ name: "Priya", voice: "priya", prompt: "...", greeting: "..." }); const rt = await kupe.realtime.connect(session); rt.send_text("...").

Pass name or agent_id. If name is new, Kupe creates the agent with prompt, greeting, voice, and tools/mcp. An existing name is reused. send_text and sendText stay in lockstep. Realtime audio is PCM16 mono at 24 kHz.

pip install kupe
from kupe import Kupe

client = Kupe()  # KUPE_API_KEY
session = client.realtime.sessions.create(
    name="Priya",
    voice="priya",
    prompt="You collect overdue EMIs. Be warm and brief.",
    greeting="Hi, this is Priya from the bank.",
)
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)
npm install kupe-sdk
import { Kupe } from "kupe-sdk";

const kupe = new Kupe(); // reads KUPE_API_KEY / KUPE_BASE_URL
const session = await kupe.realtime.sessions.create({
  name: "Priya",
  voice: "priya",
  prompt: "You collect overdue EMIs. Be warm and brief.",
  greeting: "Hi, this is Priya from the bank.",
});
const rt = await kupe.realtime.connect(session);
rt.send_text("Hi — remind them EMI is due tomorrow.");
for await (const event of rt) {
  if (event.type === "response.output_audio_transcript.done") {
    console.log(event.transcript);
  }
}