Voice agent API and SDKs
Do everything the console does from your code or your AI assistant.
Speko is a voice agent platform with an API for everything the console does. It has official SDKs for TypeScript and Python, a public OpenAPI spec, signed webhooks, and a hosted MCP server.
import { Speko } from '@spekoai/sdk';
const speko = new Speko({ apiKey: process.env.SPEKO_API_KEY! });
// Call a number with a saved agent
const call = await speko.voice.dial({
to: '+12015551234',
agentId: 'agent_123',
});
console.log(call.sessionId, call.status);npm install @spekoai/sdk. From the phone agents guide in the Speko docs.
# Create an agent
curl -X POST https://api.speko.dev/v1/agents \
-H "Authorization: Bearer $SPEKO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"name": "Front desk", "systemPrompt": "You are the front-desk receptionist.", "intent": {"language": "en-US", "optimizeFor": "latency"}}'
# Call a number with it
curl -X POST https://api.speko.dev/v1/sessions/phone \
-H "Authorization: Bearer $SPEKO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+12015551234", "agentId": "agent_123"}'The OpenAPI spec for every endpoint is at docs.speko.ai/openapi.json.
import os
from pathlib import Path
from spekoai import Speko
speko = Speko(api_key=os.environ["SPEKO_API_KEY"])
audio = Path("call.wav").read_bytes()
result = speko.transcribe(audio, language="es-MX")
print(result.text, result.provider, result.confidence)pip install spekoai. The Python SDK covers speech-to-text, LLM and text-to-speech calls; agents and calls use the REST API.
claude mcp add --transport http speko https://mcp.speko.ai/mcpLets Claude create agents, place calls and read transcripts on your account. ChatGPT and Cursor connect to the same server.
Which SDKs Does Speko Offer?
TypeScript SDK- @spekoai/sdk and spekoai are the official TypeScript and Python SDKs. The CLI signs in, builds and operates agents from a terminal.
npm
- @spekoai/sdk
- @spekoai/client
- @spekoai/cli
- @spekoai/ai-sdk-provider
- @spekoai/adapter-livekit
PyPI
- spekoai
Does Speko Have a REST API and an OpenAPI Spec?
Webhooks- Yes. A REST API covers agents, phone numbers, sessions, calls and SMS. The OpenAPI spec is published at docs.speko.ai/openapi.json.
- Speko signs workspace webhooks and keeps a delivery log.
How Do Tools and MCP Work With Speko?
MCP quickstart- Custom tools are signed HTTP calls the agent makes to your systems during a call.
- The hosted MCP server at mcp.speko.ai lets an AI assistant create agents, place calls and read transcripts on your account.
What Are the Limits of the API?
- Speko is in public preview, with no contractual uptime SLA.
- You can buy US and Canadian Speko numbers only, after business verification. You can bring a number from any carrier over SIP.
Notes
- Every fact is from the Speko page linked beside its section, checked .
Questions
Yes. @spekoai/sdk is the official TypeScript SDK on npm, and spekoai is the official Python SDK on PyPI. The REST API and its OpenAPI spec cover the same operations.
Yes. Speko runs a hosted MCP server at mcp.speko.ai, so Claude, ChatGPT, Cursor and other MCP clients can create agents, place calls and read transcripts.
$0.09 per minute for speech-to-text, LLM and text-to-speech, billed from answer to hang-up, with $5 in credit on signup. Calls on Speko numbers add the carrier's charge.
Yes. The REST API covers agents, phone numbers, sessions, calls and SMS, the same work you do in the console.
No. The Python SDK covers speech-to-text, LLM and text-to-speech calls; agents and calls use the REST API.
Create an agent with POST /v1/agents, then call a number with POST /v1/sessions/phone, or use speko.voice.dial in the TypeScript SDK.
Yes. Speko signs workspace webhooks and keeps a delivery log.
Yes. @spekoai/cli signs in, builds and operates agents from a terminal, and test cases run in CI from the CLI.
At docs.speko.ai, with the OpenAPI spec at docs.speko.ai/openapi.json.
You get $5 in credit when you sign up. Calls then cost $0.09 per minute, plus carriage on Speko numbers.
Related
