> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kupe.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Kupe

> Voice agents over HTTP and WebSocket — Python, TypeScript, cURL, and MCP.

Kupe API

# Ship voice agents from three lines of code

Mint a realtime session, stream PCM16 or text over WebSocket, and drive
campaigns, inbound numbers, voices, and tools with the same key.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
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)
```

```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Kupe } from "kupe-sdk";

const kupe = new Kupe(); // process.env.KUPE_API_KEY
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);
```

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST https://x.kupe.in/v1/realtime/sessions \
  -H "Authorization: Bearer sk-kupe-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Priya",
    "voice": "priya",
    "prompt": "You collect overdue EMIs. Be warm and brief.",
    "greeting": "Hi, this is Priya from the bank."
  }'
```

> [card] [Quickstart](https://docs.kupe.in/quickstart.md)
>
> Install `kupe` or `kupe-sdk`, set `KUPE_API_KEY`, and run a text turn.

> [card] [Python SDK](https://docs.kupe.in/sdk/python.md)
>
> `pip install kupe` — install, list agents, mint a realtime session.

> [card] [TypeScript SDK](https://docs.kupe.in/sdk/typescript.md)
>
> `npm install kupe-sdk` — Node 18+, same API in TypeScript.

> [card] [Authentication](https://docs.kupe.in/auth.md)
>
> Bearer `sk-kupe-...` or a Supabase JWT. Resolve org and project with `GET /v1/me`.

> [card] [Realtime events](https://docs.kupe.in/realtime.md)
>
> OpenAI-compatible WebSocket at `wss://x.kupe.in/agents/v1/realtime`.

> [card] [Kupe MCP](https://docs.kupe.in/kupe-mcp.md)
>
> Point Cursor, Claude Code, or Codex at `http://mcp.kupe.in/mcp`.

> [card] [Kupe App → Kupe Hub](https://docs.kupe.in/migrate.md)
>
> `api.kupe.in` → `x.kupe.in`. Auth, hosts, and every App route mapped.

## What you can call

The interactive [API playground](https://docs.kupe.in/playground.md) is generated from a curated OpenAPI spec. Try it sends requests to `https://x.kupe.in` with a Bearer token.

| Area | Use it for |
| - | - |
| Agents | CRUD, versions, commit, archive, tools, analyses, memories, tests |
| Realtime | Mint a session, then connect over WebSocket |
| Sessions | LiveKit web calls and telephony sessions |
| Inbound / campaigns | Answer a DID, or dial a recipient list |
| Phones / voices | Search and buy numbers; list, clone, preview voices |
| Tools / Composio | Webhooks, MCP tools, and connected apps |
| Databases / knowledge | Structured call data and RAG files |
| Logs / billing / usage | Transcripts, recordings, wallet, cost summary |

Payments, provider webhooks, and per-service usage breakdowns are not part of this public API.

## Base URL

`https://x.kupe.in` — every path in this site is under `/v1/...`. SDKs join `{base}/v1/...` so you never drop the prefix.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.