Skip to main content

Kupe Python SDK

Official client for the Kupe voice API.

pip install kupe

Local checkout:

pip install -e ./kupe-sdk

Quickstart

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)

Auth is Authorization: Bearer sk-kupe-... (or a Supabase JWT). Default base is https://x.kupe.in. Env: KUPE_API_KEY, optional KUPE_BASE_URL.

Pass name or agent_id (copy it from the agent editor). If name is new, Kupe creates the agent with prompt, greeting, voice, and tools/mcp. If that name already exists in the project, the existing agent is reused and those fields overlay this session. Pass voice (name) or voice_id — either one.

Every HTTP path is {base}/v1/.... Passing base_url="https://x.kupe.in/v1" is fine — the client will not drop /v1.

When org_id / project_id are omitted, they are filled from GET /v1/me.

Resources

client.agents, realtime, sessions, inbound, campaigns, recipient_lists, tools, composio, analyses, databases, knowledge_bases, phones, voices, providers, logs, billing, usage, orgs, projects.

Realtime audio is PCM16 mono at 24 kHz (rt.append_audio(pcm)). Playing the agent through open speakers next to the mic makes it hear and answer itself — pass client.realtime.connect(session, echo_suppression="half_duplex") to mute the mic (send silence) while the agent speaks (no barge-in), or use a headset and keep the default "none". Voice clone / patch / delete require a user JWT — calling them with an API key raises JWTRequiredError.

Payments, credit checkout, and per-service usage breakdown are not included.

See examples/realtime_text_turn.py.

Metadata

Release files for kupe 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kupe 0.3.0
File Size Uploaded
kupe-0.3.0.tar.gz 48.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kupe 0.3.0
File Interpreter ABI Platform
kupe-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 106.0 kB

Release files / kupe-0.3.0.tar.gz

Download URL kupe-0.3.0.tar.gz
Size 48.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7ea6175a9eebc18807dc942264fd9667f04a1bf6aaf1118439c3283e2718a8dc
BLAKE2b-256 checksum
How to use checksums
f4ce893d93d9556a4ba40772808a9f5a417e9f626ef2d6bd6ec8f3d468435f17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / kupe-0.3.0-py3-none-any.whl

Download URL kupe-0.3.0-py3-none-any.whl
Size 57.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae0628048cb00290d759550ab468f18d5b09fb9730e0477ef89c2a0541095839
BLAKE2b-256 checksum
How to use checksums
dadbf8baa6faca3c018568b7e2574495e14fc2e60c09576d702d788c66a25dcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page