跳转到主要内容
POST
/
audio
/
speech
/api/v1/audio/speech
curl --request POST \
  --url https://api.venice.ai/api/v1/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": "Hello, welcome to Venice Voice.",
  "model": "tts-xai-v1",
  "response_format": "mp3",
  "speed": 1,
  "streaming": false,
  "voice": "af_sky"
}
'
"<string>"

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json

Request to generate audio from text.

input
string
必填

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

Required string length: 1 - 4096
示例:

"Hello, this is a test of the text to speech system."

language
string

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.

Required string length: 2 - 32
示例:

"English"

model
enum<string>
默认值:tts-kokoro

The model ID of a Venice TTS 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
示例:

"tts-xai-v1"

prompt
string

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

Maximum string length: 500
示例:

"Very happy."

response_format
enum<string>
默认值:mp3

The format to audio in.

可用选项:
mp3,
opus,
aac,
flac,
wav,
pcm
示例:

"mp3"

speed
number
默认值:1

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

必填范围: 0.25 <= x <= 4
示例:

1

streaming
boolean
默认值:false

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

示例:

true

temperature
number

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.

必填范围: 0 <= x <= 2
示例:

0.9

top_p
number

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

必填范围: 0 <= x <= 1
示例:

1

voice
默认值:af_sky

The voice to use when generating the audio. Voices are model-specific: Kokoro (e.g. af_sky, af_bella, am_adam), Qwen 3 (e.g. Vivian, Serena, Dylan), xAI (eve, ara, rex, sal, leo), 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. Using an incompatible voice returns a 400 error. Call GET /models/{id} to list voices for a specific model.

可用选项:
af_alloy,
af_aoede,
af_bella,
af_heart,
af_jadzia,
af_jessica,
af_kore,
af_nicole,
af_nova,
af_river,
af_sarah,
af_sky,
am_adam,
am_echo,
am_eric,
am_fenrir,
am_liam,
am_michael,
am_onyx,
am_puck,
am_santa,
bf_alice,
bf_emma,
bf_lily,
bm_daniel,
bm_fable,
bm_george,
bm_lewis,
zf_xiaobei,
zf_xiaoni,
zf_xiaoxiao,
zf_xiaoyi,
zm_yunjian,
zm_yunxi,
zm_yunxia,
zm_yunyang,
ff_siwis,
hf_alpha,
hf_beta,
hm_omega,
hm_psi,
if_sara,
im_nicola,
jf_alpha,
jf_gongitsune,
jf_nezumi,
jf_tebukuro,
jm_kumo,
pf_dora,
pm_alex,
pm_santa,
ef_dora,
em_alex,
em_santa,
Vivian,
Serena,
Ono_Anna,
Sohee,
Uncle_Fu,
Dylan,
Eric,
Ryan,
Aiden,
eve,
ara,
rex,
sal,
leo,
Craig,
Ashley,
Olivia,
Sarah,
Elizabeth,
Priya,
Alex,
Edward,
Theodore,
Ronald,
Mark,
Hades,
Luna,
Pixie,
Aurora,
Britney,
Siobhan,
Vicky,
Blade,
Carl,
Cliff,
Richard,
Rico,
tara,
leah,
jess,
mia,
zoe,
dan,
zac,
Rachel,
Aria,
Laura,
Charlotte,
Alice,
Matilda,
Jessica,
Lily,
Roger,
Charlie,
George,
Callum,
River,
Liam,
Will,
Chris,
Brian,
Daniel,
Bill,
WiseWoman,
FriendlyPerson,
InspirationalGirl,
CalmWoman,
LivelyGirl,
LovelyGirl,
SweetGirl,
ExuberantGirl,
DeepVoiceMan,
CasualGuy,
PatientMan,
YoungKnight,
DeterminedMan,
ImposingManner,
ElegantMan,
Achernar,
Achird,
Algenib,
Algieba,
Alnilam,
Aoede,
Autonoe,
Callirrhoe,
Charon,
Despina,
Enceladus,
Erinome,
Fenrir,
Gacrux,
Iapetus,
Kore,
Laomedeia,
Leda,
Orus,
Pulcherrima,
Puck,
Rasalgethi,
Sadachbia,
Sadaltager,
Schedar,
Sulafat,
Umbriel,
Vindemiatrix,
Zephyr,
Zubenelgenubi,
Emma,
Kent,
Eva,
Jack,
Mia,
Maximilian,
Valentina,
Sergio,
Elise,
Leo,
Davi
示例:

"af_sky"

响应

Audio content generated successfully

The response is of type file.