Skip to main content
POST
/
api
/
v1
/
tts
/
speech
/
stream
Speech Stream
curl --request POST \
  --url https://dev.voice.ai/api/v1/tts/speech/stream \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>",
  "voice_id": "<string>",
  "audio_format": "mp3",
  "temperature": 1,
  "top_p": 0.8
}
'
"<string>"

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your API key as the bearer token. Format: Authorization: Bearer

Body

application/json
text
string
required

The text to generate speech for

voice_id
string · null · null

Optional voice ID. If omitted, the default built-in voice is used.

audio_format
enum<string> | null
default:mp3

Audio format: mp3, wav, or pcm

Available options:
mp3,
wav,
pcm
temperature
number | null
default:1

Temperature for generation (0.0-2.0)

Required range: 0 <= x <= 2
top_p
number | null
default:0.8

Top-p sampling parameter (0.0-1.0)

Required range: 0 <= x <= 1

Response

Successful Response - Returns HTTP chunked streaming audio

MP3 audio chunks streamed via HTTP chunked transfer encoding