Official Python SDK for the Burki Voice AI Platform
Project description
Burki Python SDK
Official Python SDK for the Burki Voice AI Platform.
Installation
pip install burki
Quick Start
from burki import BurkiClient
# Initialize the client
client = BurkiClient(api_key="your-api-key")
# List all assistants
assistants = client.assistants.list()
for assistant in assistants:
print(f"{assistant.id}: {assistant.name}")
# Create a new assistant
assistant = client.assistants.create(
name="Support Bot",
description="Customer support assistant",
llm_settings={
"model": "gpt-4o-mini",
"temperature": 0.7,
"system_prompt": "You are a helpful customer support agent."
},
tts_settings={
"provider": "elevenlabs",
"voice_id": "rachel"
}
)
Features
Assistants
# List assistants
assistants = client.assistants.list()
# Get a specific assistant
assistant = client.assistants.get(assistant_id=123)
# Create an assistant
assistant = client.assistants.create(
name="My Bot",
llm_settings={"model": "gpt-4o-mini"}
)
# Update an assistant
assistant = client.assistants.update(
assistant_id=123,
name="Updated Bot"
)
# Delete an assistant
client.assistants.delete(assistant_id=123)
Calls
# List calls with filters
calls = client.calls.list(
status="completed",
date_from="2026-01-01",
limit=50
)
# Get call details
call = client.calls.get(call_id=123)
# Get call transcripts
transcripts = client.calls.get_transcripts(call_id=123)
# Get call recordings
recordings = client.calls.get_recordings(call_id=123)
# Get call metrics
metrics = client.calls.get_metrics(call_id=123)
# Terminate an ongoing call
client.calls.terminate(call_sid="CA123...")
Phone Numbers
# Search available numbers
numbers = client.phone_numbers.search(
country="US",
area_code="415"
)
# Purchase a number
number = client.phone_numbers.purchase(
phone_number="+14155551234",
provider="twilio"
)
# Assign to an assistant
client.phone_numbers.assign(
phone_number_id=123,
assistant_id=456
)
# Release a number
client.phone_numbers.release(phone_number_id=123)
Documents (RAG)
# Upload a document
document = client.documents.upload(
assistant_id=123,
file_path="knowledge.pdf"
)
# List documents
documents = client.documents.list(assistant_id=123)
# Check processing status
status = client.documents.get_status(document_id=456)
# Delete a document
client.documents.delete(document_id=456)
Tools
# List tools
tools = client.tools.list()
# Create an HTTP tool
tool = client.tools.create(
name="check_inventory",
tool_type="http",
description="Check product inventory",
config={
"method": "GET",
"url": "https://api.example.com/inventory",
"headers": {"Authorization": "Bearer {{API_KEY}}"}
}
)
# Assign tool to assistant
client.tools.assign(tool_id=123, assistant_id=456)
# Discover AWS Lambda functions
lambdas = client.tools.discover_lambda(region="us-east-1")
SMS
# Send an SMS
message = client.sms.send(
to="+14155551234",
from_number="+14155559999",
body="Hello from Burki!"
)
# Get conversations
conversations = client.sms.get_conversations(assistant_id=123)
Campaigns
# Create a campaign
campaign = client.campaigns.create(
name="Outreach Campaign",
assistant_id=123,
contacts=[
{"phone_number": "+14155551234", "name": "John"},
{"phone_number": "+14155555678", "name": "Jane"}
]
)
# Start the campaign
client.campaigns.start(campaign_id=456)
# Get campaign progress
progress = client.campaigns.get(campaign_id=456)
Real-time Streaming (WebSocket)
import asyncio
from burki import BurkiClient
async def stream_transcripts():
client = BurkiClient(api_key="your-api-key")
# Stream live transcripts during a call
async with client.realtime.live_transcript(call_sid="CA123...") as stream:
async for event in stream:
print(f"[{event.speaker}]: {event.content}")
asyncio.run(stream_transcripts())
async def monitor_campaign():
client = BurkiClient(api_key="your-api-key")
# Stream campaign progress updates
async with client.realtime.campaign_progress(campaign_id=123) as stream:
async for update in stream:
print(f"Progress: {update.completed}/{update.total}")
asyncio.run(monitor_campaign())
Configuration
Custom Base URL
client = BurkiClient(
api_key="your-api-key",
base_url="https://custom.burki.dev"
)
Timeout Settings
client = BurkiClient(
api_key="your-api-key",
timeout=30.0 # seconds
)
Async Usage
The SDK supports both sync and async usage:
# Sync
assistants = client.assistants.list()
# Async
assistants = await client.assistants.list_async()
Error Handling
from burki import BurkiClient
from burki.exceptions import (
AuthenticationError,
NotFoundError,
ValidationError,
RateLimitError,
ServerError
)
client = BurkiClient(api_key="your-api-key")
try:
assistant = client.assistants.get(assistant_id=999)
except AuthenticationError:
print("Invalid API key")
except NotFoundError:
print("Assistant not found")
except ValidationError as e:
print(f"Validation error: {e.message}")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after} seconds")
except ServerError:
print("Server error occurred")
License
MIT License
Project details
Release history Release notifications | RSS feed
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 burki-0.1.2.tar.gz.
File metadata
- Download URL: burki-0.1.2.tar.gz
- Upload date:
- Size: 30.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42b16c91d6fa5cb7d3fc631f8fe6b7bfc8439d19ffbd5b441f6d6bf57f18eb05
|
|
| MD5 |
820c0ec46305d7e9cbef22b63300b677
|
|
| BLAKE2b-256 |
3875adacc0f4155780030c0434678971ac7305930f95747fb02fc7f037743965
|
Provenance
The following attestation bundles were made for burki-0.1.2.tar.gz:
Publisher:
publish-python.yml on SymbioticSystems/burki-sdks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
burki-0.1.2.tar.gz -
Subject digest:
42b16c91d6fa5cb7d3fc631f8fe6b7bfc8439d19ffbd5b441f6d6bf57f18eb05 - Sigstore transparency entry: 838227668
- Sigstore integration time:
-
Permalink:
SymbioticSystems/burki-sdks@f55930bde135cc027f3b8df8f1628f6967918d79 -
Branch / Tag:
refs/tags/python-v0.1.2 - Owner: https://github.com/SymbioticSystems
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@f55930bde135cc027f3b8df8f1628f6967918d79 -
Trigger Event:
release
-
Statement type:
File details
Details for the file burki-0.1.2-py3-none-any.whl.
File metadata
- Download URL: burki-0.1.2-py3-none-any.whl
- Upload date:
- Size: 42.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f73a83ebe7e0eec0c11e3289abdaf2c107650eb174e272a189d460c044de097f
|
|
| MD5 |
00758b7f98e83a4edc48be6768ff6015
|
|
| BLAKE2b-256 |
bb5c50e05d6d47629e471913d66a9c49a8ab49bcd7495ddb4c6397159ca1bab2
|
Provenance
The following attestation bundles were made for burki-0.1.2-py3-none-any.whl:
Publisher:
publish-python.yml on SymbioticSystems/burki-sdks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
burki-0.1.2-py3-none-any.whl -
Subject digest:
f73a83ebe7e0eec0c11e3289abdaf2c107650eb174e272a189d460c044de097f - Sigstore transparency entry: 838227727
- Sigstore integration time:
-
Permalink:
SymbioticSystems/burki-sdks@f55930bde135cc027f3b8df8f1628f6967918d79 -
Branch / Tag:
refs/tags/python-v0.1.2 - Owner: https://github.com/SymbioticSystems
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@f55930bde135cc027f3b8df8f1628f6967918d79 -
Trigger Event:
release
-
Statement type: