/api/v1/audio/speech
Converts text to speech using various voice models and formats.
Output formats: Format support is model-specific. Read model_spec.supported_formats and model_spec.default_format from GET /models?type=tts. Omitting response_format uses the model default; requesting an unsupported format returns HTTP 400.
Voice cloning: Some TTS models (e.g. tts-chatterbox-hd) accept a cloned-voice handle in the voice field. Mint a handle by uploading a reference audio sample to POST /v1/audio/voices, then pass the returned vv_<id> value as voice here paired with the same model. Supported voice-cloning models advertise the voice_cloning capability on GET /models?type=tts.
Authentication: This endpoint accepts either a Bearer API key or a SIGN-IN-WITH-X header for x402 wallet-based authentication. The legacy X-Sign-In-With-X header is also accepted during migration. When using x402, a 402 Payment Required response indicates insufficient balance and includes top-up instructions.
Request
- Base URL: https://api.venice.ai
- URL: https://api.venice.ai/api/v1/audio/speech
- Auth: one of:
- HTTP bearer
- API key in header SIGN-IN-WITH-X
Request body
Example request
{
"input": "Hello, welcome to Venice Voice.",
"model": "tts-xai-v1",
"response_format": "mp3",
"speed": 1,
"streaming": false,
"voice": "af_sky"
}Response
Audio content generated successfully
Changes
No recorded changes to this operation across all 1 revision of this API.