Telnyx AI: LiveKit on Telnyx (Beta) — Full Documentation
Complete page content for LiveKit on Telnyx (Beta) (AI section) of the Telnyx developer docs (https://developers.telnyx.com). Root index: https://developers.telnyx.com/llms.txt · Lightweight index for this subsection: https://developers.telnyx.com/development/llms/ai-livekit-llms-txt.md
LiveKit on Telnyx (Beta)
Overview
Source: https://developers.telnyx.com/docs/livekit.md
LiveKit on Telnyx
Build, deploy, and scale voice AI agents on Telnyx’s global network — the same LiveKit you know, hosted on Telnyx infrastructure with integrated telephony and AI models.Why LiveKit on Telnyx?
LiveKit on Telnyx collapses your voice AI stack into a single platform:- Built-in Telephony, No Third-Party SIP Fees — Telnyx is the carrier. Buy numbers, configure SIP, connect to agents — all in one portal. On other platforms, you pay third-party SIP fees on top of your usage. On Telnyx, those are gone entirely.
- Ultra-Low Latency AI on Telnyx GPUs — STT, TTS, and LLM run on Telnyx-owned GPUs, colocated in every region ~2ms from your agents. No round-trips to external APIs — faster responses, better conversations.
- Same LiveKit, Zero Migration Risk — Same SDKs, same CLI, same agent framework. Swap three environment variables and redeploy — your code doesn’t change.
- One Platform, One Bill — Compute, models, telephony, and phone numbers — all on a single Telnyx invoice. No vendor sprawl.
Not ready to migrate?
Install the Telnyx plugin on your existing LiveKit Cloud or self-hosted setup. Same agent code, same infrastructure — just faster, colocated inference on Telnyx GPUs. See the Plugin Reference for available STT, TTS, and LLM options.Who is this for?
- LiveKit Cloud users looking to consolidate vendors or reduce latency via Telnyx’s network
- Self-hosted LiveKit operators tired of managing infrastructure and wanting managed hosting
- New voice AI developers who want a single platform for media, telephony, and AI
How it works
- Connect — Configure your LiveKit client to point to Telnyx’s LiveKit cluster using your Telnyx credentials.
- Build — Write agents using the LiveKit Agent framework with Telnyx plugins for STT, TTS, and LLM.
- Deploy — Deploy agents to Telnyx’s managed infrastructure. Telephony connects via built-in SIP.
- Scale — Telnyx handles the infrastructure. You manage your agents and configuration.
What’s different from LiveKit Cloud?
Next steps
- Quickstart — Get deployed in 5 minutes
- Connect — Configure your LiveKit client
- Telephony — SIP and PSTN integration
- Plugin Reference — STT, TTS, and LLM options
Compatibility
Source: https://developers.telnyx.com/docs/livekit/compatibility.md
What’s the Same
The LiveKit agent framework is 100% portable — your agent code does not change. Everything in LiveKit works identically on Telnyx. Notable sections from LiveKit docs:- Agent Framework — docs.livekit.io/agents
- SIP / Phone — docs.livekit.io/sip
- API Reference — docs.livekit.io/api
- Cloud Deployment — docs.livekit.io/cloud
- Egress / Ingress — docs.livekit.io/egress
What’s Different
These features work differently on Telnyx compared to LiveKit Cloud:- STT / TTS / LLM — LiveKit Cloud requires third-party AI providers. On Telnyx, hosted models are available out of the box via
livekit-plugins-telnyx. Prefer your own provider? Bring any API key. - SIP trunking — On other platforms, you pay third-party SIP fees on top of your usage. On Telnyx, those are gone entirely — SIP is built-in because you’re already on the carrier. BYOT also supported if you prefer your existing provider.
- HD Voice — G.722 (16 kHz) and Opus (48 kHz) codecs for wideband audio on SIP calls. G.722 is enabled by default. Opus requires SRTP — see Telephony for setup.
- Phone numbers — Telnyx numbers in 140+ countries instead of LiveKit Phone (US only)
- Agent deployment — Same
lk agent deploycommand. Just swap the URL:lk agent deploy . --url .livekit.telnyx.com
What’s Not Supported
- Ingress (RTMP/WHIP) — importing external streams into a room
- Sandbox — quick-start dev environments
Coming Soon
This roadmap is subject to change.- Egress — Call recording, room recording, cloud storage export
- Observability — Cloud Dashboard with session timeline (transcripts, traces, logs, audio playback)
- Agent Tooling — Playground, Agent Builder
- Security & Compliance — E2E encryption, SSO, RBAC, HIPAA
- Enterprise SIP — Call transfers (REFER/warm transfer), and advanced SIP features
- Media — Enhanced noise cancellation (Krisp/BVC)
Quick Start
Source: https://developers.telnyx.com/docs/livekit/quickstart.mdGo from zero to a working voice agent you can call from your phone. By the end, you’ll have a LiveKit agent deployed on Telnyx infrastructure, connected to a real phone number.
Prerequisites
Before you start, make sure you have:- A Telnyx account
- A Telnyx API key (generate one in the portal)
- A secret key you create and keep safe — this is your
LIVEKIT_API_SECRET - Python ≥ 3.10
- LiveKit CLI (
lk) version 2.16.0 or later
Step 1: Configure the CLI
Set your environment variables to point at a Telnyx LiveKit region:LIVEKIT_API_KEY is your Telnyx API key — the same one you use everywhere else on the platform. Set TELNYX_API_KEY once and reference it throughout.
Register your credentials with the platform:
Available regions
Choose the region closest to your users for the lowest latency.
Step 2: Set up telephony
To receive phone calls, you need a phone number (DID) pointed at the Telnyx LiveKit SIP servers. No third-party SIP fees — Telnyx is the carrier.Buy a phone number
Search for an available number in your area code and order it: 1. Browse available numbers (replace512 with your area code):
"success" before moving on.
If your order didn’t complete successfully, chat with us — we’re happy to help.
- Log in to the Telnyx portal
- Go to Real Time Communcations → Numbers → Buy Numbers
- Purchase a number by checking out
Create a SIP connection
A SIP connection tells Telnyx how to route inbound calls. You’ll point it at one of our regional LiveKit SIP servers so calls land on the right infrastructure.
1. Create the FQDN connection (replace
{slug} with your region slug):
CONNECTION_ID and {slug} with your region slug):
CONNECTION_ID and phone number):
- In the portal, go to Real Time Communcations → Voice → SIP Connections → Create
- Set the connection type to FQDN
- Point it at your region’s SIP endpoint from the table above
- Assign your phone number to this SIP connection
Register the number with the platform
Set up an inbound trunk for your number and a dispatch rule to route calls to your agent. 1. Create an inbound SIP trunk:sid in the response — you’ll need it in the next step.
allowed_addresses restricts which source IPs can send SIP traffic to this trunk. 192.76.120.0/22 is Telnyx’s SIP network — since Telnyx is your carrier, all inbound calls will originate from this range.
2. Create a dispatch rule:
Step 3: Clone an example agent
Clone the example agents repo and navigate to the restaurant agent:livekit-plugins-telnyx for STT, TTS, and LLM.
Step 4: Deploy
Register the agent with the platform, then deploy it to your Telnyx LiveKit region:lk agent status reads the agent ID from your livekit.toml file — you don’t need to specify it manually. If you skip lk agent create, there’s no ID in the file and the command will fail.
Step 5: Call your agent
Pick up your phone and dial the number you purchased. You should hear:“Thanks for calling Bella’s Kitchen!”Try ordering some pasta. The agent handles the full conversation — browsing the menu, answering questions, and taking your order.
Troubleshooting
- Call doesn’t connect — Verify your SIP connection is pointed at the correct regional FQDN and your DID is assigned to it.
- Agent doesn’t pick up — Run
lk agent statusto confirm the agent is running. Check logs withlk agent logs. - Audio quality issues — Make sure you’re using the region closest to you.
Next steps
You’ve deployed your first agent. Here’s where to go from here:- Build — Write your own agent from scratch
- Deploy — Regions, scaling, secrets, and production deployment
- Models — STT, TTS, and LLM options available on Telnyx
- Telephony — Inbound/outbound calls, dispatch rules, multiple numbers
- Compatibility — What’s the same and different from LiveKit Cloud
Connect
Source: https://developers.telnyx.com/docs/livekit/connect.mdConnecting to the Telnyx LiveKit platform is a URL and credential swap. No code changes.
Get your credentials
Complete Quickstart — Step 1 to set your environment variables and register with the platform. That one-time setup covers everything you need to connect. Already set up? Just make sure yourLIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET are exported in your shell.
Verify the connection:
Available regions
See Regions for all available platform and SIP endpoints.SDK configuration
Server SDKs (Python, Go, Node.js) just need the URL and credentials:Migration
From LiveKit Cloud
Source: https://developers.telnyx.com/docs/livekit/migration/from-livekit-cloud.mdZero code changes. Swap your credentials, redeploy, done.
What changes
What doesn’t change
- Your agent code
- SDK usage
lkCLI commands- Dockerfiles
- Room management, dispatch rules
Steps
- Create a Telnyx account at portal.telnyx.com
- Generate a Telnyx API key in the portal
- Register with the platform (one-time):
- Update your environment variables with the values above
- Deploy to Telnyx:
- Verify:
lk room listto confirm connectivity - (Optional) Install the Telnyx plugin for on-prem STT, TTS, and LLM
- (Optional) Buy a Telnyx number for built-in telephony
What you gain
- Built-in telephony, no third-party SIP fees — On other platforms, you pay third-party SIP fees on top of your usage. On Telnyx, those are gone entirely.
- Ultra-low latency AI on Telnyx GPUs — STT, TTS, and LLM colocated in every region ~2ms from your agents. No round-trips to external APIs.
- One platform, one bill — Compute, models, telephony, and phone numbers on a single Telnyx invoice. No vendor sprawl.
Rolling back
It’s just environment variables. Point them back at LiveKit Cloud and redeploy.From Self-Hosted
Source: https://developers.telnyx.com/docs/livekit/migration/from-self-hosted.mdKeep your agents, ditch the infrastructure. No more managing Kubernetes clusters, TURN servers, SIP services, or autoscaling.
What Telnyx replaces
- LiveKit SFU server
- SIP service / Otel SIP
- TURN/STUN servers
- Container orchestration / autoscaling
- TLS termination and load balancing
- Monitoring infrastructure
What stays the same
- Your agent code
- SDK calls
- Room management logic
- Dispatch rules
Steps
- Create a Telnyx account at portal.telnyx.com
- Generate a Telnyx API key in the portal
- Register with the platform (one-time):
- Update your agent to point at
https://nyc1.livekit-telnyx.com(or your preferred region) - Move secrets to the platform:
- Re-create dispatch rules on the Telnyx platform
- Update SIP configuration to point at Telnyx SIP endpoints
- Verify your agent is running:
lk room list - Decommission your self-hosted infrastructure
What you gain
- No infra management — No Kubernetes, no TURN, no Redis for multi-region.
- Built-in SIP, no third-party SIP fees — On other platforms, you pay third-party SIP fees on top of your usage. On Telnyx, those are gone entirely.
- Managed autoscaling — Platform handles container lifecycle.
- Ultra-low latency AI on Telnyx GPUs — STT, TTS, and LLM colocated in every region ~2ms from your agents. No round-trips to external APIs.
Build
Build
Source: https://developers.telnyx.com/docs/livekit/build.mdFirst time building? Complete Quickstart — Step 1 to configure your CLI and register with the platform.
1. Install the plugin
livekit-plugins-telnyx PyPI package. We host our own release to iterate faster than the upstream cadence allows. Use the git install above for the current recommended version.
Plugin source on GitHub
2. Write your agent
Createagent.py:
stt, tts, and llm — everything else is standard LiveKit.
3. Add a requirements file
Createrequirements.txt:
4. Deploy
Swap models
The example above uses Telnyx-hosted defaults. Swap any component independently:- STT — Deepgram, Nova-3, Nova-2, Flux → STT plugin
- TTS — Telnyx Natural HD, MiniMax, Rime, ElevenLabs (BYOK), Azure → TTS plugin
- LLM — GPT-4o-mini, Kimi-K2.6, Claude (BYOK) → LLM plugin
Next steps
- Telephony — Connect your agent to a phone number
- Deploy reference — Secrets, rollbacks, multi-region
Deploy
Deploy
Source: https://developers.telnyx.com/docs/livekit/deploy.mdSame commands as LiveKit Cloud.
lk agent deploy uploads your code, builds a container image on Telnyx’s build service, and deploys the worker.
First time deploying? Complete Quickstart — Step 1 to configure your CLI and register with the platform.
1. Create your agent
livekit.toml. Skip this if you’ve already created the agent.
2. Deploy
3. Check status
4. Tail logs
5. Update secrets
Add or update secrets on a running agent:6. Rollback
What gets auto-injected
The platform injects these into your agent’s environment at runtime — you don’t need to set them manually:LIVEKIT_URLLIVEKIT_API_KEY— your Telnyx API keyLIVEKIT_API_SECRET
More
- Secrets — Managing API keys and sensitive config
- Configuration — Regions, multi-agent projects, env vars
- Management — What Telnyx manages vs. what you control
Configuration
Source: https://developers.telnyx.com/docs/livekit/deploy/configuration.md
Regions
Deploy to the region closest to your users. See Regions for all available endpoints.Environment variables and livekit.toml
SetLIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET as environment variables. You also need a livekit.toml in your project directory that defines the subdomain and agent ID:
lk agent create writes the agent ID to livekit.toml. Don’t edit the [agent] section manually. If you clone an example repo, remove the [agent] section before running lk agent create so a fresh ID is generated.
For multi-agent projects, use the --config flag to point at different TOML files:
Multiple environments
Use separate API keys for dev, staging, and production environments. Each key operates independently.Log access
Stream logs from your running agent:Secrets
Source: https://developers.telnyx.com/docs/livekit/deploy/secrets.md
Setting secrets on deploy
Pass secrets when you deploy:Updating secrets
Update secrets on a running agent:Auto-injected variables
The platform automatically injects these into your agent’s environment at runtime:LIVEKIT_URLLIVEKIT_API_KEY(your Telnyx API key — used for both platform auth and model access)LIVEKIT_API_SECRET
LIVEKIT_API_KEY is your Telnyx API key. Telnyx can revoke it if needed, giving you a single credential to manage.
Local development
For local development, use a.env.local file:
Management & Access
Source: https://developers.telnyx.com/docs/livekit/deploy/management.md
Access model
All platform interaction is through thelk CLI and the Telnyx Portal. There is no direct access to underlying infrastructure (no kubectl, no SSH).
What Telnyx manages
- LiveKit SFU (media server)
- SIP service (built-in telephony)
- Agent container runtime and orchestration
- Autoscaling
- TLS/SSL termination and load balancing
- Health checks and rolling deploys
What you control
Current limitations
- No volume mounts or persistent storage
- No custom networking or network policies
- No privileged containers
- No custom domains
- No direct database access — use external services with secrets
Plugin Reference
Overview
Source: https://developers.telnyx.com/docs/livekit/models.mdAll models are accessed through the Telnyx plugin. Models run on Telnyx GPUs, so whether you’re using the plugin from LiveKit Cloud or deployed on the Telnyx platform, you get on-prem inference without managing infrastructure. Deepgram Nova-3, Nova-2, and Flux — hosted on Telnyx. Extensive voice library across multiple providers and models. Hosted open-source and proprietary models via BYOK.
STT
Source: https://developers.telnyx.com/docs/livekit/models/stt.mdTelnyx hosts Deepgram models on dedicated GPUs. Access them through the Telnyx plugin:
telnyx.deepgram.STT— Recommended. Connects to Deepgram models hosted on Telnyx GPUs. Takes amodelparameter (nova-3,nova-2,flux).telnyx.STT— Connects to Telnyx’s own transcription engine (default) or Deepgram viatranscription_engine="Deepgram". Takes atranscription_engineparameter instead ofmodel.
telnyx.deepgram.STT is the simpler interface.
Plugin source on GitHub
Available models
Nova-3 (recommended)
Latest generation, best accuracy.Nova-2
Previous generation, stable and reliable. Uses weighted keyword boosting.Flux
Experimental, with built-in end-of-turn detection. Designed for real-time voice agents.Parameters
TTS
Source: https://developers.telnyx.com/docs/livekit/models/tts.mdTelnyx offers an extensive library of voices across multiple providers and models, with broad language and accent support. Access them through the Telnyx plugin:
Voice ID format
Voice IDs follow the patternProvider.Model.voice_name. To find a voice:
- Browse the voice library
- Copy the voice ID (e.g.
Telnyx.NaturalHD.astra) - Pass it to
telnyx.TTS(voice="...")
Examples
Available providers and models
Browse all voices and models in the voice library →
Parameters
LLM
Source: https://developers.telnyx.com/docs/livekit/models/llm.mdTelnyx hosts models with an OpenAI-compatible API. No concurrency limits. Use the standard OpenAI plugin with the
.with_telnyx() helper:
About .with_telnyx()
This is a built-in static method on openai.LLM in the official livekit-plugins-openai package, maintained by LiveKit — not a Telnyx package or fork. It works the same way as the other OpenAI-compatible helpers in that package (.with_azure(), .with_fireworks(), etc.): it sets base_url to Telnyx’s OpenAI-compatible inference endpoint (https://api.telnyx.com/v2/ai/openai) and reads your TELNYX_API_KEY from the environment. You don’t need any additional packages beyond livekit-plugins-openai.
Hosted models
These run on Telnyx infrastructure — no external API key needed, just yourTELNYX_API_KEY:
{/* TODO: Add top proprietary Telnyx models */}
Proprietary models (BYOK)
For models like GPT-4o or Claude, Telnyx proxies the request using your own API key. Add your provider key in the Telnyx Portal under Inference settings.Observability
Observability
Source: https://developers.telnyx.com/docs/livekit/observability.md
What’s available today
Agent logs
Stream logs from your running agent via the CLI:Coming very soon
Traces, metrics, and session debugging are on our roadmap.Telephony
Telephony
Source: https://developers.telnyx.com/docs/livekit/telephony.mdTelnyx is the carrier. Buy a number, connect it to your agent — no third-party SIP trunk setup, no FQDN auth dance. Calls route on-net from Telnyx SIP directly to your agent. For setup steps, see the Quick Start.
Supported
Inbound calls
Inbound calls are routed to your agent via SIP dispatch rules. When someone calls your DID, Telnyx forwards it to the LiveKit SIP service, which dispatches it to your agent based on the rules you configure.Outbound calls
Use thelk CLI to place an outbound call into a room:
DTMF
DTMF tones are supported via RFC 2833/4733. Tones are forwarded to your agent as events and can be handled in code.SIP headers
Pass call metadata through to your agent usingheaders_to_attributes. Header values are mapped to LiveKit participant attributes, available in your agent at runtime.
HD voice
Telnyx supports two HD voice codecs for higher-quality audio on SIP calls:- G.722 — Wideband audio at 16 kHz sample rate. Enabled by default on all Telnyx SIP connections. No additional configuration needed.
- Opus — Wideband audio at 48 kHz sample rate. Requires SRTP encryption on both sides — enable OPUS in your Telnyx SIP connection’s inbound codec list and set
media_encryption: ALLOWon your LiveKit inbound trunk. Delivers the highest audio quality for voice AI agents.
Not yet supported
These features require Enterprise SIP, which is on the roadmap.- Call transfers (REFER / warm transfer)
Reference
Architecture
Source: https://developers.telnyx.com/docs/livekit/architecture.mdTelnyx LiveKit is a managed platform for deploying voice AI agents at scale. You ship agent code. The platform handles containers, scaling, SIP, and AI inference — colocated in each region.
Agents
Each agent you deploy is an isolated worker. Deploy as many as you need — a restaurant bot, a support agent, a scheduling assistant — each running independently under your account.Autoscaling
The platform watches active room load and scales your agent workers up and down automatically. You don’t configureload_fnc or load_threshold — the platform manages this.
- Scale up — new workers spin up as concurrent calls increase
- Scale down — idle workers are drained and removed
- Health checks — unhealthy containers are replaced automatically with rolling deploys
Inbound call flow
AI inference
STT, TTS, and LLM inference runs on Telnyx GPUs colocated with the agent runtime — approximately 2ms from your agent. No round-trips to external APIs on the hot path.Regions
Each region is a full stack: SFU, SIP, agent runtime, and AI inference. See Regions for available endpoints.Regions
Source: https://developers.telnyx.com/docs/livekit/regions.md
Platform endpoints
SIP endpoints
Choose the region closest to your users for the lowest latency.
Limits
Source: https://developers.telnyx.com/docs/livekit/limits.md
Build limits
Agent limits
Telephony limits
For specific limit increases, contact your Telnyx account team.
Pricing
Source: https://developers.telnyx.com/docs/livekit/pricing.mdAll services — compute, models, and telephony — are billed on a single Telnyx invoice. On other platforms, you pay third-party SIP fees on top of your usage. On Telnyx, those are gone entirely.