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

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.2
File Size Uploaded
kupe-0.3.2.tar.gz 49.1 kB Details

Built distribution (wheel)

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

Total release size: 106.3 kB

Release files / kupe-0.3.2.tar.gz

Download URL kupe-0.3.2.tar.gz
Size 49.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d75e562ae0cb685e8440e5447e234e1f2833dd05108068aa8e2e58e6023edba4
BLAKE2b-256 checksum
How to use checksums
9b133e3dcc16b70427b921ad26dcfd2931128e5b1f6eb4420f14c3ffbc0187cf
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.2-py3-none-any.whl

Download URL kupe-0.3.2-py3-none-any.whl
Size 57.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c718650128d9defbe011431fd3fdc7c2e1e7a9e0c46ea2b7f89370b630250dc9
BLAKE2b-256 checksum
How to use checksums
eae624694ebbb5b5140b100b6ac6c3a036c10d96758903e019af2cef5b265460
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

0.3.3

2 release files

This release

0.3.2 This release

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