Official Python SDK for the CallIntel voice agent platform.
Project description
callintel — Python SDK
Official Python SDK for the CallIntel voice agent
platform. A thin, hand-written wrapper around httpx that covers the public
org-side API.
Install
pip install callintel
# or
uv add callintel
Requires Python 3.10+.
Quickstart
from callintel import CallIntelClient
cli = CallIntelClient(
api_key="ci_sk_...", # or token="<jwt>"
org_id="00000000-0000-...",
# base_url="https://api.callintel.io", # optional override
# timeout=30.0, # optional
# retries=3, # optional
)
agents = cli.agents.list()
print(agents)
call = cli.calls.place_phone_call(
agent_id=agents[0]["id"],
to_number="+15551234567",
)
print("Started call", call["call_id"])
Equivalent curl:
curl -X POST https://api.callintel.io/api/v1/orgs/$ORG_ID/calls/test-call \
-H "X-API-Key: $CALLINTEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"agent_id":"...","caller_phone":"+15551234567"}'
The client is a context manager:
with CallIntelClient(api_key="...", org_id="...") as cli:
cli.agents.list()
Authentication
Pass exactly one of:
| Option | Header | When to use |
|---|---|---|
api_key |
X-API-Key: <key> |
Server-side integrations, Celery, automations. |
token |
Authorization: Bearer <token> |
Notebooks, Supabase JWTs, browser-relayed sessions. |
org_id is required and appears in every URL path.
Resources
| Attribute | Methods |
|---|---|
agents |
list, get, create, update, delete |
calls |
list, get, place_phone_call, transcript_url, summary |
campaigns |
list, get, create, pause, resume, cancel, recipients |
webhooks |
list, create, update, delete, test, deliveries |
knowledge_bases |
list, get, create, add_document, attach_to_agent |
Errors
from callintel import CallIntelAPIError, CallIntelClient
cli = CallIntelClient(api_key="...", org_id="...")
try:
cli.agents.get("missing")
except CallIntelAPIError as exc:
print(exc.status, exc.body, exc.request_id)
Retries + timeouts
Transient failures (408, 425, 429, 5xx) are retried with exponential
backoff. Defaults: 3 retries, 30 s timeout. Override per-request via
timeout= / retries= on client.request(...) if you need to.
Async client
import asyncio
from callintel import AsyncCallIntelClient
async def main() -> None:
async with AsyncCallIntelClient(api_key="...", org_id="...") as c:
agents = await c.agents.list()
print(agents)
asyncio.run(main())
Mirrors the sync CallIntelClient 1:1 — same Agents, Calls,
Campaigns, Webhooks, KnowledgeBases resources. Built on
httpx.AsyncClient so it works inside any asyncio loop (FastAPI,
Quart, Sanic, etc.).
Streaming live call events
from callintel import AsyncCallIntelClient, stream_call_events
async with AsyncCallIntelClient(api_key="...", org_id="...") as c:
async for ev in stream_call_events(c, call_id="abc"):
if ev["event"] == "transcript":
print(ev["data"])
if ev["event"] == "end":
break
Wraps GET /api/v1/orgs/{org}/calls/{id}/live. Yields parsed
{"event": str, "data": Any} dicts. Terminal events (end,
timeout, not_found) close the iterator automatically.
Verifying webhooks
from fastapi import FastAPI, Request, HTTPException
from callintel import verify_webhook_signature
app = FastAPI()
@app.post("/callintel/webhook")
async def hook(request: Request) -> dict:
body = await request.body()
sig = request.headers.get("X-CallIntel-Signature")
if not verify_webhook_signature(body, sig, "whsec_..."):
raise HTTPException(status_code=401)
# Trust the body now.
return {"ok": True}
Constant-time (hmac.compare_digest) with 5-minute replay tolerance.
Accepts both bytes and str payloads.
Not yet supported
- File-upload helpers for knowledge-base documents.
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file callintel-0.2.0.tar.gz.
File metadata
- Download URL: callintel-0.2.0.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd8e2ec645148bc7a2cce5dd47ab857af6645f719cd73d0048e2c93fafe5b262
|
|
| MD5 |
75643c48d6f3dc66e543ff9057ae4df8
|
|
| BLAKE2b-256 |
fe73417f0cdc2ae648f3e0e6f92be4d83a1a9bbbb6798bdafeb3848d351b80b8
|
File details
Details for the file callintel-0.2.0-py3-none-any.whl.
File metadata
- Download URL: callintel-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffdb3334dc53ef9d7d226f17ae697233348c3522e4ebbfd9fe348f3178700c9c
|
|
| MD5 |
e3d02bbc40548542f03ce8761a3b677b
|
|
| BLAKE2b-256 |
620c803c18dff8e664f52f096af16255ecefdfca4c31ff9250082d85cfc5d61e
|