Official Python SDK for the SIPTEL REST API (voice, AI agents, SMS, numbers, SIP).
Project description
SIPTEL Python SDK
Official Python client for the SIPTEL REST API — AI voice agents, programmable Voice API, SMS, phone numbers, and SIP trunks.
Install
pip install siptel
Quick start
Set your API key (from the dashboard):
export SIPTEL_API_KEY="sk_live_..." # Linux/macOS
# set SIPTEL_API_KEY=sk_live_... # Windows CMD
from siptel import Client
client = Client()
# List AI agents
agents = client.agent.list_agents()
# Outbound AI agent call (see docs for all parameters)
result = client.agent.create_call(
phone_number="+31612345678",
caller_id="+31201234567",
voice="Rachel",
record=True,
voicemail_action="hangup",
greeting_message="Hello!",
task_prompt="You are a helpful assistant.",
language="en-US",
)
# Voice API
call = client.voice.retrieve_call("CA20251109171204335505")
# SMS
client.sms.send(
app_id="...",
phone_number="+31612345678",
sender_id="SIPTEL",
text="Hello from SIPTEL",
)
# Numbers
numbers = client.numbers.list()
Authentication
All requests use Authorization: Bearer <api_key>. You can pass the key explicitly:
client = Client(api_key="sk_live_...")
Configuration
| Option | Environment variable | Default |
|---|---|---|
| API key | SIPTEL_API_KEY |
— |
| Base URL | SIPTEL_BASE_URL (not auto-read; pass base_url=) |
https://api.siptel.ai |
User-Agent |
SIPTEL_USER_AGENT |
SiptelPythonSDK/0.1 |
client = Client(
api_key="sk_live_...",
base_url="https://api.siptel.ai",
timeout=60.0,
)
Resource layout (Telnyx-style)
| Namespace | API area |
|---|---|
client.agent |
AI agent calls, list/get agents |
client.voice |
Voice API (play, gather, transfer, hangup, call status) |
client.sip |
SIP users / trunks |
client.sms |
Send SMS, list SMS apps |
client.numbers |
List/search/purchase/assign numbers |
Errors
The SDK raises typed exceptions on HTTP error responses:
from siptel import (
Client,
AuthenticationError,
InvalidRequestError,
NotFoundError,
PaymentRequiredError,
RateLimitError,
APIError,
)
try:
client.sms.send(...)
except InvalidRequestError as e:
print(e.status_code, e.response_body)
Low-level API
For endpoints not yet wrapped, use the escape hatch:
client.post("/v1/agent/call", json={...})
client.get("/v1/custom/path")
Requirements
- Python 3.10+
requests
Development
cd sdk/siptel-python
pip install -e ".[dev]"
ruff check src
pytest
GitHub
- CI:
.github/workflows/siptel-python-ci.ymlruns Ruff + pytest on changes undersdk/siptel-python/. - PyPI:
.github/workflows/workflow.ymlpublishes on tagsv*(e.g.v0.1.0) using Trusted Publishing (OIDC — no long-lived API token in GitHub secrets).
siptelai/siptel repo
Push this repo (or mirror the SDK + workflows there). The publish workflow expects the layout sdk/siptel-python/ at the repo root. PyPI pending publisher must list workflow file: workflow.yml and repository: siptelai/siptel.
Standalone SDK-only repo
If the repo root is the Python package (no sdk/ folder), change working-directory and packages-dir in workflow.yml to match (often . and dist/).
Publishing to PyPI (manual)
- Bump
versioninpyproject.tomlandsiptel.__version__insrc/siptel/__init__.py. - Build:
python -m build - Upload:
python -m twine upload dist/*(PyPI API token as password, user__token__).
PyPI project name: the distribution is named
siptel. If that name is taken on PyPI, change[project] nameinpyproject.toml(e.g.siptel-ai) while keepingpackages/ import name as needed.
License
MIT — see 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 siptel-0.1.0.tar.gz.
File metadata
- Download URL: siptel-0.1.0.tar.gz
- Upload date:
- Size: 7.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 |
1a82a8dbd54ecd97988077194585f3a1036e81c900cd2d8f24ca746b46a3a868
|
|
| MD5 |
b9f26e8257dd7c914db0359d398f48f9
|
|
| BLAKE2b-256 |
b4bf8ae9d479d84ab1b3c8729bdac6bc1443d41b7b6550832c1ec720de5e8a75
|
Provenance
The following attestation bundles were made for siptel-0.1.0.tar.gz:
Publisher:
workflow.yml on siptelai/siptel-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
siptel-0.1.0.tar.gz -
Subject digest:
1a82a8dbd54ecd97988077194585f3a1036e81c900cd2d8f24ca746b46a3a868 - Sigstore transparency entry: 1154505212
- Sigstore integration time:
-
Permalink:
siptelai/siptel-py@efa14372f116bbc350393bf5f381ca32deb592ca -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/siptelai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@efa14372f116bbc350393bf5f381ca32deb592ca -
Trigger Event:
push
-
Statement type:
File details
Details for the file siptel-0.1.0-py3-none-any.whl.
File metadata
- Download URL: siptel-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.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 |
3c0fcba5bc26a1dcdd54e57eb0ea6719215b16788b93e9c999960074ba446523
|
|
| MD5 |
befd2e3d3bf541c16d85b3e83195b228
|
|
| BLAKE2b-256 |
8d4f1ce236ba2a9e60eacbe08c4d0678d127c65a1b3375ea7c1a2c17f7dc9166
|
Provenance
The following attestation bundles were made for siptel-0.1.0-py3-none-any.whl:
Publisher:
workflow.yml on siptelai/siptel-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
siptel-0.1.0-py3-none-any.whl -
Subject digest:
3c0fcba5bc26a1dcdd54e57eb0ea6719215b16788b93e9c999960074ba446523 - Sigstore transparency entry: 1154505214
- Sigstore integration time:
-
Permalink:
siptelai/siptel-py@efa14372f116bbc350393bf5f381ca32deb592ca -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/siptelai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@efa14372f116bbc350393bf5f381ca32deb592ca -
Trigger Event:
push
-
Statement type: