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

Hosts and authentication

  • The HTTP examples below use users.rime.ai/v1/rime-tts. Coda WebSocket v1 uses api.rime.ai/coda/ws.
  • 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.
  • Use standard HTTP and WebSocket clients. The rime-api Python package supplies Protobuf message definitions for binary WebSocket clients; it does not manage connections.

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 Coda speech over WebSocket

Connect to wss://api.rime.ai/coda/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; 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