Python SDK

Install

pip install phonic

Initialize the client

import os
from phonic import Phonic
client = Phonic(
api_key=os.getenv("PHONIC_API_KEY"),
)

Create an agent

client.agents.create(
name="my-first-agent",
phone_number="assign-automatically",
)

Make an outbound call

client.conversations.outbound_call(
to_phone_number="YOUR_PHONE_NUMBER", # e.g. +19189391262
config={
"agent": "my-first-agent",
"welcome_message": "Hello, how can I help you?",
},
)
See Via Webhooks for the full walkthrough, including inbound calls, or the API reference for the complete SDK surface. An AsyncPhonic client is also available for async code.