Coda API reference
Streaming HTTP
Coda streaming HTTP endpoint: synthesize speech with Rime’s flagship model and stream audio back.
The streaming endpoint returns audio bytes in the format specified by the
Accept header.
Audio Formats
Set theAccept header to one of the following values:
| Format | Accept Header | Notes |
|---|---|---|
| Opus (WebM) | audio/webm;codecs=opus | Recommended. Opus offers excellent compression. WebM streams natively in browsers. |
| Opus (OGG) | audio/ogg;codecs=opus | Opus offers excellent compression. OGG container. |
| MP3 | audio/mpeg | Lower compression rate than Opus. Highest compatibility across devices and players. |
| WAV | audio/wav | Uncompressed. RIFF WAVE header with 16-bit little-endian linear PCM samples. Streams natively in browsers. |
| PCM | audio/L16 | Headerless 16-bit little-endian linear PCM. |
| G.711 μ-law | audio/PCMU | Headerless stream of audio bytes. |
Deprecated aliases
Still accepted for backwards compatibility; new code should use the RFC types above.| Deprecated | Use instead |
|---|---|
audio/mp3 | audio/mpeg |
audio/pcm | audio/L16 |
audio/x-mulaw | audio/PCMU |
Variable Parameters
Must be one of the flagship Coda voices listed in our documentation.
The text you’d like spoken. Unlimited via API. Character limit per request is 3,000 in the dashboard UI.
Choose
coda for Rime’s most realistic conversational voices.If provided, the language must match the language spoken by the provided speaker. Both the 2-letter ISO 639-1 and the 3-letter ISO 639-2/3 form are accepted:
See the voices documentation for which speakers support each language.
| 639-1 | 639-2/3 | Language |
|---|---|---|
en | eng | English |
es | spa | Spanish |
fr | fra | French |
pt | por | Portuguese |
de | deu | German |
ja | jpn | Japanese |
The sampling rate (Hz).
The time scaling factor.A value above 1.0 slows down the audio, a value below 1.0 speeds up the audio.

