Skip to main content

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://api.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)
reply_to_message(message_id, *, body=None, reaction=None) Reply or react to a message (exactly one of body/reaction)
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

Release files for dial-sdk 0.26.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dial-sdk 0.26.0
File Size Uploaded
dial_sdk-0.26.0.tar.gz 110.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dial-sdk 0.26.0
File Interpreter ABI Platform
dial_sdk-0.26.0-py3-none-any.whl Python 3 none any Details

Total release size: 137.3 kB

Release files / dial_sdk-0.26.0.tar.gz

Download URL dial_sdk-0.26.0.tar.gz
Size 110.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d70a939246c67fb528cbb839dcdc34a1b5c7d74141f11bcc12ba652ab42d6370
BLAKE2b-256 checksum
How to use checksums
a22afad18f38948ba724929a375d6260e56e06dada08ec2091579404650d2aeb
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 4, 2026.

Transparency log

Release files / dial_sdk-0.26.0-py3-none-any.whl

Download URL dial_sdk-0.26.0-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b6f127a02c9620526d1e05f6683e7b3dc11c718516d7e6fc7eee17ec7b1805e
BLAKE2b-256 checksum
How to use checksums
ca0d61cc965f336f98d97dc3345334c1a285e692d0824d49e0437a2e84f84ada
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 4, 2026.

Transparency log
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