TTS2Go Documentation

TTS2Go is managed TTS infrastructure for websites. Instead of building an audio generation pipeline, storage layer, CDN, and abuse prevention system, you install an SDK and let TTS2Go handle everything. Audio is generated on-demand via ElevenLabs, verified by AI, and cached permanently on a global CDN.

How it works

  1. Install the SDKnpm install @tts2go/react (or your framework's package).
  2. Create a project — sign up and create a project in the dashboard to get your project ID.
  3. Generate an API key — create an API key scoped to your project.
  4. Add TTS2GoProvider — wrap your app with the provider, passing your API key and project ID.
  5. Add TTS to your UI — use TTSButton for a drop-in solution, or the useTTS hook to build a fully custom play button.
  6. Instant browser fallback — when a user clicks play, the SDK immediately speaks using the browser's built-in TTS for zero-latency feedback, while sending a generation request to TTS2Go.
  7. Approve and cache — the request appears in your project dashboard. Approve it manually or let AI auto-approve it. TTS2Go generates studio-quality audio via ElevenLabs in your configured voice, then caches it on a global CDN. Every subsequent play of that same content is served instantly from the CDN.

Why TTS2Go?

TTS2Go is a high-quality lazy caching solution for AI text-to-speech. Instead of pre-generating audio for your entire site, audio is generated on-demand when real users actually request it. The first user hears browser TTS instantly while ElevenLabs audio is generated in the background. Every subsequent request is served from a global CDN — fast, high-quality, and cost-efficient. You never pay for content nobody listens to.

Quick links

SDK Packages

Core concepts

API Keys

Each API key is scoped to a project and can have its own rate limits, allowed domains, and voice restrictions. Keys use the tts_ prefix and are stored as SHA-256 hashes on the server.

CDN Caching

Generated audio is uploaded to a CDN (Cloudflare R2). The URL is deterministic based on the content, project ID, and voice ID, so identical requests always resolve to the same cached file.

Content Verification

TTS2Go uses AI to verify that generation requests contain content consistent with your website. Define content profiles describing your site, and the AI auto-approves matching requests while flagging suspicious ones. This lets you safely expose API keys in client-side code. For sites with dynamic or user-generated content where AI scoring is unreliable, switch to manual approval — review and bulk-approve pending requests from the dashboard.

Browser Fallback

When a user clicks play for the first time, the SDK serves browser-native speech synthesis immediately for zero-latency feedback. Simultaneously, it sends a generation request to TTS2Go. Once approved, TTS2Go generates studio-quality audio via ElevenLabs and caches it on the CDN. All future plays of that content are served instantly from the CDN — no browser fallback needed.