Python SDK

The Python SDK is auto-generated from the OpenAPI spec via Fern and will be published to PyPI in Phase 2.

Installation (Coming Soon)

pip install voicebip

Preview Usage

from voicebip import Voicebip
client = Voicebip(api_key="pk_live_xxx")
# Create an agent
agent = client.agents.create(
display_name="Customer Support",
language="en",
system_prompt="You are a helpful agent.",
)
# Provision a number
number = client.numbers.provision(
number_id="num_xxx",
agent_id=agent.agent_id,
channels=["voice"],
)
print(f"Agent {agent.agent_id} assigned number {number.e164}")

In the Meantime

Use the REST API directly with requests or httpx:

import requests
API_KEY = "pk_live_xxx"
BASE_URL = "https://api.voicebip.com/v1"
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
# Create agent
resp = requests.post(f"{BASE_URL}/agents", headers=headers, json={
"display_name": "My Agent",
"language": "en",
})
agent = resp.json()
print(agent["agent_id"])