Skip to main content
POST
Text to Speech

Authorizations

X-Api-Key
string
header
required

Authenticate using X-Api-Key header

Body

application/json
text
string
required

Text to convert (required)

Example:

"Hello, this is a test message."

model_id
string
required

Model identifier (required). Specifies which model to use for TTS.

Example:

"vn-tts-basic"

voice_id
string
required

Voice unique identifier (required)

Example:

"vn-xiaoxiao"

language
string
default:en-US

Language or locale code (optional, default: "en-US"). Supports both ISO 639-1 language codes (e.g. "en", "zh") and BCP 47 locale codes (e.g. "en-US", "zh-CN"). When a language code is provided, the system will automatically resolve it to the most common locale (e.g. "en" -> "en-US").

Example:

"zh-CN"

format
enum<string>
default:wav

Audio format (optional, default: wav)

Available options:
wav,
pcm
sample_rate
enum<integer>
default:16000

Sample rate (optional, default: 16000)

Available options:
16000,
24000,
48000
bit_rate
integer
default:128
deprecated

Bit rate (kbps), only valid for compressed formats (NOT SUPPORTED YET)

Example:

128

speed
number<float>
default:1

Speech rate multiplier, range: 0.5 - 2.0, default: 1.0 (optional)

Required range: 0.5 <= x <= 2
pitch
integer
default:0

Pitch offset (semitones), range: -12 - 12, default: 0 (optional)

Required range: -12 <= x <= 12
volume
number<float>
default:1

Volume multiplier, range: 0.0 - 1.0, default: 1.0 (optional)

Required range: 0 <= x <= 1
voice_config
object

Voice-specific configuration (optional) — a flat key-value map; supported keys are listed in the voice's config_schema (GET /v1/voices/{voice_id}), unknown keys are ignored

Example:

Response

Successfully returns audio stream

The response is of type file.