Voisnap
SDKs

Official Voisnap SDKs

Idiomatic, fully-typed clients for Python and JavaScript. Both SDKs cover the full API surface — agents, telephony, calls, knowledge bases, and webhooks.

Python SDK

Python 3.9+

v0.9.2
pip install voisnap
  • Fully typed with Pydantic models
  • Sync + async (asyncio) support
  • Auto-pagination on list endpoints
  • Retry with exponential backoff
  • Streaming transcript support

JavaScript / TypeScript SDK

Node.js 18+

v0.9.1
npm install @voisnap/sdk
  • Full TypeScript types
  • Promise-based + async iterators
  • Auto-pagination via async generators
  • Edge-runtime compatible
  • Streaming transcript support

Python examples

agents

agents.py
from voisnap import VoisnapClient

client = VoisnapClient(api_key="vsnp_...")

# Create
agent = client.agents.create(
    name="Support Bot",
    system_prompt="You help customers with returns.",
    voice="nova",
    llm_provider="openai",
    llm_model="gpt-4o",
)

# List (auto-paginated)
for agent in client.agents.list():
    print(agent.id, agent.name)

# Update
client.agents.update(agent.id, voice="shimmer")

# Delete
client.agents.delete(agent.id)

telephony

telephony.py
# Provision a number
phone = client.telephony.provision(
    agent_id=agent.id,
    country="US",
)
print(phone.number)  # +1 (555) 000-1234

# List active numbers
numbers = client.telephony.list()

# Release a number
client.telephony.release(phone.id)

calls

calls.py
# Get call history
calls = client.calls.list(agent_id=agent.id, limit=20)

for call in calls:
    print(call.id, call.duration_seconds, call.cost_usd)

# Get transcript
transcript = client.calls.transcript(call.id)
for turn in transcript.turns:
    print(f"{turn.role}: {turn.text}")

JavaScript / TypeScript examples

agents

agents.ts
import Voisnap from '@voisnap/sdk'

const client = new Voisnap({ apiKey: 'vsnp_...' })

// Create
const agent = await client.agents.create({
  name: 'Support Bot',
  systemPrompt: 'You help customers with returns.',
  voice: 'nova',
  llmProvider: 'openai',
  llmModel: 'gpt-4o',
})

// List (async iterator)
for await (const a of client.agents.list()) {
  console.log(a.id, a.name)
}

// Update
await client.agents.update(agent.id, { voice: 'shimmer' })

// Delete
await client.agents.delete(agent.id)

telephony

telephony.ts
// Provision a number
const phone = await client.telephony.provision({
  agentId: agent.id,
  country: 'US',
})
console.log(phone.number) // +1 (555) 000-1234

// List active numbers
const numbers = await client.telephony.list()

// Release a number
await client.telephony.release(phone.id)

calls

calls.ts
// Get call history
const calls = await client.calls.list({
  agentId: agent.id,
  limit: 20,
})

for (const call of calls.data) {
  console.log(call.id, call.durationSeconds, call.costUsd)
}

// Get transcript
const transcript = await client.calls.transcript(call.id)
for (const turn of transcript.turns) {
  console.log(`${turn.role}: ${turn.text}`)
}