POST
/
uploads
/
audio
/
voice
curl --request POST \
  --url https://api.siliconflow.cn/v1/uploads/audio/voice \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'audio=data:audio/mpeg;base64,aGVsbG93b3JsZA==' \
  --form model=FunAudioLLM/CosyVoice2-0.5B \
  --form customName=your-voice-name \
  --form 'text=在一无所知中, 梦里的一天结束了,一个新的轮回便会开始'
{
  "uri": "speech:your-voice-name:xxx:xxx"
}

Authorizations

Authorization
string
header
required

Use the following format for authentication: Bearer <your api key>

Body

multipart/form-data
model
enum<string>
required

Predefined voice style model name

Available options:
FunAudioLLM/CosyVoice2-0.5B
Example:

"FunAudioLLM/CosyVoice2-0.5B"

customName
string
default:Silicon flow voice style model
required

User-defined voice style name

Example:

"your-voice-name"

text
string
default:在一无所知中, 梦里的一天结束了,一个新的轮回便会开始
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

200
application/json
Successful response
uri
string
Example:

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