Skip to main content
Method: client.generateSpeech().

Example

Key parameters

  • model (required): TTS-capable model id.
  • input (required): Text to synthesize.
  • voice: Provider-normalized voice alias (recommended) or provider-native voice value.
  • response_format: mp3, wav, flac, etc.
  • speed: Playback speed multiplier (typically 0.25-4).
If voice is not valid for the routed provider/model mapping, the API returns 400 with param: "voice".

Provider config examples

Returns

Audio binary (Blob)
Last modified on July 26, 2026