Core concepts
Text to speech
Send JSON with model and input; receive audio bytes. Billed in RODI (incl. output_audio when priced).
POST
https://api.rodiumai.io/v1/audio/speechCall POST /v1/audio/speech with a TTS model id. OpenAI voices (alloy, …) or Gemini prebuilt voices (Kore, Puck, …).
Voices & formats
OpenAI TTS returns mp3 by default. Gemini TTS returns PCM wrapped as WAV by the gateway unless response_format=pcm.
When to use
- IVR prompts and product narration in French or English.
- Choose Gemini expressive voices vs OpenAI tts-1 for cost.
- Save the binary response directly to a file.
Recipes
French narration
input in French, voice Kore (Gemini) or alloy (OpenAI), response_format wav or mp3.
Note: Write the response body as binary — do not JSON.parse it.
Gemini vs OpenAI
google/gemini-*-tts* for Vertex/Google; openai/tts-1 when you need classic OpenAI voices.
Note: Confirm the slug in GET /v1/models before shipping.
WAV note (Gemini)
Gemini upstream is PCM; Rodium wraps WAV for non-pcm formats so browsers can play the file.
Note: Use response_format=pcm only if you decode L16 yourself.
Examples
Gemini TTS
…OpenAI TTS
…Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Required | TTS model id (e.g. openai/tts-1, google/gemini-2.5-flash-preview-tts). |
| input | string | Required | Text to synthesize into speech. |
| voice | string | Optional | Voice id when supported (e.g. "alloy", "nova"). |
| response_format | string | Optional | Audio format when supported (e.g. "mp3", "opus", "wav"). |
| speed | number | Optional | Playback speed multiplier when supported (typically 0.25–4.0). |
| instructions | string | Optional | Optional speaking style / delivery instructions when the model supports them. |