Skip to main content
POST
/
uploads
/
audio
/
voice
curl -X POST "https://api.siliconflow.cn/v1/uploads/audio/voice" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "[email protected]" \
-F "model=IndexTeam/IndexTTS-2" \
-F "customName=your-voice-name" \
-F "text=慢工出细活,再给我两分钟,你马上就能见识到超梦分析的厉害了"
{
  "uri": "speech:your-voice-name:xxx:xxx"
}

Authorizations

Authorization
string
header
required

Use the following format for authentication: Bearer

Body

multipart/form-data
model
string
required

Predefined voice style model name

Example:

"FunAudioLLM/CosyVoice2-0.5B"

customName
string
required

User-defined voice style name

Example:

"your-voice-name"

text
string
required

Corresponding text content for the audio

Example:

"在一无所知中, 梦里的一天结束了,一个新的轮回便会开始"

audio
string

Audio file encoded in base64 with the header format of data:audio/mpeg;base64

Example:

"data:audio/mpeg;base64,aGVsbG93b3JsZA=="

Response

Successful response

uri
string
Example:

"speech:your-voice-name:xxx:xxx"