Skip to main content
This standalone API speaks text supplied by your application. For speech generated as part of a model reply, see Audio responses.

Generate speech

Use the standard text-to-speech endpoint when you want a complete WAV file. The response body is binary audio, and the response headers include X-Language-Code. To save the generated audio to history, set store=true. When stored, the response also includes X-Tts-Id, and persistence completes before the response returns.

Stream speech for lower latency

Use streaming text-to-speech when you want playback to start before the full audio file is ready. Choose mp3 for smaller payloads or pcm for uncompressed audio (returned as audio/wav). To save the generated audio to history, set store=true. When stored, the response includes X-Tts-Id. History persistence for streaming is best-effort and completes shortly after the stream ends, so an immediate lookup by X-Tts-Id can briefly return 404. If persistence fails or is skipped (for example, if the audio exceeds the 25MB history cap), the id is never assigned and lookups keep returning 404.