Authorization: Bearer ********************
{
"model": "gemini-2.5-flash-preview-tts",
"input": "您好,我是v-api TTS小助理,感谢体验我们的API服务!",
"voice": "leda",
"response_format": "mp3"
}
curl --location --request POST 'https://vir.vimsai.com/v1/audio/speech' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gemini-2.5-flash-preview-tts",
"input": "您好,我是v-api TTS小助理,感谢体验我们的API服务!",
"voice": "leda",
"response_format": "mp3"
}'
// 直接返回音频文件 xxx.wav
// 在响应header中同时会存储一份usage。格式 X-Usage: "{"prompt_tokens": 115, "completion_tokens": 500, "total_tokens": 615}"