Everything you need to integrate Rime, on one page. Every snippet below is complete and runnable — substitute your API key from the API Tokens page.
Hosts and authentication
The API host is users.rime.ai — not api.rime.ai, which exists but serves Rime-internal infrastructure: TTS requests there fail with 404. Every authenticated endpoint takes the same header: Authorization: Bearer YOUR_API_KEY. On WebSocket connections, send it as a connection header — and because your key is a secret (and browser WebSocket objects can’t set headers), connect from a server-side process rather than from browser code. There is no official Rime SDK on npm or PyPI, and none is needed — any similarly named packages in those registries are unrelated third-party projects, not Rime.
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