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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kupe-0.1.5.tar.gz.
File metadata
- Download URL: kupe-0.1.5.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17f206ffd12cdec76167d5883cb38c4d1104c2bd3cdd72c15cb53444d90dda19
|
|
| MD5 |
98c0b3f8ce3065944cfa715ae7c9840b
|
|
| BLAKE2b-256 |
4ba62adfe2082537ff15aa7f03602866847c52dc15211704ca02a01f3c9a3dfb
|
Provenance
The following attestation bundles were made for kupe-0.1.5.tar.gz:
Publisher:
publish.yml on kupe-ai/kupe-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kupe-0.1.5.tar.gz -
Subject digest:
17f206ffd12cdec76167d5883cb38c4d1104c2bd3cdd72c15cb53444d90dda19 - Sigstore transparency entry: 2666883320
- Sigstore integration time:
-
Permalink:
kupe-ai/kupe-sdk@7652776a92f8c94caacecda329dfd1b4852efe20 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/kupe-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7652776a92f8c94caacecda329dfd1b4852efe20 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kupe-0.1.5-py3-none-any.whl.
File metadata
- Download URL: kupe-0.1.5-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af3a85c5ac540cbe11937959f48309547ad2d4f60fb65678c10852dec4fe2af3
|
|
| MD5 |
2d2d744f08c4469bbcef3b708f06ee6b
|
|
| BLAKE2b-256 |
16b3b2d013b8fd64a47fb57dc5b753201e26d39aa059e3bc352322648cb7a137
|
Provenance
The following attestation bundles were made for kupe-0.1.5-py3-none-any.whl:
Publisher:
publish.yml on kupe-ai/kupe-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kupe-0.1.5-py3-none-any.whl -
Subject digest:
af3a85c5ac540cbe11937959f48309547ad2d4f60fb65678c10852dec4fe2af3 - Sigstore transparency entry: 2666883410
- Sigstore integration time:
-
Permalink:
kupe-ai/kupe-sdk@7652776a92f8c94caacecda329dfd1b4852efe20 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/kupe-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7652776a92f8c94caacecda329dfd1b4852efe20 -
Trigger Event:
push
-
Statement type: