# Docs - Speko Platform: Voice routing, agents, and API fundamentals. - [Speko developer docs](https://docs.speko.ai/): Explore Speko Router, Gateway, SDKs, and MCP for building and operating production voice AI. - Quickstart - [Quickstart](https://docs.speko.ai/quickstart): From sign-up to your first transcribe call in under five minutes. - **Coding agents** - [MCP](https://docs.speko.ai/quickstart/mcp): Connect Speko to Claude Code, Codex, OpenCode, Cursor, and other AI coding tools. - **Build platforms** - [Replit](https://docs.speko.ai/quickstart/replit): Add voice — STT, TTS, and LLM with provider routing and failover — to any Replit app. - [exe.dev](https://docs.speko.ai/quickstart/exe): Build Speko voice apps on exe.dev VMs — teach Shelley with Agent Skills, or launch the voice-agent starter with one click. - Concepts - [How routing works](https://docs.speko.ai/concepts/routing): Intent + benchmark scores → ranked candidates → live failover. The model behind every Speko call. - [Bring your own keys](https://docs.speko.ai/concepts/byok): Use your own provider credentials. Speko routes; providers bill you directly. - [Failover](https://docs.speko.ai/concepts/failover): How Speko transparently retries against runner-up providers when the primary fails. - [Provider params](https://docs.speko.ai/concepts/provider-params): Canonical STT/TTS fields, provider-scoped providerOptions, workload defaults, and how params behave across failover. - [Benchmarks and scoring](https://docs.speko.ai/concepts/scoring): How provider scores are computed and refreshed. - [Sessions vs one-shot](https://docs.speko.ai/concepts/sessions): When to mint a session and when to call a one-shot endpoint directly. - [Agents](https://docs.speko.ai/concepts/agents): Reusable voice personas — system prompt, voice, and intent defaults that any session can be started against. - Build - [Real-time browser conversation](https://docs.speko.ai/guides/realtime-conversation): Wire @spekoai/client into a web app — mint a session, join the transport, stream voice both ways. - [Build a voice agent](https://docs.speko.ai/guides/voice-agent): Real-time STT → LLM → TTS pipeline using @spekoai/adapter-livekit on a LiveKit Agents worker. - [Build a phone agent](https://docs.speko.ai/guides/phone-agents): Inbound and outbound PSTN calls, phone-number routing, lifecycle webhooks, reports, and transfers. - [Human calling](https://docs.speko.ai/guides/human-calling): Programmable calls between people: browser softphones for your team, PSTN legs for everyone else, and Telnyx-style call control over both. - [Workspace webhooks](https://docs.speko.ai/guides/webhooks): Route lifecycle events to organization endpoints by event, agent, and session tags, then inspect every delivery attempt. - [One-shot APIs](https://docs.speko.ai/guides/one-shot): POST /v1/transcribe, /v1/synthesize, /v1/complete — single-turn calls without sessions. - [Batch transcription](https://docs.speko.ai/guides/transcription): POST /v1/transcribe with workload=transcription: diarization, formatting, and per-provider batch params. - [Narration](https://docs.speko.ai/guides/narration): POST /v1/synthesize with workload=narration: long-form TTS, voice settings, sample rate, chunking. - [Tool calling](https://docs.speko.ai/guides/tool-calling): Give a Speko voice agent the ability to invoke webhook tools mid-call. Register once in the dashboard, fire from any voice session. - SMS - [SMS on Speko](https://docs.speko.ai/sms): Send text messages from your Speko phone numbers: prerequisites, carrier registration, timelines, and APIs. - [Register for SMS (10DLC)](https://docs.speko.ai/sms/registration): Register your brand and messaging campaign with the US and Canadian carriers so your Speko numbers are cleared to send SMS. - [Registration API](https://docs.speko.ai/sms/api): Automate 10DLC brand, campaign, and number registration with the /v1/sms/10dlc endpoints. - [Send messages](https://docs.speko.ai/sms/sending): Current SMS sending status and the supported interim pattern for transactional texts. - WhatsApp Calling - [WhatsApp Calling on Speko](https://docs.speko.ai/whatsapp): Let people call your Speko voice agent over WhatsApp: how it works, what is supported today, and how to get on the beta. - Telnyx Call Control handoff - [Telnyx Call Control handoff](https://docs.speko.ai/telnyx-handoff): Keep running inbound calls on your own Telnyx Call Control app and hand a live call to a Speko agent with a single SIP transfer. - API Reference - [Introduction](https://docs.speko.ai/api-reference/introduction): Public REST API for the Speko voice gateway. - [Sessions](https://docs.speko.ai/api-reference/sessions): Mints browser-safe media transport credentials, persists the pipeline config, and dispatches an agent worker. Use the returned `transportToken` and `transportUrl` with `@spekoai/client` to join from a browser. - [Create phone session](https://docs.speko.ai/api-reference/sessions-phone): POST /v1/sessions/phone — place an outbound PSTN call backed by a Speko voice session. - [Transcribe](https://docs.speko.ai/api-reference/transcribe): Routes the request to the best STT provider for your `(language, region, optimizeFor)` intent, with automatic failover to runner-up providers. Body is binary audio. Routing intent goes in the `x-speko-intent` header (JSON). - [Synthesize](https://docs.speko.ai/api-reference/synthesize): Routes the request to the best TTS provider for your intent, with automatic failover. Returns binary audio. The `Content-Type` header (mirrored in `X-Speko-Audio-Format`) tells you the format. - [Voices](https://docs.speko.ai/api-reference/voices): Read-only catalog of TTS voices grouped by provider. ElevenLabs voices are account-scoped and fetched live from ElevenLabs rather than returned here. - [Complete](https://docs.speko.ai/api-reference/complete): Single-turn LLM call routed to the best provider for your intent, with automatic failover. Returns assistant text + token usage. - [Webhooks](https://docs.speko.ai/api-reference/webhooks): Create and manage organization lifecycle webhook endpoints. - [Webhook deliveries](https://docs.speko.ai/api-reference/webhook-deliveries): Search delivery logs, inspect attempts, and redeliver an event. - [List agents](https://docs.speko.ai/api-reference/agents-list): Returns every agent belonging to the authenticated organization. Agents are scoped per-org — IDs from another org will never appear here. - [Create agent](https://docs.speko.ai/api-reference/agents-create): Persists a reusable voice persona — `systemPrompt`, optional `voice`, routing `intent`, and optional `llmOptions` — keyed by `name` within the authenticated organization. Pass the returned `id` as `agentId` on `POST /v1/sessions` to seed a session from this agent. - [Get agent](https://docs.speko.ai/api-reference/agents-get): Fetch a single agent by id. Scoped to the authenticated organization — agents owned by another org always return 404. - [Update agent](https://docs.speko.ai/api-reference/agents-update): Partial update — every field on the body is optional and only supplied keys are written. - [Delete agent](https://docs.speko.ai/api-reference/agents-delete): Removes the agent and its registered tools. The organization's only remaining agent cannot be deleted and returns 409. - [List agent calls](https://docs.speko.ai/api-reference/agent-calls): GET /v1/agents/{id}/calls — list recent calls for an agent. - [Agent iMessage](https://docs.speko.ai/api-reference/agent-imessage): Send outbound iMessage-first messages as one of your agents, from its dedicated number. - [iMessage phone numbers](https://docs.speko.ai/api-reference/imessage-phone-numbers): Private API for listing dedicated iMessage numbers, placing calls, sending iMessage-first messages, and receiving events. - [Phone numbers](https://docs.speko.ai/api-reference/phone-numbers): Provision managed numbers, import SIP-trunk numbers, update routing, and manage phone-number business verification. - [Calls](https://docs.speko.ai/api-reference/calls): Inspect call detail, events, reports, recordings, and live call transfers. - [Call control](https://docs.speko.ai/api-reference/call-control): Programmable human calling: dial, read, and command browser + PSTN call legs by controlId. - [Broker presence](https://docs.speko.ai/api-reference/broker-presence): Register, heartbeat, and read who can take a human call right now. - [Callbacks](https://docs.speko.ai/api-reference/callbacks): List, inspect, cancel, and dispatch scheduled callbacks created from call analysis. - Speko Router: Hosted speech and language API at router.speko.dev - [Speko Router](https://docs.speko.ai/relay): One hosted API for speech-to-text, text-to-speech, and language models across every provider in the Speko catalog. - [Quickstart](https://docs.speko.ai/relay/quickstart): Call Router with curl — transcribe, synthesize, and generate in five minutes. - [Authentication](https://docs.speko.ai/relay/authentication): Bearer keys, required headers, and the response headers on every Router call. - [API keys](https://docs.speko.ai/relay/api-keys): Creating, using, and protecting Speko API keys. - [Bring your own provider keys](https://docs.speko.ai/relay/byok): Use your own provider credentials with the hosted Router. - [Routing](https://docs.speko.ai/relay/routing): The routing object, objectives, provider pinning, and automatic failover. - [Models](https://docs.speko.ai/relay/models): The Router catalog, capability flags, and how canary probes gate what is routable. - Speech to text - [Transcribe audio](https://docs.speko.ai/relay/stt/batch): POST /v1/stt/transcriptions — transcribe an audio file in one request. - [Streaming transcription](https://docs.speko.ai/relay/stt/streaming): GET /v1/stt/stream — live transcription over WebSocket. - Text to speech - [Synthesize speech](https://docs.speko.ai/relay/tts/speech): POST /v1/tts/speech — synthesize audio from text in one request. - [Streaming synthesis](https://docs.speko.ai/relay/tts/streaming): GET /v1/tts/stream — incremental text in, audio out, over WebSocket. - Language models - [Generate responses](https://docs.speko.ai/relay/llm/responses): POST /v1/llm/responses — one request shape for every language model in the catalog. - [Streaming responses](https://docs.speko.ai/relay/llm/streaming): Server-sent events from /v1/llm/responses with stream true. - [Idempotency](https://docs.speko.ai/relay/idempotency): Every mutating Router call requires an idempotency key. Here is exactly how reuse behaves. - [Usage](https://docs.speko.ai/relay/usage): The usage object, how each kind is metered, and how budgets behave on streams. - [Billing and usage](https://docs.speko.ai/relay/billing): How Speko meters, prices, and settles managed usage. - [Errors](https://docs.speko.ai/relay/errors): The Router's single error envelope and closed error-code set. - [Limits](https://docs.speko.ai/relay/limits): Size caps, timeouts, and concurrency limits on the Router. - Speko Gateway: The open-source customer-side runtime for real-time voice AI - [Speko Gateway](https://docs.speko.ai/gateway): The open-source, customer-side runtime for real-time voice AI. - [Quickstart](https://docs.speko.ai/gateway/quickstart): Add the gateway sidecar to a LiveKit agent container and transcribe with your own Deepgram key. - [Architecture](https://docs.speko.ai/gateway/architecture): The three hosted surfaces and one local runtime that make up Speko, and which one your traffic touches. - [BYOK and managed credentials](https://docs.speko.ai/gateway/modes): Choose local BYOK or Speko-managed credentials independently for each request. - [Configuration](https://docs.speko.ai/gateway/configuration): Every environment variable the gateway reads. - [Sessions](https://docs.speko.ai/gateway/sessions): POST /v1/sessions — create a provider session on the local gateway API. - [Streaming](https://docs.speko.ai/gateway/streaming): The canonical session WebSocket — subprotocol, frames, and the event schema. - [Models](https://docs.speko.ai/gateway/models): GET /v1/models — the adapters this gateway build implements. - [Errors](https://docs.speko.ai/gateway/errors): The local API's error envelope and code set. - [Observability](https://docs.speko.ai/gateway/observability): Health probes, Prometheus metrics, and what telemetry the gateway exports. - [Python integration](https://docs.speko.ai/gateway/python): The speko-gateway Python package — a socket client and LiveKit STT, TTS, and LLM plugins. - [Control plane API](https://docs.speko.ai/gateway/control-plane): The hosted API at gateway.speko.dev that the sidecar consumes in managed mode. - [Trust and signing](https://docs.speko.ai/gateway/trust): How signed plans, JWKS keys, and credential rules keep the gateway trustworthy. - Speko SDK: TypeScript HTTP SDK for the Speko voice gateway. - [@spekoai/sdk](https://docs.speko.ai/sdk/overview): Official TypeScript SDK — one API, every voice provider. - [Speko client](https://docs.speko.ai/sdk/speko-client): Construct the SDK client and configure transport options. - [transcribe](https://docs.speko.ai/sdk/transcribe): POST /v1/transcribe — speech-to-text with automatic provider routing. - [synthesize](https://docs.speko.ai/sdk/synthesize): POST /v1/synthesize — text-to-speech with automatic provider routing. - [voices](https://docs.speko.ai/sdk/voices): GET /v1/voices — read-only catalog of TTS voices grouped by provider. - [complete](https://docs.speko.ai/sdk/complete): POST /v1/complete — LLM completion with automatic provider routing. - [realtime](https://docs.speko.ai/sdk/realtime): Speech-to-speech WebSocket sessions — OpenAI Realtime, Gemini Live, xAI Grok Voice, and Inworld. - [voice](https://docs.speko.ai/sdk/voice): Outbound phone calls through POST /v1/sessions/phone. - [callControl](https://docs.speko.ai/sdk/call-control): Programmable human calling: dial, answer, and control browser + PSTN call legs through /v1/voice. - [phone numbers](https://docs.speko.ai/sdk/phone-numbers): Provision managed numbers, import SIP trunk numbers, and manage phone-number business verification. - [calls](https://docs.speko.ai/sdk/calls): Inspect calls, reports, events, recordings, and transfers. - [webhooks](https://docs.speko.ai/sdk/webhooks): Workspace lifecycle endpoints and delivery logs. - [callbacks](https://docs.speko.ai/sdk/callbacks): Scheduled callback resources created from call analysis. - [usage](https://docs.speko.ai/sdk/usage): GET /v1/usage — billing and usage reporting. - [credits](https://docs.speko.ai/sdk/credits): Prepaid balance and append-only ledger. - [Types](https://docs.speko.ai/sdk/types): Shared request / response types exported from @spekoai/sdk. - [Errors](https://docs.speko.ai/sdk/errors): Exception classes thrown by @spekoai/sdk. - Speko Client: Browser SDK for real-time voice conversations. - [@spekoai/client](https://docs.speko.ai/client/overview): Browser SDK for real-time voice conversations. - [VoiceConversation](https://docs.speko.ai/client/voice-conversation): Primary API — construct, control, and tear down a voice session. - [RealtimeVoiceConversation](https://docs.speko.ai/client/realtime-voice-conversation): Browser capture and playback for direct speech-to-speech WebSocket sessions. - [Callbacks & events](https://docs.speko.ai/client/callbacks): Every hook VoiceConversation exposes, and when they fire. - [Data channel protocol](https://docs.speko.ai/client/data-channel): Wire format for packets exchanged between browser and agent over the media data channel. - [Errors](https://docs.speko.ai/client/errors): SpekoClientError and its error codes. - AI SDK Provider: Speko provider for the Vercel AI SDK. - [@spekoai/ai-sdk-provider](https://docs.speko.ai/ai-sdk-provider/overview): Speko provider for the Vercel AI SDK — routed speech and transcription. - [Speech](https://docs.speko.ai/ai-sdk-provider/speech): Synthesize audio through generateSpeech with routed TTS providers. - [Transcription](https://docs.speko.ai/ai-sdk-provider/transcription): Transcribe audio through transcribe with routed STT providers. - [Routing options](https://docs.speko.ai/ai-sdk-provider/routing): Model ids and providerOptions.speko for the AI SDK provider. - Adapter LiveKit: LiveKit Agents adapters for Speko STT, LLM, and TTS. - [@spekoai/adapter-livekit](https://docs.speko.ai/adapter-livekit/overview): LiveKit Agents adapter — route STT, LLM, and TTS through Speko. - [createSpekoComponents](https://docs.speko.ai/adapter-livekit/create-speko-components): Build a { stt, llm, tts } bundle ready for voice.AgentSession. - [SpekoSTT](https://docs.speko.ai/adapter-livekit/speko-stt): LiveKit Agents STT adapter backed by POST /v1/transcribe. - [SpekoLLM](https://docs.speko.ai/adapter-livekit/speko-llm): LiveKit Agents LLM adapter backed by POST /v1/complete. - [SpekoTTS](https://docs.speko.ai/adapter-livekit/speko-tts): LiveKit Agents TTS adapter backed by POST /v1/synthesize. - [Intent](https://docs.speko.ai/adapter-livekit/intent): Routing hint type and construction-time validator. - [Audio helpers](https://docs.speko.ai/adapter-livekit/audio): WAV encode / decode and MIME parsing utilities. - spekoai Python: Sync and async Python SDK for Speko. - [spekoai (Python)](https://docs.speko.ai/sdk-python/overview): Official Python SDK for the Speko voice gateway — sync + async. - [transcribe](https://docs.speko.ai/sdk-python/transcribe): POST /v1/transcribe — speech-to-text with automatic provider routing. - [synthesize](https://docs.speko.ai/sdk-python/synthesize): POST /v1/synthesize — text-to-speech with automatic provider routing. - [complete](https://docs.speko.ai/sdk-python/complete): POST /v1/complete — LLM completion with automatic provider routing. - [connect_realtime](https://docs.speko.ai/sdk-python/realtime): Speech-to-speech WebSocket sessions, async only. - [usage](https://docs.speko.ai/sdk-python/usage): GET /v1/usage — billing and usage reporting. - [credits](https://docs.speko.ai/sdk-python/credits): Prepaid credit balance and append-only ledger. - [Errors](https://docs.speko.ai/sdk-python/errors): Typed exceptions raised by the Python SDK.