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.3

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.3
File Size Uploaded
kupe-0.3.3.tar.gz 49.3 kB Details

Built distribution (wheel)

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

Total release size: 106.8 kB

Release files / kupe-0.3.3.tar.gz

Download URL kupe-0.3.3.tar.gz
Size 49.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2d972c3970321035fb9416b25d8cc1bc0e59c7b4e4bd93fea33edc98736a4b20
BLAKE2b-256 checksum
How to use checksums
1bda9e8d50972db3857bd1ba0a7e955fb4e36e142097417d2a611fe579dcbb32
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 3, 2026.

Transparency log

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

Download URL kupe-0.3.3-py3-none-any.whl
Size 57.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2bb489b3fe1c8cacd8edef794ad7ae6359a8d84469e2758348af2dba687a48a
BLAKE2b-256 checksum
How to use checksums
928898747aefb6ab858f7dbb99a06064659840b38e10ec7acc9416883cd49591
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 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

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