UnderSky 文档

文字转语音 API

兔子 API 文字转语音接口的完整接入说明,包含支持模型、音色、音频格式、语速、认证方式、计费规则和二进制音频响应。

POST https://api.undersky.ai/v1/audio/speech

支持模型:tts-1、tts-1-hd、tts-1-1106、tts-1-hd-1106。

curl https://api.undersky.ai/v1/audio/speech \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"tts-1","input":"Hello","voice":"alloy","response_format":"mp3"}' \
  --output speech.mp3

价格按输入字符计费:tts-1 为 $12/百万字符,tts-1-hd 为 $24/百万字符,tts-1-1106 为 $300/百万字符,tts-1-hd-1106 为 $600/百万字符。