Messages
{
"voice_id": "<string>",
"text": "<string>",
"language": "<string>",
"model": "<string>",
"audio_format": "<string>",
"temperature": 123,
"top_p": 123,
"dictionary_id": "<string>",
"dictionary_version": 123,
"delivery_mode": "<string>",
"flush": true
}{
"text": "<string>",
"flush": true
}{
"audio": "<string>"
}{
"is_last": true
}{
"error": "<string>"
}Text to Speech
Single-Context WebSocket
Single generation per connection. Text is buffered until flush, audio streams back, then server closes connection (code 1000). For multiple generations, use /multi-stream.
Authentication: Authorization: Bearer YOUR_API_KEY
WSS
/
api
/
v1
/
tts
/
stream
Messages
{
"voice_id": "<string>",
"text": "<string>",
"language": "<string>",
"model": "<string>",
"audio_format": "<string>",
"temperature": 123,
"top_p": 123,
"dictionary_id": "<string>",
"dictionary_version": 123,
"delivery_mode": "<string>",
"flush": true
}{
"text": "<string>",
"flush": true
}{
"audio": "<string>"
}{
"is_last": true
}{
"error": "<string>"
}bearerAuth
type:http
API key (vk_*). Include in Authorization header: 'Bearer YOUR_API_KEY'. Required for all WebSocket connections. See the Authentication guide for details.
Initialization Message
type:object
First message to set up the session (sets voice, model, language)
Text Buffering Message
type:object
Buffer additional text before flush (text-only, no params). After flush, connection closes.
Audio Chunk Response
type:object
Base64-encoded audio chunk (streamed immediately)
Completion Signal
type:object
Sent after all audio chunks. Server then closes connection (code 1000).
Error Close Event
type:object
Close event emitted on protocol/validation errors