Suno 上傳參考音訊 API 串接說明
SUNO 允許我們上傳參考音訊進行二次創作,本文檔講解相關 API 的串接方法。
一般上傳只需要 audio_url,它是一個可以公開存取的音訊 CDN 位址。mode 預設為 standard,因此現有呼叫無需修改。一般上傳成功消耗 0.06 Credits;上傳失敗不扣費。
這裡我們輸入的 audio_url 是 https://cdn.acedata.cloud/suno_demo.mp3,是一個可以公開存取的 CDN 位址。
curl -X POST 'https://api.01ai.cloud/suno/upload' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"audio_url": "https://cdn.acedata.cloud/suno_demo.mp3"
}'
結果如下:
{
"success": true,
"task_id": "058f8450-3df4-4f8b-8b64-ebc2e59ed3bc",
"data": {
"audio_id": "00135f7d-cda1-4d70-b007-779f07143586",
"lyric": "[Intro]\nHa-ha-ha-ha-ha-ha\n[Verse 1]\nCandy skies are dripping blue\nStuck in world of chewed up glue\nThe sun's a lollipop melting slow\nDripped in sugar on the ground below\nOh-oh\n[Chorus]\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nCandy chaos in disguise\n[Verse 2]\nJellybean mountains crumble fast\nRainbows made of soda blast\nEvery step's a gummy bear trap\nMy sugar rush is taking a nap\nOh-oh\n[Bridge]\nChew it up (ha-ha-ha-ha)\nSpit it out (ha-ha-ha-ha)\nRound and round (ha-ha-ha-ha)\nWithout a doubt (ha-ha-ha-ha)\n[Chorus]\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\n[Outro]\nCotton candy clouds collapse\nChocolate rivers running laps\nEverywhere's a sugar flood\nMy shoes are drowning caramel\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise",
"style": "Upbeat bubblegum pop track with a high-energy electronic production style. The song features a bright, processed female vocal with a youthful and energetic tone, often layered with harmonies and occasional pitch-shifted ad-libs. The instrumentation is dominated by bouncy, staccato synthesizer chords, a driving four-on-the-floor electronic drum beat with crisp claps on the backbeat, and a prominent, melodic bassline. The tempo is approximately 128 BPM in a major key, utilizing a standard pop chord progression of I-V-vi-IV. Production elements include heavy use of sidechain compression, vocal chops, and shimmering sound effects that contribute to a sugary, hyper-pop aesthetic. The structure follows a verse-chorus-verse-chorus-bridge-chorus format with a high-energy build-up leading into the explosive, hook-driven choruses.",
"image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-001",
"image_large_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-002",
"audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
"title": "up-d6c3970d-6db1-41e3-b966-90539c93678a",
"duration": 131.16
}
}
可以看到,data 始終是物件,audio_id 是上傳後的歌曲 ID。lyric、style、duration、標題和媒體 URL 等分析結果為可選欄位,具體以回傳內容為準。
上傳結果提供封面時,image_url 和 image_large_url 分別回傳一般封面和高畫質封面的原始位址。
有了歌曲 ID 之後,可以透過 Suno Audios Generation API 呼叫 upload_extend、upload_cover 或區間取樣等需要 audio_id 的操作。若要透過 Inspo 靈感創作功能,根據 1 到 4 段完整參考音訊創作新音樂,請直接呼叫 action=inspo 並傳入原始公開音訊 URL 清單;服務會自動完成上傳和分析,無需用戶端組裝音訊 metadata。
¶ 為私有音色上傳翻唱原曲
使用 /suno/voices 建立的私有聲音翻唱時,在一般上傳請求中傳入該聲音的 persona_id,將原曲與聲音關聯:
{
"audio_url": "https://cdn.acedata.cloud/suno_demo.mp3",
"mode": "standard",
"persona_id": "<聲音建立介面回傳的 persona_id>"
}
上傳成功後,使用回傳的 data.audio_id 呼叫 /suno/audios,設定 action: "upload_cover" 並傳入相同的 persona_id。不要繼續使用此前未與該聲音關聯的音訊 ID。
persona_id 僅支援一般上傳,不能與 mode: "enhanced" 同時使用。無需額外指定 vocal_gender;性別偏好不能取代聲音 ID。建立聲音、上傳原曲和翻唱須使用相同的服務通道。
¶ 增強上傳模式
audio_url是輸入位址,會直接交給音訊處理流程,不會由終態媒體持久化服務預先轉存。請確保它在任務處理期間可公開存取。
當一般上傳無法處理您擁有或已獲授權使用的音訊時,可以設定 mode 為 enhanced。該模式還必須提供 1 至 100 個字元的 name,並使用公開可存取的 HTTPS audio_url。
增強上傳固定採用非同步處理,通常需要 2 分鐘或更長時間。成功處理消耗 1.87 Credits;處理失敗不扣費。
curl -X POST 'https://api.01ai.cloud/suno/upload' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"audio_url": "https://cdn.acedata.cloud/suno_demo.mp3",
"mode": "enhanced",
"name": "My Song"
}'
介面會立即返回 task_id 和 trace_id。使用 Suno Tasks API 查詢任務,成功後從 response.data.audio_id 讀取上傳後的音訊 ID。也可以提供 HTTPS callback_url 接收終態。
增強上傳取得的 audio_id 可用於 Cover、Samples 和 Mashup。伴奏與 MIDI 擷取、全軌分離以及人聲/伴奏分離仍可能受音訊所屬帳號限制;未列出的操作不保證支援跨帳號使用。音訊越短,處理成功率通常越高。

