Documentation Index
Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
Use this file to discover all available pages before exploring further.
SUNO 允许我们获取音乐的wav格式文件,本文档讲解相关 API 的对接方法。
该 API 核心输入参数是 audio_id,它是官方生成的歌曲ID;可选还支持 callback_url 异步回调地址。
这里我们输入的 audio_id 是 ec13e502-d043-4eb2-92ee-e900c6da69d1。
import requests
url = "https://api.acedata.cloud/suno/wav"
headers = {
"accept": "application/json",
"authorization": "Bearer aa287fa4cc54401087a9fab3f99630af",
"content-type": "application/json"
}
payload = {
"audio_id": "ec13e502-d043-4eb2-92ee-e900c6da69d1"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
结果如下:
{
"success": true,
"task_id": "19787138-49e9-413a-8611-156c375aa99f",
"trace_id": "ec232cf9-8b75-42df-a8a3-fe6d7d6fd02e",
"data": [
{
"file_url": "https://cdn1.suno.ai/ec13e502-d043-4eb2-92ee-e900c6da69d1.wav"
}
]
}
可以看到,data 的 file_url 字段是获取的音乐的wav格式的文件,它是一个可以公开访问的 CDN 地址,支持 mp3 后缀。