{
"code": 200,
"data": {
"callbackType": "complete",
"data": [
{
"audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/c335fac2fdf1e6f2f06da/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"createTime": 1795015717013,
"duration": 43.96,
"id": "d6f3f7e1-081d-4a5f-a172-e2e14769fb45",
"image_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/ab3eeee00828fa2896f71/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"model_name": "chirp-hawk",
"prompt": "[Verse 1]\nKettle starts its little song\nFirst light slips across the floor\nCoffee warms my hands away\nAnd I'm ready for the day\n\n[Chorus]\nGood morning coffee, here we go\nOne sweet sip and the whole world slows\nA little warmth, a little cheer\nThe best part of the morning's here\nGood morning coffee, cheers to today\n\n[Verse]\nSteam curls up from the morning cup\n[Chorus]\nGood morning, coffee, wake me up",
"stream_audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/c50f26b11a40c60660834/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"tags": "Cheerful acoustic folk-pop",
"title": "Good Morning, Coffee Extended"
},
{
"audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/92e5b58537e5a481efea4/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"createTime": 1795015717013,
"duration": 40.84,
"id": "48c10886-0ed2-43ba-82e8-352fbd73c56d",
"image_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/6b34b825bee4b7bd58c8e/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"model_name": "chirp-hawk",
"prompt": "[Verse 1]\nKettle starts its little song\nFirst light slips across the floor\nCoffee warms my hands away\nAnd I'm ready for the day\n\n[Chorus]\nGood morning coffee, here we go\nOne sweet sip and the whole world slows\nA little warmth, a little cheer\nThe best part of the morning's here\nGood morning coffee, cheers to today\n\n[Verse]\nSteam curls up from the morning cup\n[Chorus]\nGood morning, coffee, wake me up",
"stream_audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/174701a887e884f0d3e24/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"tags": "Cheerful acoustic folk-pop",
"title": "Good Morning, Coffee Extended"
}
],
"task_id": "7d3f0a9c41e85b2f6a1c9e04b8d27f53"
},
"msg": "success"
}上传并续写音乐
上传并续写音乐:任务完成回调
创建任务时传了 callBackUrl,任务成功或失败后 DreamTo 向该地址发送此 POST 请求(只发送一次,data.callbackType 固定为 complete)。成功时 code 为 200、data.data 为结果;失败时 code 为失败代码、msg 为原因。用 X-DreamTo-Signature 校验来源,返回任意 2xx 表示已收到。
WEBHOOK
sunoTaskCompleted
{
"code": 200,
"data": {
"callbackType": "complete",
"data": [
{
"audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/c335fac2fdf1e6f2f06da/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"createTime": 1795015717013,
"duration": 43.96,
"id": "d6f3f7e1-081d-4a5f-a172-e2e14769fb45",
"image_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/ab3eeee00828fa2896f71/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"model_name": "chirp-hawk",
"prompt": "[Verse 1]\nKettle starts its little song\nFirst light slips across the floor\nCoffee warms my hands away\nAnd I'm ready for the day\n\n[Chorus]\nGood morning coffee, here we go\nOne sweet sip and the whole world slows\nA little warmth, a little cheer\nThe best part of the morning's here\nGood morning coffee, cheers to today\n\n[Verse]\nSteam curls up from the morning cup\n[Chorus]\nGood morning, coffee, wake me up",
"stream_audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/c50f26b11a40c60660834/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"tags": "Cheerful acoustic folk-pop",
"title": "Good Morning, Coffee Extended"
},
{
"audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/92e5b58537e5a481efea4/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"createTime": 1795015717013,
"duration": 40.84,
"id": "48c10886-0ed2-43ba-82e8-352fbd73c56d",
"image_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/6b34b825bee4b7bd58c8e/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"model_name": "chirp-hawk",
"prompt": "[Verse 1]\nKettle starts its little song\nFirst light slips across the floor\nCoffee warms my hands away\nAnd I'm ready for the day\n\n[Chorus]\nGood morning coffee, here we go\nOne sweet sip and the whole world slows\nA little warmth, a little cheer\nThe best part of the morning's here\nGood morning coffee, cheers to today\n\n[Verse]\nSteam curls up from the morning cup\n[Chorus]\nGood morning, coffee, wake me up",
"stream_audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/174701a887e884f0d3e24/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"tags": "Cheerful acoustic folk-pop",
"title": "Good Morning, Coffee Extended"
}
],
"task_id": "7d3f0a9c41e85b2f6a1c9e04b8d27f53"
},
"msg": "success"
}请求头
请求体
application/json
响应
200
返回任意 2xx 状态码表示已收到;超时(10 秒)或非 2xx 时在 1、5、30 分钟后重试,最多投递 4 次。

