Skip to main content
create_speech converts text into a finished audio file. The full audio is returned in the response body, ready to save or play. If you need to stream audio chunks as they are synthesized — for example, to start playback before generation finishes — see Stream speech instead.

Basic usage

Request fields

For the complete schema, see Create speech (API reference).

Output formats

If you omit output_format, the API defaults to wav. The same option applies to Stream speech — chunks come back as binary in the requested format.

Response

By default the API returns binary audio in the body. The response carries two useful headers:

When include_phonemes=true

If you opt in to phoneme timestamps, the response switches to JSON with a base64-encoded audio payload alongside the phoneme arrays:
See Pronunciation and phonemes for the full structure.

Save the result

Tips

  • Style matters. Different voices may have different default styles. Either explicitly set style, or call Get voice once at startup to read the voice’s default.
  • Estimate before you generate. predict_duration returns the expected audio length without consuming credits — useful for UI hints and cost forecasting.
  • Long text. The raw API caps text at 300 characters. The Python and TypeScript SDKs split, generate, and merge automatically — see Long text.
  • Empty or very short input can produce unnatural results. Aim for at least a complete short sentence.

Pick a model

Choose between fast and high-quality TTS models.

Long text

Generate audio from text longer than 300 characters.

Voice settings

Tune pitch, intonation, and speed.

API reference

Full request and response schema.