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, max 15000 characters)

Maximum string length: 15000
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"

intervention_group_id
string

Select one pronunciation group owned by the authenticated user. Omit to use default on compatible routes. Only the selected group and system rules apply; other user groups are excluded. Explicit selection requires an intervention-compatible provider, including an explicit default.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_-]+$
Example:

"default"

language
string

BCP 47 language[-Script][-REGION], such as en, zh-Hans, or en-GB. Omit to use the available primary locale of the selected model and voice, or its only supported locale. A broad language resolves to the matching primary locale or the only matching locale; multiple matches without a default require an explicit locale. An explicit region must be supported; en-GB never silently falls back to en-US. Case and separator aliases are normalized (EN_us becomes en-US) without dropping the region.

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 in Hz (default: 16000), subject to the selected route. VoxNexus self-hosted TTS supports 16000 and 24000.

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, greater than 0 and at most 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.