Messages
{
"type": "<string>",
"text": "<string>",
"voice_id": "<string>",
"language": "<string>",
"add_wav_header": true,
"sample_rate": 123,
"speed": 123,
"request_id": "<string>"
}{
"type": "<string>",
"connection_id": "<string>",
"message": "<string>"
}{
"type": "<string>",
"request_id": "<string>",
"chunk_index": 123,
"data": "<string>"
}{
"type": "<string>",
"request_id": "<string>",
"total_chunks": 123,
"characters": 123
}{
"type": "<string>",
"request_id": "<string>",
"error": "<string>",
"message": "<string>"
}Endpoint examples
Text to Speech (Websocket)
The WebSocket API provides real-time text-to-speech streaming capabilities with high-quality voice synthesis. This API uses WebSocket to deliver audio chunks as they’re generated, enabling low-latency audio playback
WSS
/
api
/
v1
/
get_speech
Messages
{
"type": "<string>",
"text": "<string>",
"voice_id": "<string>",
"language": "<string>",
"add_wav_header": true,
"sample_rate": 123,
"speed": 123,
"request_id": "<string>"
}{
"type": "<string>",
"connection_id": "<string>",
"message": "<string>"
}{
"type": "<string>",
"request_id": "<string>",
"chunk_index": 123,
"data": "<string>"
}{
"type": "<string>",
"request_id": "<string>",
"total_chunks": 123,
"characters": 123
}{
"type": "<string>",
"request_id": "<string>",
"error": "<string>",
"message": "<string>"
}bearerAuth
type:http
Pass API key in Authorization header as Bearer token
TTS Request
type:object
Request to synthesize text to speech
Connected
type:object
Sent immediately after successful WebSocket connection
Audio Chunk
type:object
Streamed audio data. Multiple chunks are sent per request.
Complete
type:object
Signals all audio has been sent
Error
type:object
Indicates a problem with the request

