Outbound Calls
Use start_outbound_call() to dial any phone number and connect it to your agent. This is the production outbound surface — full variables support for per-call personalization, optional caller-ID rotation, and version pinning.
Not to be confused with /agent/{id}/versions/{versionId}/test-call. That endpoint is a debug surface bound to a specific agent draft or version. It only accepts mode and toPhone, doesn’t carry per-call variables, and counts against test-call slot limits. For real outbound traffic — campaigns, lead callbacks, anything customer-facing — use the pattern on this page (which maps to POST /conversation/outbound).
Basic Call
Get your API key at app.smallest.ai/dashboard/api-keys and export it as SMALLEST_API_KEY, or pass SmallestAI(api_key="sk_...") directly.
Parameters
These are the parameters the Python SDK’s start_outbound_call() method accepts today.
REST-only parameters
The underlying POST /conversation/outbound endpoint accepts one additional parameter that is not yet exposed by the Python SDK. To use it today, call the REST API directly with requests or httpx:
Personalization (passing per-call variables)
Pass variables to carry caller-specific values into the conversation — names, lead source, amounts, anything the agent should reference.
- Scalar values only.
string,number,boolean. Nested objects are rejected withHTTP 400("Invalid input") — flatten the payload client-side (address_cityinstead ofaddress: { city: ... }). - Variables are persisted with the call. They appear on the conversation log at
data.variablesand can be retrieved viaGET /conversation/{id}.
See Variables for the agent-side guide to defining and referencing variables.
Response
Save this ID to retrieve transcripts and analytics later.
Error Handling
Tips
Validate phone numbers first
Use a library like phonenumbers to validate before calling. Invalid numbers waste API calls.
Add delays between calls
Wait 5-10 seconds between calls to avoid rate limits.
Store conversation IDs
Save them in your database to retrieve transcripts later.
Handle errors gracefully
Wrap calls in try/except and log failures for retry.

