Skip to main content

Call2Me Python SDK — Build AI voice agents

Project description

Call2Me Python SDK

The official Python SDK for Call2Me — the AI voice agent platform.

Build, deploy, and manage AI voice agents that handle real phone calls, extract data, and take automated actions.

PyPI License

Features

  • 14 API Resources — Full coverage of the Call2Me REST API
  • Voice Agents — Create agents with 30+ AI models and custom voices
  • Phone & Web Calls — Inbound/outbound via SIP, browser, or chat widget
  • Campaigns — Bulk outbound calling with CSV upload
  • Scheduled Calls — Book follow-ups at specific dates
  • Post-Call Intelligence — Auto-extract data and trigger actions
  • Knowledge Base — RAG-powered answers from your documents
  • White-Label — Custom branding, domain, and tenant management
  • Payments — Checkout, saved cards, auto-charge

Installation

pip install call2me

Requires Python 3.8+

Getting Your API Key

  1. Sign up at dashboard.call2me.app — you get $10 free credits
  2. Go to API Keys in the dashboard
  3. Click Create API Key and copy your sk_call2me_... key

Quick Start

from call2me import Call2Me

client = Call2Me(api_key="sk_call2me_...")

# Create an agent
agent = client.agents.create(
    agent_name="Sales Agent",
    voice_id="elevenlabs-selin",
    language="tr-TR",
    system_prompt="You are a friendly sales agent."
)
print(f"Agent: {agent['agent_id']}")

# List calls
for call in client.calls.list():
    print(f"{call['call_id']}{call['call_status']}")

# Check balance
print(f"Balance: ${client.wallet.balance()['balance_usd']}")

Full API Reference

Agents

client.agents.list(limit=100, offset=0)
client.agents.get("agent_id")
client.agents.create(agent_name="My Agent", voice_id="elevenlabs-selin", system_prompt="...")
client.agents.update("agent_id", agent_name="New Name")
client.agents.delete("agent_id")
client.agents.duplicate("agent_id")
client.agents.stats("agent_id", days=30)
client.agents.global_stats()

Calls

client.calls.list(limit=50, agent_id="agent_id")
client.calls.get("call_id")
client.calls.end("call_id")
client.calls.recording("call_id")

Knowledge Base

client.knowledge_bases.list()
client.knowledge_bases.get("kb_id")
client.knowledge_bases.create(name="FAQ", description="Product FAQ")
client.knowledge_bases.delete("kb_id")
client.knowledge_bases.add_source("kb_id", source_type="text", content="...", name="intro")
client.knowledge_bases.query("kb_id", "What is the return policy?", top_k=5)

Campaigns

client.campaigns.list()
client.campaigns.get("campaign_id")
client.campaigns.create(name="Spring Sale", agent_id="agent_id", from_number="+908501234567")
client.campaigns.update("campaign_id", name="Updated")
client.campaigns.delete("campaign_id")
client.campaigns.upload_csv("campaign_id", "/path/to/contacts.csv")
client.campaigns.start("campaign_id")
client.campaigns.pause("campaign_id")
client.campaigns.resume("campaign_id")
client.campaigns.cancel("campaign_id")
client.campaigns.contacts("campaign_id")

Scheduled Calls

client.schedules.list()
client.schedules.get("schedule_id")
client.schedules.create(agent_id="agent_id", phone_number="+905551234567", scheduled_at="2026-04-15T10:00:00+03:00", timezone="Europe/Istanbul")
client.schedules.update("schedule_id", scheduled_at="2026-04-16T14:00:00+03:00")
client.schedules.delete("schedule_id")
client.schedules.cancel("schedule_id")

Phone Numbers

client.phone_numbers.list()
client.phone_numbers.get("+908501234567")
client.phone_numbers.create(phone_number="+908501234567", trunk_id="trunk_id")
client.phone_numbers.update("+908501234567", display_name="Main Line")
client.phone_numbers.delete("+908501234567")
client.phone_numbers.bind_agent("+908501234567", "agent_id")
client.phone_numbers.unbind_agent("+908501234567")

SIP Trunks

client.sip_trunks.list()
client.sip_trunks.get("trunk_id")
client.sip_trunks.create(name="My Trunk", sip_server="sip.provider.com", sip_username="user", sip_password="pass")
client.sip_trunks.update("trunk_id", name="Updated")
client.sip_trunks.delete("trunk_id")
client.sip_trunks.test("trunk_id")

Wallet & Billing

client.wallet.balance()
client.wallet.transactions(limit=50, offset=0)
client.wallet.analytics(days=30)
client.wallet.pricing()

Payments

client.payments.checkout(amount=50.0, currency="USD")
client.payments.history(limit=50)
client.payments.saved_cards()
client.payments.auto_charge()
client.payments.update_auto_charge(enabled=True, threshold=5.0, amount=50.0)

API Keys

client.api_keys.list()
client.api_keys.create(name="Production Key")
client.api_keys.revoke("key_id")
client.api_keys.delete("key_id")
client.api_keys.usage("key_id")

Users & Branding

client.users.me()
client.users.update(full_name="John Doe", company_name="Acme Inc")
client.users.stats()
client.users.usage(days=30)
client.users.daily_usage(days=30)
client.users.branding()
client.users.update_branding(app_name="My Platform", primary_color="#6366f1")
client.users.tenant_members(page=1, per_page=20)

Widgets

client.widgets.list()
client.widgets.get("widget_id")
client.widgets.create(agent_id="agent_id", name="Support Widget")
client.widgets.update("widget_id", welcome_message="Hi!")
client.widgets.delete("widget_id")
client.widgets.chat("widget_id", "Hello, I need help")

Voices

client.voices.list()
client.voices.providers()

Chats

client.chats.list(limit=50)
client.chats.get("session_id")
client.chats.send_message("session_id", "Hello!", model="openrouter/auto")

Error Handling

import httpx

try:
    agent = client.agents.get("invalid_id")
except httpx.HTTPStatusError as e:
    print(f"Error {e.response.status_code}: {e.response.json()}")

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

call2me-1.3.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

call2me-1.3.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file call2me-1.3.0.tar.gz.

File metadata

  • Download URL: call2me-1.3.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for call2me-1.3.0.tar.gz
Algorithm Hash digest
SHA256 214db481ed3c2bd688eef4c174f80db4afa42b860ec761d1fc5e75b337bc37ca
MD5 dc1c7bb5b9bafe6bf2b0a05b601fbfdf
BLAKE2b-256 2185efd1383107679b87c0cf6bf63f3a59e9b42ebbe948cc39ad982921ffc73d

See more details on using hashes here.

Provenance

The following attestation bundles were made for call2me-1.3.0.tar.gz:

Publisher: publish.yml on call2me-app/python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file call2me-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: call2me-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for call2me-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33881f4935c8fbb53328cca1cbca5a48e36b520e1a6c1d93a2a937d1dfc0b0c7
MD5 98a0ba3ed2d0b6cf1357a31de9126ade
BLAKE2b-256 9cffd4e9f8278a6f04f2fad59885e0b743d980ad83affee35717fccf3eefcd47

See more details on using hashes here.

Provenance

The following attestation bundles were made for call2me-1.3.0-py3-none-any.whl:

Publisher: publish.yml on call2me-app/python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page