curl --request POST \
--url https://api.dreamto.ai/api/v1/jobs/createTask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "ai-music-api/create-voice",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"task_id": "c2a81e5f09d34b7e8f61a2d4c9b03e75",
"verify_url": "https://example.com/recordings/verify-phrase.mp3",
"voice_name": "我的声音",
"description": "温暖明亮的女中音",
"style": "pop",
"singer_skill_level": "intermediate"
}
}
'
{
"code": 200,
"msg": "success",
"data": {
"taskId": "7d3f0a9c41e85b2f6a1c9e04b8d27f53"
}
}
创建自定义音色
创建自定义音色:创建任务
创建 Suno 任务:model 选择接口,参数放在 input 中,可选 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": "ai-music-api/create-voice",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"task_id": "c2a81e5f09d34b7e8f61a2d4c9b03e75",
"verify_url": "https://example.com/recordings/verify-phrase.mp3",
"voice_name": "我的声音",
"description": "温暖明亮的女中音",
"style": "pop",
"singer_skill_level": "intermediate"
}
}
'
{
"code": 200,
"msg": "success",
"data": {
"taskId": "7d3f0a9c41e85b2f6a1c9e04b8d27f53"
}
}
请求体
application/json
创建任务的请求体。
响应
200 - application/json
HTTP 状态码始终为 200。code 为 200 时创建成功,data.taskId 为任务 ID;其他 code 为错误,msg 为原因,data 为 null。

