Official Dial SDK — phone numbers, SMS, WhatsApp, and voice calls for AI agents
Project description
dial-sdk
Official Python SDK for Dial — phone numbers, SMS, WhatsApp, and voice calls for AI agents.
Install
pip install dial-sdk
# or
uv add dial-sdk
Requires Python 3.11+.
Quickstart
The client is async. Construct it with a DialConfig, then call its methods inside an async with block:
import asyncio
from dial_sdk import DialClient, DialConfig, SendMessageParams, MakeCallParams
async def main():
async with DialClient(DialConfig(api_key="sk_live_...")) as dial:
# List your numbers
numbers = await dial.list_numbers()
from_id = numbers[0].id
# Send an SMS
await dial.send_message(SendMessageParams(
to="+15551234567",
from_number_id=from_id,
body="Hello from Dial",
))
# Place an AI voice call
call = await dial.make_call(MakeCallParams(
to="+15551234567",
from_number_id=from_id,
outbound_instruction="You are a friendly assistant confirming an appointment.",
))
print(call.id, call.status)
asyncio.run(main())
DialConfig.base_url defaults to https://getdial.ai. Override it for local or self-hosted setups.
Live events
Incoming messages and call transcripts stream via an async generator:
async with DialClient(DialConfig(api_key="sk_live_...")) as dial:
async with dial.new_events_connection() as events:
async for event in events:
print(event) # MessageEvent / CallEvent / CallTranscribed / ...
Client methods
| Method | Description |
|---|---|
list_numbers() |
List the phone numbers on your account |
purchase_number(params) |
Buy a new number (PurchaseNumberParams) |
set_number_properties(...) |
Update a number's nickname / inbound instruction |
send_message(params) |
Send an SMS or WhatsApp message (SendMessageParams) |
list_messages(...) |
List messages, optionally filtered |
make_call(params) |
Place an outbound AI voice call (MakeCallParams) |
list_calls(...) |
List calls, optionally filtered |
get_call(call_id) |
Fetch a single call |
new_events_connection() |
Open a live event stream |
Related
dial-langchain— these capabilities as LangChain tools.- Documentation
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 dial_sdk-0.6.2.tar.gz.
File metadata
- Download URL: dial_sdk-0.6.2.tar.gz
- Upload date:
- Size: 87.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e168cc602904697a8fc48c5b6d1df54fa4f17c568e9257b21afbbead6c5ab79b
|
|
| MD5 |
bc42ca63b0eb8bba77e70efcb355808a
|
|
| BLAKE2b-256 |
f191dc9d120c513c142e54f8ff153a3f62540cbdfcb2d42d7ba82dcee05487f9
|
File details
Details for the file dial_sdk-0.6.2-py3-none-any.whl.
File metadata
- Download URL: dial_sdk-0.6.2-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d53958fa80196a5f827652efc5524147dc78117b6d7ae16d398a9e6b89db2e90
|
|
| MD5 |
098129b44cb4166f1e290191fbd8b8bb
|
|
| BLAKE2b-256 |
8d28d623527b55febc60818612def5080d926544d2aa7ae934cc607ec710c689
|