Text-to-speech
POST /v1/tts turns text into audio in one request. Use it for narration, notifications and pre-rendered lines. For live use, call say() inside a realtime session instead.
curl https://api.vaux.ng/v1/tts \
-H "Authorization: Bearer $VAUX_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "text": "We did it!", "voice": "maya", "emotion": "excited", "format": "mp3" }' \
--output speech.mp3
| Field | Type | Description |
|---|---|---|
text | string, ≤ 5,000 chars | What to say |
voice | string | Voice slug, name or id |
emotion | string | Optional. See emotions |
speed | 0.6–1.5 | Optional |
volume | 0.5–2 | Optional |
language | string | Optional, default en |
format | mp3 · wav | Default mp3 |
The response body is the audio. The X-Credits-Charged header shows the cost (billed per 1,000 characters).