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

1from voicebip import Voicebip
2
3client = Voicebip(api_key="pk_live_xxx")
4
5# Create an agent
6agent = client.agents.create(
7 display_name="Customer Support",
8 language="en",
9 system_prompt="You are a helpful agent.",
10)
11
12# Provision a number
13number = client.numbers.provision(
14 number_id="num_xxx",
15 agent_id=agent.agent_id,
16 channels=["voice"],
17)
18
19print(f"Agent {agent.agent_id} assigned number {number.e164}")

In the Meantime

Use the REST API directly with requests or httpx:

1import requests
2
3API_KEY = "pk_live_xxx"
4BASE_URL = "https://api.voicebip.com/v1"
5headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
6
7# Create agent
8resp = requests.post(f"{BASE_URL}/agents", headers=headers, json={
9 "display_name": "My Agent",
10 "language": "en",
11})
12agent = resp.json()
13print(agent["agent_id"])