الانتقال إلى المحتوى الرئيسي
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.