curl --request POST \
--url https://api.dreamto.ai/api/v1/jobs/createTask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs/tts-turbo-2-5",
"input": {
"text": "Welcome to DreamTo, one API for the top AI models from around the world.",
"voice": "pFZP5JQG7iQjIQuC4Bku",
"stability": 0.5,
"similarity_boost": 0.75,
"style": 0,
"speed": 1,
"language_code": "en"
}
}
'
{
"code": 200,
"msg": "success",
"data": {
"taskId": "7d3f0a9c41e85b2f6a1c9e04b8d27f53"
}
}
ElevenLabs Turbo v2.5
创建任务
创建 ElevenLabs Turbo v2.5 语音任务:input.text 传入要朗读的文本,input.voice 指定音色,可选 callBackUrl 接收完成回调。成功后返回 data.taskId,任务在后台异步执行,用查询任务接口轮询结果。所有响应的 HTTP 状态码都是 200,以 code 判断结果。
POST
/
api
/
v1
/
jobs
/
createTask
curl --request POST \
--url https://api.dreamto.ai/api/v1/jobs/createTask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs/tts-turbo-2-5",
"input": {
"text": "Welcome to DreamTo, one API for the top AI models from around the world.",
"voice": "pFZP5JQG7iQjIQuC4Bku",
"stability": 0.5,
"similarity_boost": 0.75,
"style": 0,
"speed": 1,
"language_code": "en"
}
}
'
{
"code": 200,
"msg": "success",
"data": {
"taskId": "7d3f0a9c41e85b2f6a1c9e04b8d27f53"
}
}
请求体
application/json
创建任务的请求体。
响应
200 - application/json
HTTP 状态码始终为 200。code 为 200 时创建成功,data.taskId 为任务 ID;其他 code 为错误,msg 为原因,data 为 null。

