{
"code": 200,
"data": {
"callbackType": "complete",
"data": [
{
"audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/f2241ce5bbfef74685124/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"createTime": 1795015950572,
"duration": 13.6,
"id": "f86b9873-da16-48dd-b681-ea0275c3b787",
"image_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/8a41a0df4adde6e5a4aa4/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"model_name": "chirp-goose",
"prompt": "Welcome to today's briefing. The weather is clear and the city is awake.",
"stream_audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/ac0cba5c31adf556a765c/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"tags": "Warm, calm female narrator, slightly smiling, thin and reedy timbre, measured conversational pace",
"title": "Briefing for a Clear Day"
},
{
"audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/d9c9cd4da20ccd19a0171/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"createTime": 1795015950572,
"duration": 17.16,
"id": "9c5e00ff-0b1b-438f-91df-73631d6c8397",
"image_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/e3e1e134fd930efca7eed/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"model_name": "chirp-goose",
"prompt": "Welcome to today's briefing. The weather is clear and the city is awake.",
"stream_audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/c7440c4ff49be6ae4e562/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"tags": "Warm, calm female narrator, slightly smiling, tremulous and quavering, gentle conversational pace",
"title": "Briefing for a Clear Day"
}
],
"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/f2241ce5bbfef74685124/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"createTime": 1795015950572,
"duration": 13.6,
"id": "f86b9873-da16-48dd-b681-ea0275c3b787",
"image_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/8a41a0df4adde6e5a4aa4/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"model_name": "chirp-goose",
"prompt": "Welcome to today's briefing. The weather is clear and the city is awake.",
"stream_audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/ac0cba5c31adf556a765c/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"tags": "Warm, calm female narrator, slightly smiling, thin and reedy timbre, measured conversational pace",
"title": "Briefing for a Clear Day"
},
{
"audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/d9c9cd4da20ccd19a0171/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"createTime": 1795015950572,
"duration": 17.16,
"id": "9c5e00ff-0b1b-438f-91df-73631d6c8397",
"image_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/e3e1e134fd930efca7eed/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"model_name": "chirp-goose",
"prompt": "Welcome to today's briefing. The weather is clear and the city is awake.",
"stream_audio_url": "https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/c7440c4ff49be6ae4e562/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t",
"tags": "Warm, calm female narrator, slightly smiling, tremulous and quavering, gentle conversational pace",
"title": "Briefing for a Clear Day"
}
],
"task_id": "7d3f0a9c41e85b2f6a1c9e04b8d27f53"
},
"msg": "success"
}请求头
请求体
application/json
响应
200
返回任意 2xx 状态码表示已收到;超时(10 秒)或非 2xx 时在 1、5、30 分钟后重试,最多投递 4 次。

