---
title: "Voice agent infrastructure for STT, LLM and TTS"
description: "Voice agent infrastructure across the hosted Speko Router, the open customer-side Gateway, and the separate hosted Agents API."
canonical: "https://speko.ai/voice-agent-infrastructure"
last-updated: "2026-08-24"
---

> ## Speko page index
> The complete index of every page on this site is at: https://speko.ai/llms.txt
> Read it before exploring further. It lists the exact Markdown URL for every canonical HTML page.

# Voice agent infrastructure

Architecture

Voice agent infrastructure across the hosted Speko Router, the open customer-side Gateway, and the separate hosted Agents API.

## The three Speko boundaries

- **Router.** The hosted data plane at[router.speko.dev](https://router.speko.dev) accepts native, typed STT, LLM, and TTS requests. It owns managed routing, admission, provider dispatch, normalized errors, and usage settlement.
- **Gateway.** The open runtime in[SpekoAI/gateway](https://github.com/SpekoAI/gateway)runs inside the customer workload. It keeps BYOK credentials local, provides one streaming protocol across providers, and ships native LiveKit and Pipecat integrations.
- **Agents API.** The hosted API at[api.speko.dev](https://api.speko.dev) owns agents, sessions, phone numbers, calls, and the managed conversation loop.

## Choose by trust boundary

Choose Router when Speko should operate the managed model data plane. Choose Gateway when provider-direct audio should stay in the customer workload or provider keys must remain inside a customer process. The two can coexist: a LiveKit session can use Gateway for direct STT and TTS while using Router for a managed LLM. Read Gateway's public trust document before deciding which process may inspect environment variables and which traffic crosses the hosted boundary.

Choose the Agents API when Speko should also own the agent definition, session lifecycle, phone number, and call transport. A Router credential does not create an agent or place a call, and a Gateway local token is not a hosted API key.

## Use the contracts, not guessed compatibility

Router is not an OpenAI-compatible hostname. Its canonical OpenAPI 3.1 document is available at[router.speko.dev/openapi.json](https://router.speko.dev/openapi.json), with streaming speech documented by the AsyncAPI contract in the public Gateway repository. Every POST requires an`Idempotency-Key`, and every non-2xx response uses the same typed error envelope with a stable code, message, recovery hint, and retryable flag.

Start with the [Router quickstart](https://speko.ai/docs), the[LiveKit Gateway guide](https://speko.ai/docs/livekit), or the[Pipecat Gateway guide](https://speko.ai/docs/pipecat). The[versioning policy](https://speko.ai/developers/versioning) defines compatibility, deprecation, and Sunset behavior for durable clients.
