v1

latestOpenAPI 3.0.3Proprietary2026-07-268815.8 KB
Audio

Create a speech

Generate speech audio from text. Returns an audio file, or a stream of raw PCM chunks when stream is true. The body may be JSON or multipart/form-data — the latter lets you upload ref_audio as a raw file instead of base64-encoding it.

post/v1/audio/speech

Request body

inputstring required

Text to convert to speech. May contain inline tags. Inputs longer than 5000 characters return a 400 input_too_long.

model'higgs-tts-3'

TTS model ID / public alias. Resolved to the served model server-side.

voicestring

Preset voice name or custom voice ID. Mutually exclusive with ref_audio / ref_text when explicitly provided.

response_format'mp3' | 'opus' | 'pcm' | 'wav' | 'aac' | 'flac'

Output audio format. Streaming requires pcm.

streamboolean

If true, stream raw PCM chunks as they are decoded. Requires response_format to be pcm. Speed adjustment is not supported when streaming.

ref_audiostring nullable

Inline reference audio for one-off cloning: an http(s) URL, data URI, or base64-encoded raw audio bytes. Supported formats: AAC, WAV, MP3, FLAC, OPUS. Inline (base64 / data-URI) payloads: max 10 MB.

ref_textstring nullable

Recommended transcript of ref_audio.

Example request

{
  "input": "Hello, this is a test."
}

Response

Generated audio. The content type depends on response_format.

All 8 operations