OpenRouter for TTS
with caching

One API for Sarvam, ElevenLabs, OpenAI, Deepgram, xAI, Soniox and Raya, with your own keys. A sentence your agent has said before plays from your cache, as the provider’s own audio, and your provider doesn’t bill you for it again.

Bring your own key from

  • Sarvam
  • ElevenLabs
  • OpenAI
  • Deepgram
  • xAI
  • Soniox
  • Raya

Characters billed by your provider

The same reply, said twice. A real run on ElevenLabs Flash v2.5.

SentenceFirst timeproviderSaid againcache
  1. Hi, this is Priya calling from City Hospital.450
  2. Your appointment with Doctor Sharma is on Thursday at ten in the morning.730
  3. Please carry your previous reports and arrive fifteen minutes early.680
  4. Does that time work for you?280
Total2140

Voice quality

The same audio as calling your provider directly.

Your text, verbatim
Each sentence reaches the provider exactly as your agent wrote it.
Your settings, unchanged
Model, voice, language, speed and the provider’s own options, passed on as you set them.
The provider’s own take
A replay is the complete audio the provider made for that exact request, never spliced or re-encoded.

How to connect

One plugin, every provider.

Make the plugin your LiveKit agent’s TTS. To switch provider, change the provider argument; each keeps its own settings, under its own names.

  • OpenAI SDK

    POST /v1/audio/speech with a model like sarvam/bulbul:v3, elevenlabs/eleven_flash_v2_5, openai/gpt-4o-mini-tts, deepgram/aura-2, xai/xai-tts or soniox/tts-rt-v2.

  • Your provider’s own SDK

    Sarvam’s, ElevenLabs’, OpenAI’s, Deepgram’s, xAI’s, Soniox’s and Raya’s APIs, mirrored: change only the base URL and the key.

  • WebSocket

    The router’s streaming protocol, from any language.

pip install livekit-plugins-tts-cache-router
from livekit.plugins import tts_cache_router as tcr# The API key comes from TTS_CACHE_ROUTER_API_KEY.tts = tcr.TTS(    provider=tcr.Sarvam(        model="bulbul:v3",        speaker="shubh",        language="hi-IN",    ),)

Pricing

Pay for what the cache serves.

Every new org gets $10 of credit, about 5 million cached characters, with no card. After that, buy prepaid credit from $10. It never expires.

Pricing and billing in the docs
Served from the cache (cache-hit)
$0.002/ 1k chars
Synthesized by your provider (cache-miss)
$0from us

Stop paying your provider
twice for the same sentence.

Start with $10 of credit and no card. Add your provider key, make the plugin your agent’s TTS, and every repeat comes from your cache.