Speko Docs

Speko Gateway

The open-source, customer-side runtime for real-time voice AI.

The Speko Gateway is an MIT-licensed sidecar binary (spekoai/gateway on Docker Hub, source at github.com/SpekoAI/gateway) that runs inside your infrastructure, next to your agent. It gives your agent one local streaming protocol across voice providers, keeps BYOK credentials inside your process, and can optionally use Speko for managed routing, observability, and consolidated billing.

Early preview: the protocol is versioned, but breaking changes may occur before the first stable release.

What makes it different

  • No network surface. The gateway serves its API only on an owner-only Unix socket (/run/speko/runtime.sock by default). It opens no TCP port; the container exposes none.
  • Provider traffic is direct. Audio and text flow straight from your process to the provider — never through Speko — on provider-direct routes.
  • Verified execution plans. Every session is authorized by a signed plan the gateway verifies before attaching credentials or media. Managed plans come from Speko's control plane; BYOK plans are minted and HMAC-signed in-process.
  • One protocol, many providers. Installed STT/TTS adapters share one session API and WebSocket stream. The local GET /v1/models response is authoritative for each build.

Request-scoped credential sources

BYOK requestSpeko-managed request
Selectioncredential_source: "byok"credential_source: "managed"
Provider credentialyours, never leaves the processshort-lived, delegated per session
Routingyou name the providerSpeko picks per request (provider: "auto")
Billingyour provider bills youconsolidated on your Speko invoice
Speko accountnot requiredrequired

Both request types can coexist in one process. The LiveKit integration's credential_source="auto" selects managed when SPEKO_API_KEY or SPEKO_API_KEY_FILE is configured, and BYOK otherwise. Details in Modes.

The local API at a glance

RoutePurpose
GET /healthz, GET /readyzliveness and drain state (unauthenticated)
GET /v1/modelswhich adapters this build ships (unauthenticated)
POST /v1/sessionscreate a provider session
GET /v1/sessions/{id}/streamthe canonical WebSocket for audio and events
DELETE /v1/sessions/{id}abort a session
GET /metricsPrometheus metrics (authenticated)

All authenticated routes take Authorization: Bearer <SPEKO_LOCAL_AUTH_TOKEN>.

Start with the quickstart.

On this page