Skip to main content
Create a key on the API Tokens page before running the authenticated examples below.

Hosts and authentication

  • Send TTS requests to users.rime.ai, not api.rime.ai. The latter serves internal infrastructure and returns 404 for TTS requests.
  • Authenticate with Authorization: Bearer YOUR_API_KEY. On WebSocket connections, send the same value as a connection header.
  • Keep the key on a server. Browser WebSocket objects cannot set the required header, so browser applications need a server-side bridge.
Rime publishes Python rime-api and JavaScript @rimelabs/api for generated TTS message definitions and schemas. These packages cover the standalone engine protocol. Your application still manages connections and authentication. The cloud examples below use standard HTTP and WebSocket clients.

Synthesize speech (HTTP)

POST /v1/rime-tts returns audio bytes in the format named by your Accept header (audio/mpeg, audio/wav, audio/webm;codecs=opus, audio/ogg;codecs=opus, audio/L16, audio/PCMU):
Full parameters and streaming variants: Coda HTTP reference · Streaming guide

Stream speech (WebSocket /ws3)

Synthesis arguments go in the query string; auth goes in the connection header. Send {"text": ...} messages (buffered by sentence by default) and operations ({"operation": "flush" | "clear" | "eos"}); receive JSON events: chunk (base64 audio), timestamps (word-level), done, error.
Set modelId explicitly on /ws3. Without it, requests are served by the Mist v3 backend, and speakers outside the Mist v3 catalog fail with a “Speaker not found” error. Message schemas: Coda WebSocket reference · Buffering control: Segmentation · Web-app bridge pattern: Next.js voice-agent guide

List voices

Both voice endpoints are public; no API key required.
Choosing a voice: Voices guide · Reference: List All Voices · List Voice Details

Check vocabulary coverage (/oov)

Returns the input words that are not in Rime’s pronunciation dictionary:
Out-of-dictionary words still get a best-effort pronunciation; to control them, see Custom pronunciation. Reference: Vocabulary Coverage

Normalize text (/textnorm)

Preview exactly how numbers, dates, and phone numbers will be spoken. Note the host: optimize.rime.ai.
Guide: Text normalization · Reference: Text Normalization

Common parameters

Where to go deeper