Audio
Speech

/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.

post/api/v1/audio/speech

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

inputstring required

The text to generate audio for. The maximum length is 4096 characters.

languagestring

Optional language hint. Accepted values are model-specific: Qwen 3 accepts full names (English, Chinese, ...); xAI/ElevenLabs accept ISO 639-1 codes (en, ja, ...); MiniMax accepts full names. Unsupported values are silently ignored. Omit to let the model auto-detect.

model'tts-kokoro' | 'tts-qwen3-0-6b' | 'tts-qwen3-1-7b' | 'tts-xai-v1' | 'tts-inworld-1-5-max' | 'tts-chatterbox-hd' | 'tts-orpheus' | 'tts-elevenlabs-turbo-v2-5' | 'tts-minimax-speech-02-hd' | 'tts-gemini-3-1-flash' | 'tts-gradium-v1'

The model ID of a Venice TTS model.

promptstring

A style prompt to control the emotion and delivery of the speech. Supported by models advertising supportsPromptParam (currently Qwen 3 TTS). Ignored by other models. Examples: "Very happy.", "Sad and slow.", "Excited and energetic."

response_format'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm'

Requested audio output format. Supported formats and the default when omitted are model-specific; see model_spec.supported_formats and model_spec.default_format from GET /models?type=tts. An explicit unsupported format returns HTTP 400.

speednumber

The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default.

streamingboolean

Should the content stream back sentence by sentence or be processed and returned as a complete audio file.

temperaturenumber

Sampling temperature for speech generation. Higher values produce more varied output. Supported by models advertising supportsTemperatureParam (Qwen 3, Orpheus, Chatterbox HD). Ignored by other models.

top_pnumber

Nucleus sampling parameter. Supported by models advertising supportsTopPParam (currently Qwen 3 TTS). Ignored by other models.

voicestring

The voice to use when generating the audio. The maximum length is 512 characters. Voices are model-specific: Kokoro (e.g. af_sky, af_bella, am_adam), Qwen 3 (e.g. Vivian, Serena, Dylan), xAI (26 voices, e.g. eve, ara, rex, sal, leo, luna, orion, carina), Orpheus (tara, leah, jess, leo, dan, mia, zac, zoe), Inworld (Craig, Ashley, ...), Chatterbox (Aurora, Blade, ...), ElevenLabs Turbo (Rachel, Aria, ...), MiniMax (WiseWoman, DeepVoiceMan, ...), Gradium (Emma, Kent, Mia, Maximilian, Valentina, Sergio, Elise, Leo, Alice, Davi — spanning en/de/es/fr/pt). You can also pass a cloned-voice handle (vv_<id>) returned by POST /v1/audio/voices to synthesize in a previously cloned voice; the handle must be paired with the same model used to create it. Models that advertise supports_custom_voice_id (e.g. ElevenLabs) additionally accept a raw provider Voice ID here. Using an incompatible voice returns a 400 error. Call GET /models/{id} to list voices for a specific model.

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.