SDKs overview

View as Markdown

Dial ships SDKs so you can call the API in-process instead of shelling out. All of them wrap the same REST API and authenticate with your sk_live_ key.

Every SDK has a full, auto-generated API reference at sdk.getdial.ai — each class and method, generated from the package source with worked examples.

SDKPackageUse it forAPI reference
Node@getdial/sdkTypeScript / JavaScript apps and agentssdk.getdial.ai/ts
Pythondial-sdkAsync Python apps and agentssdk.getdial.ai/python
LangChaindial-langchainGiving a LangChain agent Dial toolssdk.getdial.ai/langchain
Vercel AI SDK@getdial/ai-sdkGiving any AI SDK model Dial toolssdk.getdial.ai/ai-sdk
CrewAIdial-crewaiGiving a CrewAI crew Dial tools (SMS/OTP/voice)sdk.getdial.ai/crewai
AutoGendial-autogenGiving a Microsoft AutoGen agent Dial toolssdk.getdial.ai/autogen
Microsoft Agent Frameworkdial-agentframeworkGiving a Microsoft Agent Framework agent Dial toolssdk.getdial.ai/agentframework

The common method set

The Node and Python clients expose the same operations:

MethodDoes
listNumbers / list_numbersList your phone numbers
sendMessage / send_messageSend an SMS
makeCall / make_callPlace an AI voice call
listMessages / list_messagesList recent messages
listCalls / list_callsList recent calls
newEventsConnection / new_events_connectionOpen a live event stream

Construct a client

1import { DialClient } from "@getdial/sdk";
2const dial = new DialClient({ apiKey: process.env.DIAL_API_KEY! });

Both accept an optional base URL (baseUrl / base_url) to target a non-default deployment. Pick your language to continue.

Identifying your application

Both clients accept an optional userAgent / user_agent string. It’s prepended to the SDK’s own User-Agent, which is always still sent, so traffic from your product or agent runtime is identifiable in the conventional name/version form:

User-Agent: my-app/1.1.1 @getdial/sdk/0.21.0

The framework packages — LangChain, CrewAI, AutoGen, Agent Framework, and the Vercel AI SDK — each take a client you construct, so setting it there covers every tool they expose.