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

Hosts and authentication

  • Send HTTP TTS requests to the model’s host: coda.api.rime.ai or mist.api.rime.ai. The host selects the model, so the body needs no modelId.
  • Connect to Coda WebSocket v1 at wss://coda.api.rime.ai/ws. The legacy /ws, /ws2, and /ws3 endpoints stay on users-ws.rime.ai.
  • 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. The Coda Protobuf quickstart uses rime-api message definitions with a standard WebSocket client.

Synthesize speech (HTTP)

POST https://coda.api.rime.ai/ 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 Coda speech over WebSocket

Connect to wss://coda.api.rime.ai/ws with rime.v1.json and wait for ready. Send these messages separately to stream a sentence as PCM audio:
Decode base64 audio values as they arrive. Read until done, which leaves the socket open. To interrupt, stop playback and send {"contextId":"turn-1","cancel":{}}. Use the JSON quickstart for a runnable client and the Coda WebSocket API reference for parameters, events, and binary encoding. For Mist, use the model-specific WebSocket reference.

List voices

Both voice endpoints are public and require no API key.
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

HTTP and legacy WebSocket parameters

This table covers HTTP and the legacy WebSocket endpoints. For Coda WebSocket v1, use language and audioParameters inside start. See the Coda WebSocket parameters for the full list.

Where to go deeper