Skip to main content

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

  1. Connect — Configure your LiveKit client to point to Telnyx’s LiveKit cluster using your Telnyx credentials.
  2. Build — Write agents using the LiveKit Agent framework with Telnyx plugins for STT, TTS, and LLM.
  3. Deploy — Deploy agents to Telnyx’s managed infrastructure. Telephony connects via built-in SIP.
  4. Scale — Telnyx handles the infrastructure. You manage your agents and configuration.

What’s different from LiveKit Cloud?

Next steps


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:

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 deploy command. Just swap the URL: lk agent deploy . --url .livekit.telnyx.com
Note: Available regions are nyc1, sfo3, atl1, and syd1. See the Regions page for details.

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.md
Go 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
Verify your CLI version:

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:
This creates your tenant record on the platform. You only need to do this once per region.

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 (replace 512 with your area code):
Note the number you want before exiting — you’ll need it below. 2. Order the number you want:
3. Confirm the order completed:
Wait for "success" before moving on. If your order didn’t complete successfully, chat with us — we’re happy to help.
  1. Log in to the Telnyx portal
  2. Go to Real Time CommuncationsNumbersBuy Numbers
  3. 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):
2. Attach the regional SIP FQDN (replace CONNECTION_ID and {slug} with your region slug):
3. Assign your phone number to the connection (replace CONNECTION_ID and phone number):
  1. In the portal, go to Real Time CommuncationsVoiceSIP ConnectionsCreate
  2. Set the connection type to FQDN
  3. Point it at your region’s SIP endpoint from the table above
  4. 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:
Note the 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:
This is a fully working voice agent — an Italian restaurant ordering assistant built with 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:
The CLI uploads your agent code, builds a container image, and deploys it. You’ll see build logs streaming in real-time. Check that your agent is running:
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 status to confirm the agent is running. Check logs with lk 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.md
Connecting 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 your LIVEKIT_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:
If you’re migrating from LiveKit Cloud or self-hosted, change the three environment variables and everything else stays the same.

Migration

From LiveKit Cloud

Source: https://developers.telnyx.com/docs/livekit/migration/from-livekit-cloud.md
Zero code changes. Swap your credentials, redeploy, done.

What changes

What doesn’t change

  • Your agent code
  • SDK usage
  • lk CLI commands
  • Dockerfiles
  • Room management, dispatch rules

Steps

  1. Create a Telnyx account at portal.telnyx.com
  2. Generate a Telnyx API key in the portal
  3. Register with the platform (one-time):
  4. Update your environment variables with the values above
  5. Deploy to Telnyx:
  6. Verify: lk room list to confirm connectivity
  7. (Optional) Install the Telnyx plugin for on-prem STT, TTS, and LLM
  8. (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.md
Keep 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

  1. Create a Telnyx account at portal.telnyx.com
  2. Generate a Telnyx API key in the portal
  3. Register with the platform (one-time):
  4. Update your agent to point at https://nyc1.livekit-telnyx.com (or your preferred region)
  5. Move secrets to the platform:
  6. Re-create dispatch rules on the Telnyx platform
  7. Update SIP configuration to point at Telnyx SIP endpoints
  8. Verify your agent is running: lk room list
  9. 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.md
First time building? Complete Quickstart — Step 1 to configure your CLI and register with the platform.

1. Install the plugin

This is the Telnyx-maintained plugin, which includes the latest features and fixes ahead of the upstream 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

Create agent.py:
The only Telnyx-specific parts are the stt, tts, and llm — everything else is standard LiveKit.

3. Add a requirements file

Create requirements.txt:

4. Deploy

The platform builds your image in-cluster, deploys it, and starts the worker. Check the status:
Tail logs once it’s running:

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


Deploy

Deploy

Source: https://developers.telnyx.com/docs/livekit/deploy.md
Same 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

Registers the agent and writes the agent ID to livekit.toml. Skip this if you’ve already created the agent.

2. Deploy

Subsequent deploys roll out a new version.

3. Check status

4. Tail logs

For build 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_URL
  • LIVEKIT_API_KEY — your Telnyx API key
  • LIVEKIT_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

Set LIVEKIT_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:
Log forwarding to third-party services (Datadog, Sentry, CloudWatch) is coming soon.

Secrets

Source: https://developers.telnyx.com/docs/livekit/deploy/secrets.md

Setting secrets on deploy

Pass secrets when you deploy:
To set additional secrets after 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_URL
  • LIVEKIT_API_KEY (your Telnyx API key — used for both platform auth and model access)
  • LIVEKIT_API_SECRET
You don’t need to set these manually. Note: 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:
Secrets set via the CLI are encrypted at rest and injected at runtime. They cannot be retrieved after being set.

Management & Access

Source: https://developers.telnyx.com/docs/livekit/deploy/management.md

Access model

All platform interaction is through the lk 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
See Compatibility for the full list of supported and unsupported features.

Plugin Reference

Overview

Source: https://developers.telnyx.com/docs/livekit/models.md
All 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.md
Telnyx hosts Deepgram models on dedicated GPUs. Access them through the Telnyx plugin:
The plugin provides two STT classes:
  • telnyx.deepgram.STT — Recommended. Connects to Deepgram models hosted on Telnyx GPUs. Takes a model parameter (nova-3, nova-2, flux).
  • telnyx.STT — Connects to Telnyx’s own transcription engine (default) or Deepgram via transcription_engine="Deepgram". Takes a transcription_engine parameter instead of model.
For most use cases, telnyx.deepgram.STT is the simpler interface. Plugin source on GitHub

Available models

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.md
Telnyx 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 pattern Provider.Model.voice_name. To find a voice:
  1. Browse the voice library
  2. Copy the voice ID (e.g. Telnyx.NaturalHD.astra)
  3. 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.md
Telnyx 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 your TELNYX_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.
Full models list →

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:
This gives you stdout/stderr from your agent in real time — same as LiveKit Cloud’s log access.

Coming very soon

Traces, metrics, and session debugging are on our roadmap.

Telephony

Telephony

Source: https://developers.telnyx.com/docs/livekit/telephony.md
Telnyx 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 the lk 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 using headers_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: ALLOW on your LiveKit inbound trunk. Delivers the highest audio quality for voice AI agents.
Both codecs are negotiated automatically during SIP call setup. If the remote side supports Opus, it will be preferred over G.722.

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.md
Telnyx 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.
Agents are deployed per-account with full namespace isolation. Your rooms, SIP trunks, and dispatch rules are scoped to your API key and never visible to other tenants.

Autoscaling

The platform watches active room load and scales your agent workers up and down automatically. You don’t configure load_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

Because Telnyx is both the carrier and the platform, the SIP leg is on-net — no external SIP trunk hop, no PSTN egress to a third party. The call lands directly in a LiveKit room where your agent is waiting.

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.
You can also bring your own provider keys (OpenAI, Anthropic, etc.) — those route externally.

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.md
All 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.

Telnyx Ultra — Platform Exclusive

Our highest-fidelity voice. Available exclusively for agents deployed on LiveKit on Telnyx, not through the plugin alone. Head over to the TTS voice library to check out the variety of voices, languages, and accents we offer.

STT

See telnyx.com/pricing/speech-to-text for current rates.

TTS

See telnyx.com/pricing/text-to-speech for current rates.

LLM

See telnyx.com/pricing/conversational-ai for current rates.