Suno 歌曲生成 API 對接說明

隨著 AI 的應用變廣,各類 AI 程式已逐漸普及。AI 已逐漸深入到人們的工作生活方方面面。而 AI 涉及的行業也越來越多,從最初的寫作,到醫療教育,再到現在的音樂。

Suno 是一個專業高品質的 AI 歌曲和音樂創作平台,使用者只需輸入簡單的文字提示詞,即可根據流派風格和歌詞生成帶有人聲的歌曲。該 AI 音樂生成器由來自 Meta、TikTok、Kensho 等知名科技公司的團隊成員開發,目標是不需要任何樂器工具,讓所有人都可以創造美妙的音樂。

失敗結果與重試

錯誤物件可能包含可選的布林欄位 error.retryable。只有當它為 true 時,才表示此次失敗允許使用相同參數稍後重新請求,例如明確未受理的暫時限流或服務容量不足。建議使用退避間隔並限制重試次數。重試成功的請求按正常規則計費。

retryable: false 表示不應原樣重試。欄位缺失時,不要僅根據 HTTP 500、busy 或錯誤文字自動重發。缺少參數、素材格式或時長不符、內容審核及失效資源應先修正。提交逾時、連線中斷、已受理任務的輪詢或媒體交付失敗,應優先使用原 task_id 查詢任務;重新提交可能建立新的歌曲。該標記描述的是原公開操作,不是某個內部處理步驟。

以下是模型更新的進度:

版本 model 上線時間 lyric 限制 style 限制 歌曲最長時長
v6 chirp-v6 2026.09.09 — — —
v6 Wild chirp-v6-wild 2026.09.09 — — —
v6 Mini chirp-v6-mini 2026.09.09 — — —
v5.5 chirp-v5-5 2026.03.27 5000 1000 8 分鐘
v5 chirp-v5 2025.09.23 5000 1000 8 分鐘
v4.5+ chirp-v4-5-plus 2025.07.17 5000 1000 8 分鐘
v4.5 chirp-v4-5 2025.05.03 5000 1000 4 分鐘
v4 chirp-v4 2024.12.17 3000 200 150 秒
v3.5 chirp-v3-5 --- 3000 200 120 秒

上表的 lyric 與 style 限制為自訂模式(custom 為 true)下的上限。非自訂的靈感模式(custom 為 false)只填 prompt,其長度上限為 500 字元(各模型一致)。

Suno 現已支援 chirp-v6、chirp-v6-wild 和 chirp-v6-mini。推薦使用 chirp-v6;舊模型名稱繼續相容。

然而 Suno 官方並沒有提供 API,AI 聚合提供了一套 Suno 的 API,模擬對接了 Suno 官方,可以方便快捷地生成想要的音樂。

準備歌曲請求

登入應用程式列表,開啟通用應用程式並複製 API KEY。在 Suno 歌曲除錯頁面可以直接選擇應用程式;在自己的程式碼裡將複製的值填入 Authorization: Bearer {token}。使用受限金鑰提交非同步歌曲時,還需要開放任務查詢介面。

基本使用

第一次可以用靈感模式生成歌曲。在 prompt 中填入 a song for Christmas,保留預設的 action: "generate" 和 custom: false。同步回應中的 data[].audio_url 可直接試聽;非同步提交時,儲存 task_id 並用歌曲任務查詢取得結果。

可以看到這裡我們設定了 Request Headers,包括:

  • accept:想要接收什麼格式的回應結果,這裡填寫為 application/json,即 JSON 格式。
  • authorization:呼叫 API 的金鑰,申請之後可以直接下拉選擇。

另外設定了 Request Body,包括:

  • action:音訊任務類型,預設是 generate。支援生成、續寫、翻唱、拼接、分軌、新增音軌、擷取指定音軌、生成音效和調整速度等操作,統一透過 POST /suno/audios 呼叫。
  • prompt:Suno 官方的靈感模式提示詞(custom 為 false 時生效),最多 500 個字元。
  • model:此次音樂生成任務的模型。v6 系列包含 chirp-v6、chirp-v6-wild 和 chirp-v6-mini;舊模型名稱繼續相容。
  • max_mode:增強生成模式。generate 僅在 custom 與 max_mode 均為 true 時啟用,費用為 1.12 Credits;add_stem 可直接啟用,費用為 1.344 Credits。關閉或省略時分別為 0.56 和 0.672 Credits。
  • variety:生成結果的多樣性強度,可選 off、normal、high、extra、max。僅用於 generate 和 add_stem,其他 action 傳入會回傳 400。
  • lyric:Suno 官方的自訂模式的歌詞內容。chirp-v3-5 與 chirp-v4 最多 3000 個字元;chirp-v4-5 及以上(含 chirp-v5、chirp-v5-5)最多 5000 個字元。
  • custom:是否採用自訂模式,預設是: false。
  • instrumental:Suno 官方的靈感模式的純音樂選項。
  • title:Suno 官方的自訂模式的音樂標題。chirp-v3-5、chirp-v4 最多 80 個字元;chirp-v4-5 及以上最多 100 個字元。
  • style:Suno 官方的自訂模式音樂風格。chirp-v3-5 與 chirp-v4 最多 200 個字元;chirp-v4-5 及以上(含 chirp-v5、chirp-v5-5)最多 1000 個字元。
  • negative_tags:自訂生成時希望排除的音樂風格或流派,也可用於 replace_section。本介面目前未對該欄位設定固定字元數上限;過長內容仍可能無法處理,建議保持描述精簡。
  • audio_weight:音訊或聲音特徵的影響權重,範圍 0-1,0 也是有效值。可用於生成、續寫、翻唱、新增音軌和聲音一致性等操作;沒有參考音訊或聲音特徵時,模型可能弱化或忽略該值。
  • audio_id:參考音樂的 ID,用於翻唱、續寫、分軌等後續操作。音訊檔案仍可下載,不代表該 ID 的後續處理始終可用;若回傳 suno_processing_unavailable,請保留 task_id 和 trace_id 聯絡支援。
  • overpainting_start/overpainting_end:為既有純音樂補充人聲的起訖時間,單位為秒。
  • underpainting_start/underpainting_end:為清唱加伴奏的起訖時間,單位為秒。
  • persona_id:透過 Persona 或聲音建立介面取得的聲音 ID,不是歌曲的 audio_id。
  • continue_at:續寫邊界,單位為秒。例如,213.5 表示從第 3 分 33.5 秒處開始生成後續片段。lyric 和 style 只引導邊界之後的新內容,不會取代來源音訊中邊界之前的歌詞或演唱。
  • style_influence:自訂模式下的風格影響力,範圍 0-1,越大通常越貼合所選風格;0 會作為有效值傳遞。
  • replace_section_end:替換片段的最終時間。
  • replace_section_start:替換片段的起始時間。
  • vocal_gender:控制男女聲偏好,女聲 f,男聲 m,4.5 及以上模型有效;為偏好項目,不保證嚴格遵循。
  • weirdness:自訂模式下的怪異度,範圍 0-1,越大通常越具創意和實驗性;0 會作為有效值傳遞。
  • duration:期望的歌曲時長,單位為秒,需為整數,取值範圍 10 到 360。目前僅 generate 使用該參數,具體效果取決於模式和模型。它是一個傾向性提示而非硬性限制:模型會參考它,但不保證達到,實際成品時長以回應中的 duration 欄位為準,通常短於期望值。

聲音 ID 的適用範圍

generate、cover、upload_cover、artist_consistency、artist_consistency_vox 可以使用 persona_id。後兩個 action 必須提供 persona_id;也可以同時提供建立該 Persona 時所用歌曲的 audio_id。

extend、upload_extend 不使用額外的 persona_id。mashup、inspo 是否支援聲音 ID 取決於所選服務通道;其他 action 不保證套用該欄位,請依各操作說明使用。vocal_gender 是可選的性別偏好,不能取代聲音 ID。

後續創作操作需要有效的來源 audio_id;mashup 需要至少兩個 mashup_audio_ids。缺少必要來源或時間參數時會回傳 HTTP 400。

進階參數適用範圍

參數 取值 支援的 action 說明
weirdness 0-1 可選 調節實驗性,0 是有效值;效果取決於操作、模式和模型
style_influence 0-1 可選 調節風格遵循傾向,0 是有效值;效果取決於操作、模式和模型
audio_weight 0-1 可選 調節音訊或聲音特徵的影響;無參考資訊時可能被模型忽略
variety off / normal / high / extra / max generate、add_stem 調節結果間的風格多樣性
max_mode boolean generate(要求 custom=true)、add_stem 增強一致性並按增強模式計費
vocal_gender f / m 支援人聲控制的生成操作 偏好項,不保證嚴格遵循
duration 整數 10-360 generate 預期時長;其他 action 目前不使用該欄位,實際長度以結果為準

平台會驗證參數類型和數值範圍,但不會僅因 action 不同而拒絕這些可選調節項;具體效果由操作、模式和模型決定。

  • lyric_prompt:生成歌詞的 prompt,當且僅當 custom 為 true 並且未傳入 lyric 時生效。
  • callback_url:需要回呼結果的 URL。
  • async:可選,設為 true 時 API 立即回傳 task_id,無需提供 callback_url,隨後透過對應的任務查詢 API 輪詢取得結果。

生成的程式碼如下:

可以點擊「Try」按鈕直接測試 API,稍等 1-2 分鐘,結果如下:

{
  "success": true,
  "task_id": "e72fb249-bd5b-4e2a-b20c-8a06fea5ac14",
  "trace_id": "7dbc5b6a-b2c0-4d85-9d39-fa8a8a785ccf",
  "data": [
    {
      "id": "b481b17a-bf50-4e10-8adc-4d5635050893",
      "title": "Under the Mistletoe",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-001",
      "lyric": "[Verse]\nSnowflakes falling on the ground\nTwinkling lights all around\nThe scent of pine fills the air\nChristmas magic everywhere\n[Chorus]\nUnder the mistletoe tonight\nHearts aglow in the soft moonlight\nLaughter echoes\nSpirits bright\nIt’s Christmas time\nIt feels so right\n[Verse 2]\nStockings hung by the fire’s glow\nWarmth inside while the cold winds blow\nCookies baking\nSweet delight\nA season of joy shining bright\n[Chorus]\nUnder the mistletoe tonight\nHearts aglow in the soft moonlight\nLaughter echoes\nSpirits bright\nIt’s Christmas time\nIt feels so right\n[Bridge]\nCarols sung by candlelight\nStars above make the world feel tight\nPeace and love\nA season’s creed\nFilling hearts with all we need\n[Chorus]\nUnder the mistletoe tonight\nHearts aglow in the soft moonlight\nLaughter echoes\nSpirits bright\nIt’s Christmas time\nIt feels so right",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-17T15:59:32.468Z",
      "model": "chirp-auk",
      "state": "succeeded",
      "prompt": "A song for Christmas",
      "style": "holiday, cheerful, male vocals",
      "duration": 154.92
    },
    {
      "id": "fbf22dab-5e2b-4e02-84c0-6d7605f14c3d",
      "title": "Under the Mistletoe",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-002",
      "lyric": "[Verse]\nSnowflakes falling on the ground\nTwinkling lights all around\nThe scent of pine fills the air\nChristmas magic everywhere\n[Chorus]\nUnder the mistletoe tonight\nHearts aglow in the soft moonlight\nLaughter echoes\nSpirits bright\nIt’s Christmas time\nIt feels so right\n[Verse 2]\nStockings hung by the fire’s glow\nWarmth inside while the cold winds blow\nCookies baking\nSweet delight\nA season of joy shining bright\n[Chorus]\nUnder the mistletoe tonight\nHearts aglow in the soft moonlight\nLaughter echoes\nSpirits bright\nIt’s Christmas time\nIt feels so right\n[Bridge]\nCarols sung by candlelight\nStars above make the world feel tight\nPeace and love\nA season’s creed\nFilling hearts with all we need\n[Chorus]\nUnder the mistletoe tonight\nHearts aglow in the soft moonlight\nLaughter echoes\nSpirits bright\nIt’s Christmas time\nIt feels so right",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-17T15:59:32.468Z",
      "model": "chirp-auk",
      "state": "succeeded",
      "prompt": "A song for Christmas",
      "style": "holiday, cheerful, male vocals",
      "duration": 158.48
    }
  ]
}

可以看到這時候我們就得到了兩首歌的內容,包括標題、預覽圖、歌詞、音訊、影片等內容。

欄位說明如下:

  • success:生成是否成功,如果成功則為 true,否則為 false
  • data:是一個列表,包含了生成的歌曲的詳細資訊。
    • state:歌曲生成狀態,主要包含四種,具體如下:
      • succeeded:生成成功
      • pending:佇列中
      • running:執行中
      • error:失敗
    • id:歌曲 ID
    • title:歌曲的標題
    • image_url:歌曲的原始封面圖片 URL,可直接用於展示。
    • image_large_url:歌曲的高清原始封面 URL,有高清圖時回傳。需要長期保留封面時,請自行下載保存。
    • lyric:歌曲的歌詞
    • audio_url:歌曲的最終音訊位址。平台會優先回傳 AI 聚合 CDN 位址;若持久化儲存失敗,可能回傳原始媒體位址,請及時下載。
    • video_url:歌曲的影片檔案,開啟後就是一個 mp4 影片。
    • created_at:建立的時間
    • model:使用的模型,一般是最新的 v3 模型
    • style:風格

自訂生成

如果想自訂生成歌詞,可以輸入歌詞:

這時候 lyric 欄位可以傳入類似如下內容:

[Verse]\nSnowflakes falling all around\nGlistening white\nCovering the ground\nChildren laughing\nFull of delight\nIn this winter wonderland tonight\nSanta's sleigh\nUp in the sky\nRudolph's nose shining bright\nOh my\nHear the jingle bells\nRinging so clear\nBringing joy and holiday cheer\n[Verse 2]\nRoasting chestnuts by the fire's glow\nChristmas lights\nThey twinkle and show\nFamilies gathering with love and cheer\nSpreading warmth to everyone near

注意,這裡的歌詞中 \n 是換行符號,如果你不知道如何生成歌詞,可以使用 AI 聚合提供的歌詞生成 API 來透過 prompt 生成歌詞,API 是 Suno 歌詞生成 API。

接下來我們要根據歌詞、標題、風格自訂生成歌曲,就可以指定如下內容:

  • lyric:歌詞文字
  • custom:填寫為 true,代表自訂生成,該參數預設為 false,代表使用 prompt 生成。
  • title:歌曲的標題。
  • style:歌曲的風格,選填。

填寫範例如下:

填寫完畢之後自動生成了程式碼如下:

對應的程式碼:

curl -X POST 'https://api.yxai-tech.top/suno/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "action": "generate",
  "prompt": "A song for Christmas",
  "model": "chirp-v4-5",
  "lyric": "[Verse]\\nSnowflakes falling all around\\nGlistening white\\nCovering the ground\\nChildren laughing\\nFull of delight\\nIn this winter wonderland tonight\\nSanta's sleigh\\nUp in the sky\\nRudolph's nose shining bright\\nOh my\\nHear the jingle bells\\nRinging so clear\\nBringing joy and holiday cheer\\n[Verse 2]\\nRoasting chestnuts by the fire's glow\\nChristmas lights\\nThey twinkle and show\\nFamilies gathering with love and cheer\\nSpreading warmth to everyone near",
  "custom": true
}'

測試允許,生成的效果是類似的。

自訂歌手風格生成功能

如果想使用歌手風格來生成歌曲的話,首先透過上文的基本使用生成一首歌曲, 最後得到了需要設定這首歌曲為歌手風格,然後需要進入Suno Persona API根據官方生成的音樂 ID audio_id 來生成一個歌手風格的 id 參數 persona_id,具體的參數如下圖所示:

填寫完畢之後自動生成了程式碼如下:

對應的 Python 程式碼:

import requests

url = "https://api.yxai-tech.top/suno/persona"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "audio_id": "97efc9f4-0e8d-4b3e-88df-14568fa1b11f",
    "name": "test"
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

點擊執行,可以發現會得到一個結果,如下:

{
  "success": true,
  "task_id": "7628b754-4fe7-4e79-bda4-806d0dd8bf6e",
  "data": {
    "persona_id": "e0d7319e-aa2a-44cb-b00a-916218d7cb0b"
  }
}

我們以上面的 audio_id 和 persona_id 分別為 97efc9f4-0e8d-4b3e-88df-14568fa1b11f、e0d7319e-aa2a-44cb-b00a-916218d7cb0b 為此次的範例資料。 然後可以將參數 action 設定為 artist_consistency(如果是新版的歌手風格 Persona-v2-vox,action 必須設定為 artist_consistency_vox),並且輸入需要繼續生成歌曲的 ID、歌手風格 ID,填寫範例如下:

填寫完畢之後自動生成了程式碼如下:

對應的 Python 程式碼:

import requests

url = "https://api.yxai-tech.top/suno/audios"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "action": "artist_consistency",
    "prompt": "A song for Christmas",
    "model": "chirp-v4-5",
    "persona_id": "e0d7319e-aa2a-44cb-b00a-916218d7cb0b",
    "audio_id": "97efc9f4-0e8d-4b3e-88df-14568fa1b11f"
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

點擊執行,可以發現會得到一個結果,如下:

{
  "success": true,
  "task_id": "9b732b1a-bd67-48bc-95e4-90140e06836f",
  "trace_id": "30fcd88e-7687-4137-92d7-913b58115204",
  "data": [
    {
      "id": "727a36e2-8dce-4df7-99e5-14e44635c80f",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-003",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-17T16:27:33.979Z",
      "model": "chirp-auk",
      "state": "succeeded",
      "style": "",
      "duration": 244.4
    },
    {
      "id": "3b33301a-b17e-4b25-8842-09b46dab1a36",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-004",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-17T16:27:33.979Z",
      "model": "chirp-auk",
      "state": "succeeded",
      "style": "",
      "duration": 229.88
    }
  ]
}

可以看出,結果內容與上文的是一致的,這也就實現使用歌手風格來生成歌曲的功能。

繼續生成功能

如果想對已經生成的 Suno 歌曲進行繼續生成的話,可以將參數 action 設定為 extend ,並且輸入需要繼續生成歌曲的 ID,歌曲 ID 的取得是根據基本使用來取得,透過上文可知,這時候可以看到歌曲的 ID 為:

"id": "97efc9f4-0e8d-4b3e-88df-14568fa1b11f"

注意,這裡的歌詞中 id 是生成後歌曲的 ID,如果你不知道如何生成歌曲,可以參考上文的基本使用來生成歌曲。

如果想對自己上傳的歌曲進行繼續生成的話,可以將參數 action 設定為 upload_extend ,並且輸入需要繼續生成自訂上傳的歌曲 ID,歌曲 ID 的取得是使用 Suno Upload Generation API來取得,如下圖所示:

接下來必須填寫續寫片段的歌詞,並可以指定風格:

  • lyric:只用於引導 continue_at 之後新生成片段的歌詞,不會取代來源音訊中該時間點之前的歌詞。
  • custom:填寫為 true,代表自訂生成,該參數預設為 false,代表使用 prompt 生成。
  • style:續寫片段的歌曲風格,選填。
  • continue_at:續寫邊界,單位為秒。例如,213.5 表示從第 3 分 33.5 秒處開始生成後續片段。

extend 和 upload_extend 的 continue_at 必須大於 0,支援小數秒,例如 30.792;提交時不會取整數。

extend 用於接著現有歌曲往後創作,不是為整首歌曲換詞。若希望整首歌曲從頭使用新歌詞,請使用 generate 重新生成;若希望參考現有歌曲重新演繹,可使用 cover。傳入一整首新歌詞時,continue_at 之前的原歌詞仍不會被取代。

填寫範例如下:

填寫完畢之後自動生成了程式碼如下:

下面保留的是一次真實歷史呼叫快照,其中 continue_at 為 2 秒,因此只有前 2 秒屬於續寫邊界之前的原內容。實際接近歌曲結尾續寫時,應將該值設為期望開始續寫的秒數,並僅在 lyric 中提供邊界之後要唱的新段落。

對應的 Python 程式碼:

import requests

url = "https://api.yxai-tech.top/suno/audios"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "action": "extend",
    "prompt": "A song for Christmas",
    "model": "chirp-v4-5",
    "audio_id": "97efc9f4-0e8d-4b3e-88df-14568fa1b11f",
    "continue_at": 2,
    "lyric": "[Verse]\\nSnowflakes falling all around\\nGlistening white\\nCovering the ground\\nChildren laughing\\nFull of delight\\nIn this winter wonderland tonight\\nSanta's sleigh\\nUp in the sky\\nRudolph's nose shining bright\\nOh my\\nHear the jingle bells\\nRinging so clear\\nBringing joy and holiday cheer\\n[Verse 2]\\nRoasting chestnuts by the fire's glow\\nChristmas lights\\nThey twinkle and show\\nFamilies gathering with love and cheer\\nSpreading warmth to everyone near",
    "custom": True,
    "instrumental": False
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

點擊執行,可以發現會得到一個結果,如下:

{
  "success": true,
  "task_id": "75b835d9-30d1-4641-8524-0aeedbdc9e1a",
  "trace_id": "44c41045-a2e1-4d19-aafc-7abd239d0d5c",
  "data": [
    {
      "id": "0a1e1b10-c36a-41c9-9bfb-b26d9d25db98",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-005",
      "lyric": "[Verse]\\nSnowflakes falling all around\\nGlistening white\\nCovering the ground\\nChildren laughing\\nFull of delight\\nIn this winter wonderland tonight\\nSanta's sleigh\\nUp in the sky\\nRudolph's nose shining bright\\nOh my\\nHear the jingle bells\\nRinging so clear\\nBringing joy and holiday cheer\\n[Verse 2]\\nRoasting chestnuts by the fire's glow\\nChristmas lights\\nThey twinkle and show\\nFamilies gathering with love and cheer\\nSpreading warmth to everyone near",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-17T16:38:35.509Z",
      "model": "chirp-auk",
      "state": "succeeded",
      "style": "",
      "duration": 165.92
    },
    {
      "id": "4334c5b4-0a44-4b26-a8f6-66cc4dbb8fc3",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-006",
      "lyric": "[Verse]\\nSnowflakes falling all around\\nGlistening white\\nCovering the ground\\nChildren laughing\\nFull of delight\\nIn this winter wonderland tonight\\nSanta's sleigh\\nUp in the sky\\nRudolph's nose shining bright\\nOh my\\nHear the jingle bells\\nRinging so clear\\nBringing joy and holiday cheer\\n[Verse 2]\\nRoasting chestnuts by the fire's glow\\nChristmas lights\\nThey twinkle and show\\nFamilies gathering with love and cheer\\nSpreading warmth to everyone near",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-17T16:38:35.509Z",
      "model": "chirp-auk",
      "state": "succeeded",
      "style": "",
      "duration": 158.84
    }
  ]
}

可以看出,結果中 lyric 會傳回此次續寫任務使用的歌詞文字。該欄位不是完整成品音訊的逐字轉寫;對於 extend,continue_at 之前的來源音訊仍使用原歌詞,新歌詞只用於引導續寫片段。

取得完整歌曲

目前模型的 extend 結果通常已包含 continue_at 之前的來源音訊和邊界之後的新內容,請先根據回傳音訊的實際時長與內容判斷是否已經是完整歌曲。若回傳的是獨立續寫片段,或者需要將多次續寫歷史明確合併為一首歌,再使用拼接功能:

  • action:內容為 concat。
  • audio_id:最後一個續寫片段的 ID。

例如擴展後的歌曲 ID 是:0a1e1b10-c36a-41c9-9bfb-b26d9d25db98,那麼可以設定參數如下:

{
  "action": "concat",
  "audio_id": "0a1e1b10-c36a-41c9-9bfb-b26d9d25db98"
}

其他參數不變,回傳的就是一首完整的歌曲,也就是所有歌曲片段的拼接結果,但結果只有一首歌,範例如下:

{
  "success": true,
  "task_id": "0f794915-8418-4124-93f5-b7eb3a417167",
  "trace_id": "62afcce0-e7e5-44b8-8c2e-4bba12a4f414",
  "data": [
    {
      "id": "0efec7e0-11bf-4313-9981-2c0e7218d7dd",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-007",
      "lyric": "[Verse]\\nSnowflakes falling all around\\nGlistening white\\nCovering the ground\\nChildren laughing\\nFull of delight\\nIn this winter wonderland tonight\\nSanta's sleigh\\nUp in the sky\\nRudolph's nose shining bright\\nOh my\\nHear the jingle bells\\nRinging so clear\\nBringing joy and holiday cheer\\n[Verse 2]\\nRoasting chestnuts by the fire's glow\\nChristmas lights\\nThey twinkle and show\\nFamilies gathering with love and cheer\\nSpreading warmth to everyone near\n[Verse]\\nSnowflakes falling all around\\nGlistening white\\nCovering the ground\\nChildren laughing\\nFull of delight\\nIn this winter wonderland tonight\\nSanta's sleigh\\nUp in the sky\\nRudolph's nose shining bright\\nOh my\\nHear the jingle bells\\nRinging so clear\\nBringing joy and holiday cheer\\n[Verse 2]\\nRoasting chestnuts by the fire's glow\\nChristmas lights\\nThey twinkle and show\\nFamilies gathering with love and cheer\\nSpreading warmth to everyone near",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-17T16:43:06.718Z",
      "model": "chirp-auk",
      "state": "succeeded",
      "style": "",
      "duration": 167.91997916666668,
      "concat_history": [
        {
          "continue_at": 2,
          "id": "97efc9f4-0e8d-4b3e-88df-14568fa1b11f",
          "infill": false,
          "source": "web",
          "type": "gen"
        },
        {
          "id": "0a1e1b10-c36a-41c9-9bfb-b26d9d25db98"
        }
      ]
    }
  ]
}

音樂翻版

當基於原有的歌曲繼續生成歌曲之後,回傳的歌曲風格可能不太合適。如果要對原先生成的歌曲(若是自訂上傳的音樂也支援)進行翻版,需要使用音樂翻版方法,就可以指定如下內容:

  • action:內容為 cover,當是對自訂上傳的音樂進行翻版操作時,必須指定內容為:upload_cover。
  • audio_id:之前生成歌曲的 ID。

如需使用指定聲音翻唱,可同時傳入 persona_id。透過 /suno/voices 建立的私人聲音需要先在 /suno/upload 中攜帶相同的 persona_id 上傳原曲,再使用回傳的 audio_id 進行 upload_cover。各步驟須使用相同的服務通道。無需額外指定 vocal_gender,性別偏好不能取代聲音 ID。

例如原先生成後的歌曲 ID 是:0a1e1b10-c36a-41c9-9bfb-b26d9d25db98,那麼可以設定參數如下:

{
  "action": "cover",
  "audio_id": "0a1e1b10-c36a-41c9-9bfb-b26d9d25db98",
  "prompt": "A song for Christmas",
  "model": "chirp-v4-5"
}

其他參數不變,回傳的就是一首翻版後的歌曲,也就是對原先生成的歌曲進行翻版後的結果,範例如下:

{
  "success": true,
  "task_id": "b9d43d06-2e0a-4b5e-9e0d-7dfab32e00ab",
  "trace_id": "6c5e567d-0fdc-4c44-9b36-4090d9a75ff5",
  "data": [
    {
      "id": "6988fa57-f810-41cf-afab-7838db2c77dc",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-008",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-17T16:44:13.007Z",
      "model": "chirp-auk",
      "state": "succeeded",
      "style": "",
      "duration": 182.4
    },
    {
      "id": "ce98b991-0258-4f05-8245-e43d4efa8fb8",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-009",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-17T16:44:13.007Z",
      "model": "chirp-auk",
      "state": "succeeded",
      "style": "",
      "duration": 179.72
    }
  ]
}

生成的結果與上文類似,這就完成了對原先生成的歌曲進行翻版生成的過程。

替換片段

replace_section 根據來源歌曲的時間區間重新生成選中的片段,並將結果拼回原曲。replace_section_result_mode 預設為 full_song,回傳 2 首完整歌曲,可直接播放,無需再呼叫 concat。

輸入怎麼填

  • action:replace_section。
  • audio_id:要編輯的完整歌曲 ID。再次編輯時,使用上一次選中的完整歌曲的 data[].id,不是 task_id。
  • model:歌曲生成模型,例如 chirp-v6。
  • lyric:選中區間要唱的局部新歌詞。不需要為了取得完整歌曲而傳入整首歌詞。
  • prompt:明確指定這次替換的局部新歌詞。改詞時建議與 lyric 填入同一段內容,避免兩個欄位表達不同的歌詞。已有只傳局部 lyric、省略 prompt 的請求仍可使用,但補上 prompt 本身並不保證改詞成功。
  • style、negative_tags:可選的風格描述和排除項目;prompt 在此操作中不是一般做歌時的靈感描述。
  • replace_section_start、replace_section_end:選區在本次來源歌曲中的起始與結束時間,單位為秒,支援小數。起點不得小於 0,終點必須大於起點且不得超過來源歌曲長度。
  • replace_section_result_mode:full_song(預設)返回 2 首完整歌曲;candidates 返回 2 個尚未拼接的替換候選。

不要將「lyric 必須是替換後的完整歌詞,prompt 必須是局部歌詞」作為通用用法。完整歌詞輸入在部分任務中會產生過長的替換內容,拼接後使整首歌曲明顯變長。局部輸入也不保證固定長度或逐字遵循歌詞;這是生成式編輯,需要檢查實際音訊。

發起任務並取得完整歌曲

以下是請求格式範例。請將 YOUR_COMPLETED_AUDIO_ID 和時間區間替換為自己的來源歌曲 ID 和實際選區;範例假設第 30–50 秒對應以下四句。

{
  "action": "replace_section",
  "audio_id": "YOUR_COMPLETED_AUDIO_ID",
  "model": "chirp-v6",
  "custom": false,
  "instrumental": false,
  "lyric": "晚风吹过安静的街巷\n绿色风筝停在我身旁\n我们沿着河岸轻轻唱\n把今天的故事放心上",
  "prompt": "晚风吹过安静的街巷\n绿色风筝停在我身旁\n我们沿着河岸轻轻唱\n把今天的故事放心上",
  "replace_section_start": 30.0,
  "replace_section_end": 50.0,
  "replace_section_result_mode": "full_song",
  "async": true
}

提交後使用返回的 task_id 查詢 /suno/tasks,請求內容為 {"action":"retrieve","id":"YOUR_TASK_ID"}。任務完成後,在任務回應的 response.data 中取得兩首完整歌曲的 id、audio_url 和 duration,試聽後選擇其中一首。success: true 表示任務執行成功,不等於新歌詞已逐字唱出或長度符合預期。

選區、結果檢查與再次編輯

  1. 先試聽來源歌曲,再結合 /suno/timing 的時間資訊確定選區,盡量涵蓋完整樂句。不要按歌詞陣列的固定索引選區,也不要用幾句歌詞替換包含更多樂句的區間而預期節奏完全不變。
  2. 新歌詞的句數、字數和節奏盡量接近選區原有內容。只改幾個字也需要試聽驗證,不能據此保證成功。
  3. 檢查目標區間是否唱出新詞、前後銜接是否自然,以及整首歌曲的長度是否合理。full_song 表示返回完整歌曲,不表示與原曲等長;替換片段變長時,後半段會相應後移。duration 請求參數只用於一般生成,不能鎖定替換片段的長度。
  4. 返回的 lyric 是歌詞中繼資料,完整歌曲模式會在可取得來源歌詞時間資訊時組合完整歌詞;無法取得時可能為空。它不是音訊轉寫,出現新詞不能證明音訊已唱出新詞。時間對齊資訊也應結合試聽核對,尤其是已經編輯過的產物。
  5. 再次編輯時,以所選完整成品 ID 為新的 audio_id,重新核對該成品的長度和選區。不要照搬編輯前的時間座標,也不要直接將上次返回的整首 lyric 當作本次局部輸入。

如果任務已完成但仍唱舊詞、漏詞或明顯變長,先檢查來源歌曲 ID、選區和局部歌詞,再檢查另一首結果。增加任務查詢頻率不會改變已生成的內容。若仍有異常,請保留 task_id、來源歌曲 ID、請求欄位、選區及結果音訊,便於核查。

可選:先取候選,再手動拼接

僅當需要自行挑選替換候選時,設定 replace_section_result_mode: "candidates"。候選可能包含上下文,不能僅憑候選長度把它當作完整歌曲。選定後,以候選的 data[].id 呼叫 concat,再取得完整成品。

預設的 full_song 已完成拼接,不需要執行這一步。

人聲伴奏分離

計費:action=stems 成功後,每次請求的標準費用為 0.56 Credits;同一請求返回的人聲與伴奏合併計為一次。適用的消費優惠以實際帳單為準,失敗請求不收費。all_stems 和 extract_stem 按各自價格計費。

當生成歌曲之後需要進行伴奏和人聲單獨操作的二次創作時,可以分離純音樂伴奏和清唱人聲。就可以指定如下內容:

  • action:內容為 stems。
  • audio_id:之前生成歌曲的 ID。

例如原先生成後的歌曲 ID 是:ec13e502-d043-4eb2-92ee-e900c6da69d1,那麼可以設定參數如下:

{
  "action": "stems",
  "audio_id": "ec13e502-d043-4eb2-92ee-e900c6da69d1"
}

透過以上參數即可得到人聲伴奏分離的結果,結果如下:

{
  "success": true,
  "task_id": "4050affc-f8a6-4cba-a86c-bf201eed053d",
  "trace_id": "5107ee58-687d-422f-9195-fa0e82e1fcc8",
  "data": [
    {
      "id": "e3de0928-085a-42c4-b982-3b24738d1989",
      "title": "Deck the Sky - Vocals",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-013",
      "lyric": "[Verse]\nSnowflakes dance on rooftops high\nChildren's laughter fills the sky\nCarols ring from church bells loud\nHolidays a joyful crowd\n[Verse 2]\nCandy canes and cocoa warm\nWrapped up tight in our own storm\nStockings hung with dreams and cheer\nMagic growing every year\n[Chorus]\nDeck the sky with twinkling stars\nHoliday joy feels ours and ours\nSing the songs of love and light\nChristmas glows so pure and bright\n[Verse 3]\nFireside tales of long ago\nReindeer prance in icy glow\nEvergreen and tinsel’s gleam\nChristmas time a lovely dream\n[Bridge]\nHearts are full with friends and kin\nMistletoe for love to win\nGifts of love and hope we share\nChristmas spirit everywhere\n[Chorus]\nDeck the sky with twinkling stars\nHoliday joy feels ours and ours\nSing the songs of love and light\nChristmas glows so pure and bright",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "https://cdn.acedata.cloud/assets/examples/gemini/04a043bd-6b23-4b4e-945c-ce48158c3eee-3a89912507c7.mp4?example=video-001",
      "created_at": "2025-01-05T07:49:16.881Z",
      "model": "",
      "state": "succeeded",
      "style": "holiday, jolly",
      "duration": 174.16
    },
    {
      "id": "ad5d7c89-709c-4eb4-a5a6-72f9f5e57fdb",
      "title": "Deck the Sky - Instrumental",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-014",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "https://cdn.acedata.cloud/assets/examples/gemini/04a043bd-6b23-4b4e-945c-ce48158c3eee-3a89912507c7.mp4?example=video-002",
      "created_at": "2025-01-05T07:49:16.892Z",
      "model": "",
      "state": "succeeded",
      "style": "holiday, jolly",
      "duration": 174.16
    }
  ]
}

生成的結果與上文類似,這就完成了對原先生成的歌曲進行人聲與伴奏分離的過程。

全音軌人聲與伴奏分離

任務會等待全部音軌生成完成後才返回成功終態。處理中出現可播放網址不代表整組音軌已經完成。

當生成歌曲之後需要進行全音軌人聲與伴奏分離操作時,就可以指定如下內容:

  • action:內容為 all_stems。
  • audio_id:之前生成歌曲的 ID。

例如原先生成後的歌曲 ID 是:bdf23a5a-59f5-4103-b452-054a824a7f9f,那麼可以設定參數如下:

{
  "action": "all_stems",
  "audio_id": "bdf23a5a-59f5-4103-b452-054a824a7f9f"
}

透過以上參數即可得到全音軌人聲與伴奏分離的結果,結果如下:

  "success": true,
  "task_id": "f4b16fb9-8478-4857-88c7-b9a1f0bb9518",
  "trace_id": "9c560ebd-4fc6-4bdb-988a-8890160a92fb",
  "data": [
    {
      "id": "f86ca64a-9519-4ea7-a592-52438e001412",
      "title": "安全之弦 (Vocals)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-015",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "99e649a7-a394-47b9-a915-d7f847285a36",
      "title": "安全之弦 (Backing Vocals)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-016",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "6d710bf7-809f-4fdc-bb63-b8cb3a456d42",
      "title": "安全之弦 (Drums)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-017",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "e05f07e3-7d80-4713-8e51-7f176c733543",
      "title": "安全之弦 (Bass)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-018",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    },
{
      "id": "93fe7cd8-62fd-4739-b78e-142c7e0b8562",
      "title": "安全之弦 (吉他)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-019",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "8367d71c-fdd3-441c-8ebe-70c33cca821b",
      "title": "安全之弦 (鍵盤)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-020",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "28c03590-731c-416e-8fd3-95cdb3d75043",
      "title": "安全之弦 (打擊樂器)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-021",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "3d4c1a28-4e1c-485a-8201-d21bb93aca2f",
      "title": "安全之弦 (弦樂器)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-022",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "b9db8ded-01ec-4e37-b8a5-64aab3a814c2",
      "title": "安全之弦 (合成器)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-023",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "10a5248e-32e6-42b9-8da1-678a8a392aef",
      "title": "安全之弦 (音效)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-024",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "2d272128-111f-4901-8f62-5ae1eb43095a",
      "title": "安全之弦 (銅管樂器)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-025",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "4a7c19a5-f8d4-4e4a-add9-aa0bad9307cc",
      "title": "安全之弦 (木管樂器)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-026",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "1ca774f9-3e75-48a6-941b-808875eadcd2",
      "title": "安全之弦 (人聲)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-027",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.770Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "14c5ffc7-addf-4fee-afd2-4b8b3e7ee470",
      "title": "安全之弦 (和聲)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-028",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.771Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    },
{
      "id": "9d044557-450d-48ab-90dc-8eaf6f1cdb6c",
      "title": "安全之弦 (Drums)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-029",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.771Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "efd052d0-c12f-47b3-8282-1f3ef7610e1f",
      "title": "安全之弦 (Bass)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-030",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.771Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "5775372b-292e-4420-96ef-60e57a60cc1f",
      "title": "安全之弦 (Guitar)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-031",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.771Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "dab3f220-19cd-408e-9b96-30ec18f5b049",
      "title": "安全之弦 (Keyboard)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-032",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.771Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "2d0cd6d4-af82-4bb5-86fe-d92bdb367157",
      "title": "安全之弦 (Percussion)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-033",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.771Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "f3191a1a-5e8d-4afe-b638-3add222d52cd",
      "title": "安全之弦 (Strings)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-034",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.771Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "a8834ea5-200b-4206-a812-9780ef336660",
      "title": "安全之弦 (Synth)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-035",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.771Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "f50d1a31-ef72-400a-b8ae-0367849d007d",
      "title": "安全之弦 (FX)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-036",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.771Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "cb581673-23cc-40d6-9f9b-0f76720f0d18",
      "title": "安全之弦 (Brass)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-037",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.771Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }, {
      "id": "d91cfb52-f0a3-4546-bf8a-2ad14c3775a5",
      "title": "安全之弦 (Woodwinds)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-038",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-06-11T02:40:30.771Z",
      "model": "chirp-ahi-stem-12-t1",
      "state": "succeeded",
      "duration": 154.92
    }
  ]
}

生成的結果與上文類似,這就完成了對原先生成的歌曲進行人聲與伴奏分離的過程。

新增音軌

add_stem 為指定音訊生成目標樂器或聲音軌,透過 POST /suno/audios 呼叫。

  • 必填:action、audio_id、stem_type。
  • 可選:model、prompt、title、style、negative_tags、weirdness、style_influence、audio_weight、max_mode、variety。
  • 計費:一般模式 0.672 Credits;max_mode 為 true 時 1.344 Credits。
{
  "action": "add_stem",
  "audio_id": "dead4ee5-df4d-417b-8f7e-717722fae51a",
  "stem_type": "bass",
  "model": "chirp-v6",
  "prompt": "Add warm bass guitar",
  "style": "minimal piano pulse with warm bass guitar",
  "negative_tags": "vocals",
  "variety": "normal",
  "max_mode": false,
  "async": true
}

終態回應:

{
  "success": true,
  "task_id": "82851953-9590-4334-8bb8-ae30ccadc815",
  "trace_id": "862bbcce-1678-44ff-982d-8b439c126a5e",
  "data": [
    {
      "id": "0adc26ca-2720-4c69-b237-457a986d70e3",
          "audio_url": "https://cdn.acedata2.cloud/suno/0adc26ca-2720-4c69-b237-457a986d70e3.mp3",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 12.8
    },
    {
      "id": "e2d39a6c-1d20-4a40-adaf-b2551815d869",
          "audio_url": "https://cdn.acedata2.cloud/suno/e2d39a6c-1d20-4a40-adaf-b2551815d869.mp3",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 12.36
    }
  ],
  "cost": {"amount": 0.6048, "currency": "credit", "list_amount": 0.672}
}

擷取音軌

extract_stem 從指定音訊中擷取目標音軌,同時傳回移除該音軌後的互補版本,透過 POST /suno/audios 呼叫。

  • 必填:action、audio_id、stem_type。
  • 可選:audio_format,目前公開雙通道契約僅支援 mp3。
  • 計費:1.12 Credits。
{
  "action": "extract_stem",
  "audio_id": "dead4ee5-df4d-417b-8f7e-717722fae51a",
  "stem_type": "bass",
  "audio_format": "mp3",
  "async": true
}

終態回應中的 data 保留扁平音訊列表,stem_sets 表示目標音軌與互補音軌的對應關係:

{
  "success": true,
  "task_id": "ae9557d0-4ff7-4a35-bcde-d881e78fbfe5",
  "trace_id": "82c51a55-7627-41a5-b72b-1b9775ca25f2",
  "data": [
    {"id":"3084d7e1-4278-4733-8b56-56f7ecf3f859","title":"(Bass)","audio_url":"https://cdn.acedata2.cloud/suno/3084d7e1-4278-4733-8b56-56f7ecf3f859.mp3","model":"chirp-v6","state":"succeeded","duration":12.8,"stem_set":1},
    {"id":"19b83ca9-a51d-494f-a41d-5b0957f3295e","title":"(Without Bass)","audio_url":"https://cdn.acedata2.cloud/suno/19b83ca9-a51d-494f-a41d-5b0957f3295e.mp3","model":"chirp-v6","state":"succeeded","duration":12.8,"stem_set":1},
    {"id":"7eb431e8-f4db-4915-902e-0e89d2b3185a","title":"(Bass)","audio_url":"https://cdn.acedata2.cloud/suno/7eb431e8-f4db-4915-902e-0e89d2b3185a.mp3","model":"chirp-v6","state":"succeeded","duration":12.8,"stem_set":2},
    {"id":"495d29cc-5790-4d0a-8b95-9551a6127b61","title":"(Without Bass)","audio_url":"https://cdn.acedata2.cloud/suno/495d29cc-5790-4d0a-8b95-9551a6127b61.mp3","model":"chirp-v6","state":"succeeded","duration":12.8,"stem_set":2}
  ],
  "stem_sets": [
    {"stem_type":"bass","isolated":{"id":"3084d7e1-4278-4733-8b56-56f7ecf3f859","state":"succeeded","stem_set":1},"remainder":{"id":"19b83ca9-a51d-494f-a41d-5b0957f3295e","state":"succeeded","stem_set":1}},
    {"stem_type":"bass","isolated":{"id":"7eb431e8-f4db-4915-902e-0e89d2b3185a","state":"succeeded","stem_set":2},"remainder":{"id":"495d29cc-5790-4d0a-8b95-9551a6127b61","state":"succeeded","stem_set":2}}
  ],
  "cost": {"amount": 1.008, "currency": "credit", "list_amount": 1.12}
}

生成音效

sounds 根據文字描述生成一次性或可循環音效,透過 POST /suno/audios 呼叫。

  • 必填:action、sound、sound_type。
  • 可選:model、bpm、key、audio_format;audio_format 目前僅支援 mp3。
  • sound_type:one-shot 或 loop。
  • 計費:0.112 Credits。
{
  "action": "sounds",
  "sound": "single soft analog synth pluck, no reverb",
  "sound_type": "one-shot",
  "model": "chirp-v6",
  "bpm": 120,
  "key": "C",
  "audio_format": "mp3",
  "async": true
}
{
  "success": true,
  "task_id": "f6716546-d118-40a0-ad15-09999f9f22ba",
  "trace_id": "da4c7895-e494-4bd8-83bd-132e006c94e3",
  "data": [
    {"id":"b3cd3e7d-96e4-48ef-abde-73c7ddee8b4a","title":"single soft analog synth pluck, no reverb","audio_url":"https://cdn.acedata2.cloud/suno/b3cd3e7d-96e4-48ef-abde-73c7ddee8b4a.mp3","model":"chirp-v6","state":"succeeded","duration":10},
    {"id":"f1517867-b76a-4cdf-b006-9ce6e653e0a5","title":"single soft analog synth pluck, no reverb","audio_url":"https://cdn.acedata2.cloud/suno/f1517867-b76a-4cdf-b006-9ce6e653e0a5.mp3","model":"chirp-v6","state":"succeeded","duration":10}
  ],
  "cost": {"amount": 0.1008, "currency": "credit", "list_amount": 0.112}
}

調整音訊速度

adjust_speed 調整指定音訊的播放速度,透過 POST /suno/audios 呼叫。

  • 必填:action、audio_id、speed_multiplier、title。
  • 可選:keep_pitch。
  • speed_multiplier:範圍 0.25–4。
  • 計費:0.28 Credits。
{
  "action": "adjust_speed",
  "audio_id": "dead4ee5-df4d-417b-8f7e-717722fae51a",
  "speed_multiplier": 1.1,
  "keep_pitch": true,
  "title": "Suno contract verification speed 1.1x",
  "async": true
}

來源音訊時長為 9.8 秒,1.1 倍速結果為 8.909090909 秒:

{
  "success": true,
  "task_id": "c5860fdd-76b1-40a1-b5b5-ec047e471c8a",
  "trace_id": "292ed097-3631-441c-ac80-52f326b62726",
  "data": [
    {
      "id": "02534b52-45a7-4961-834a-f473a407e62c",
      "title": "Suno contract verification speed 1.1x",
      "audio_url": "https://cdn.acedata2.cloud/suno/02534b52-45a7-4961-834a-f473a407e62c.mp3",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 8.909090909090908
    }
  ],
  "cost": {"amount": 0.252, "currency": "credit", "list_amount": 0.28}
}

生成模型具有隨機性。介面保證參數語意、任務狀態和回應結構一致,不保證不同請求生成完全相同的波形。

自訂生成的進階參數

官方允許在自訂模式下使用進階參數 weirdness==>Weirdness、style_influence==>Style Influence、audio_weight==>Audio Influence 來進行生成,對應的官方範例如下:

其中進階參數的範圍都在 0-1 之間,具體的參數如下圖所示:

填寫完畢之後自動生成的程式碼如下:

對應的 Python 程式碼:

import requests

url = "https://api.yxai-tech.top/suno/audios"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "action": "generate",
    "model": "chirp-v4-5",
    "lyric": "Hello Hello Hello ",
    "custom": True,
    "weirdness": 0.4,
    "style_influence": 0.4,
    "audio_weight": 0.4
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

點擊執行,可以發現會得到一個結果,如下:

{
  "success": true,
  "task_id": "2f3aa682-e1a7-43a9-9fbb-ed0ce8668a4b",
  "trace_id": "07408194-7deb-4a52-a36d-9a9a13143b5f",
  "data": [
    {
      "id": "c66e2077-7580-43f2-9937-c67a8afcd8bd",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-039",
      "lyric": "Hello Hello Hello ",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-07-10T12:54:35.199Z",
      "model": "chirp-auk",
      "state": "succeeded",
      "style": "",
      "duration": 187.92
    },
    {
      "id": "a922f97b-307c-4c4d-aae3-a47ba8202a10",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-040",
      "lyric": "Hello Hello Hello ",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-07-10T12:54:35.199Z",
      "model": "chirp-auk",
      "state": "succeeded",
      "style": "",
      "duration": 229.64
    }
  ]
}

這樣就使用了進階參數來生成自訂歌曲,結果與上文類似。

控制歌曲時長

預設情況下生成的歌曲時長由模型自行決定,通常在 30 秒到 4 分鐘之間。如果需要更長或更短的成品,可以透過 duration 參數指定期望時長,單位是秒,取值為 10 到 360 之間的整數。

該參數用於自訂模式(custom 為 true)的歌曲生成。需要特別說明的是,duration 是一個傾向性提示,而不是硬性限制:模型在創作時會參考這個值,但不保證達到,實測中實際時長通常明顯短於期望值,同一次請求回傳的兩首歌曲時長也可能相差數倍。即使是完全相同的請求,多次提交得到的時長也可能有較大差異。因此不要把它當作精確的時長控制來使用,如果業務上需要固定時長,請在拿到成品後自行裁剪或重試。

對應的 Python 程式碼:

import requests

url = "https://api.yxai-tech.top/suno/audios"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "action": "generate",
    "model": "chirp-v5-5",
    "custom": True,
    "title": "Under the City Lights",
    "style": "lo-fi piano",
    "lyric": "[Verse]\nSunrise creepin\nGold on the floor\n[Chorus]\nUnder the city lights\n",
    "duration": 330
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

需要注意的是,請求中的 duration 是期望時長,而回應 data 中每首歌曲的 duration 欄位是該首歌曲的實際時長。兩者名稱相同但含義不同,實際時長不保證等於期望值。歌詞長度是影響成品時長的主要因素之一,若需要較長的成品,建議同時提供更完整的歌詞。

介面會驗證 duration 必須是 10 到 360 的整數;它仍然只是生成目標,不是成品長度保證。

新增器樂功能

2025 年 8 月份 Suno 新推出 Add Instrumental 功能,首先需要上傳一首清唱無配音的歌曲,讓 Suno 幫你配樂,首先可以先到 Suno Upload API 上傳一首清唱無配樂的歌曲,對應的操作如下圖所示:

然後需要記錄上傳後的 audio_id,具體的結果如下圖所示:

最後得到了一個 audio_id:92254cab-3372-4d9e-bce9-cdcfdbc39070,然後我們還需要填寫如下參數:

  • action:內容為 underpainting。
  • underpainting_start:對上傳的歌曲新增伴奏的起始時間,預設值是 0。
  • underpainting_end:對上傳的歌曲新增伴奏的結束時間,必須小於歌曲的總時長。
  • audio_id:上傳的清唱無配音歌曲 ID。
  • style:伴奏的風格,最好不用歌詞,畢竟是配音。

填寫完畢之後自動產生的程式碼如下:

對應的 Python 程式碼:

import requests

url = "https://api.yxai-tech.top/suno/audios"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "action": "underpainting",
    "model": "chirp-v4-5",
    "style": "Pop rap, uplifting, magnetic male vocals, piano, synth, electric guitar, driving bass, clear structure",
    "audio_id": "92254cab-3372-4d9e-bce9-cdcfdbc39070",
    "underpainting_end": 120
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

點擊執行,可以發現會得到一個結果,如下:

{
  "success": true,
  "task_id": "822d2e14-c535-4d48-a4e5-1b6ab00b04a7",
  "trace_id": "257eac2c-8e4f-44d0-8454-5e215111eefa",
  "data": [
    {
      "id": "2788cd21-bd84-422d-beb5-859c60fbf5b6",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-041",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-08-27T15:25:42.548Z",
      "model": "chirp-v4",
      "state": "succeeded",
      "style": "Pop rap, uplifting, magnetic male vocals, piano, synth, electric guitar, driving bass, clear structure",
      "duration": 10.16
    },
    {
      "id": "a4bb7220-e971-4cbf-a626-b86c648bcf55",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-042",
      "lyric": "",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-08-27T15:25:42.548Z",
      "model": "chirp-v4",
      "state": "succeeded",
      "style": "Pop rap, uplifting, magnetic male vocals, piano, synth, electric guitar, driving bass, clear structure",
      "duration": 2.52
    }
  ]
}

這樣就完成了對上傳的清唱無配音歌曲進行配樂的操作,結果與上文類似。

Add Vocals 功能

2025 年 8 月份 Suno 新推出 Add Vocals 功能,首先需要上傳一首純音樂,讓 Suno 填詞、產生人聲歌唱,首先可以先到 Suno Upload API 上傳一首清唱無配樂的歌曲,對應的操作如下圖所示:

然後需要記錄上傳後的 audio_id,具體的結果如下圖所示:

最後得到了一個 audio_id:92254cab-3372-4d9e-bce9-cdcfdbc39070,然後我們還需要填寫如下參數:

  • action:內容為 overpainting。
  • overpainting_start:對上傳的歌曲新增人聲的起始時間,預設值是 0。
  • overpainting_end:對上傳的歌曲新增人聲的結束時間,必須小於歌曲的總時長。
  • audio_id:上傳的清唱無配音歌曲 ID。
  • custom:此模式下必須使用自訂模式填入歌詞。
  • lyric:自訂模式下填寫的歌詞。
  • style:伴奏的風格。

填寫完畢之後自動產生的程式碼如下:

對應的 Python 程式碼:

import requests

url = "https://api.yxai-tech.top/suno/audios"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "action": "overpainting",
    "model": "chirp-v4-5",
    "lyric": "Yea your were the best I could get \\nBut I knew that it couldn’t last \\nStayed down since we were friends \\nHad to leave those thoughts in the past \\nMade like 40k just last week \\nOn top of the 20 with my babe\\ndon’t care for what niggas say",
    "custom": True,
    "audio_id": "92254cab-3372-4d9e-bce9-cdcfdbc39070",
    "overpainting_end": 120
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

點擊執行,可以發現會得到一個結果,如下:

{
  "success": true,
  "task_id": "31bb250e-6614-49ec-ac85-631f224daeba",
  "trace_id": "efe8e7f3-9a65-4f13-a9f8-51e8478899df",
  "data": [
    {
      "id": "a597f945-64df-4722-a631-d436450832bd",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-043",
      "lyric": "Yea your were the best I could get \\nBut I knew that it couldn’t last \\nStayed down since we were friends \\nHad to leave those thoughts in the past \\nMade like 40k just last week \\nOn top of the 20 with my babe\\ndon’t care for what niggas say",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-08-27T15:33:51.550Z",
      "model": "chirp-v4",
      "state": "succeeded",
      "style": "",
      "duration": 105.32
    },
    {
      "id": "b41a8b91-3d88-4ebd-a6cf-732764b24954",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-044",
      "lyric": "Yea your were the best I could get \\nBut I knew that it couldn’t last \\nStayed down since we were friends \\nHad to leave those thoughts in the past \\nMade like 40k just last week \\nOn top of the 20 with my babe\\ndon’t care for what niggas say",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-08-27T15:33:51.550Z",
      "model": "chirp-v4",
      "state": "succeeded",
      "style": "",
      "duration": 148.16
    }
  ]
}

這樣就完成了對上傳的清唱無配音歌曲進行配人聲的操作,結果與上文類似。

Remaster 功能

2025 年 12 月 suno 新推出 Remaster 功能,該功能可以重新生成歌曲,不可跨帳號,然後我們還需要填寫如下參數:

  • action:內容為 remaster。
  • audio_id:需要重新生成的歌曲 ID。
  • model:僅支援 v4.5+、v5。
  • variation_category:僅在 v5 以上版本支援,而且只有 3 個值 high normal subtle。

填寫完畢之後自動生成了程式碼如下:

對應的 Python 程式碼:

import requests

url = "https://api.yxai-tech.top/suno/audios"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "action": "remaster",
    "variation_category": "high",
    "audio_id": "21fd46d4-45c3-4826-bec9-3f3df667902e"
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

點擊執行,可以發現會得到一個結果,如下:

{
  "success": true,
  "task_id": "791ee74c-9363-4352-afe7-babb19b89899",
  "trace_id": "77acda57-c3d4-4e11-a506-4f50e0609916",
  "data": [
    {
      "id": "b0515cdf-9cb5-46cd-b0fe-10a239dc9274",
      "title": "Navidad en costura  (Remastered)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-045",
      "image_large_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-046",
      "lyric": "En Teror las clases siguen,\nni en Navidad hay parón;\ncose el grupo entre villancicos\ny un buen trocito de turrón.\nLa Popular abre sus puertas,\ny el taller suena mejor;\nhilo, aguja y canto alegre\nlo pasaremos mejor\nSeguimos en las costuras,\ncon música y diversión;\nlos alumnos comeremos\nGolosinas un montón ",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-12-04T13:09:59.936Z",
      "model": "chirp-v4",
      "state": "succeeded",
      "style": "Villancico",
      "duration": 32.2
    },
    {
      "id": "06edab94-a4f9-4c0c-abac-a2e8a97c76a8",
      "title": "Navidad en costura  (Remastered)",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-047",
      "image_large_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-048",
      "lyric": "En Teror las clases siguen,\nni en Navidad hay parón;\ncose el grupo entre villancicos\ny un buen trocito de turrón.\nLa Popular abre sus puertas,\ny el taller suena mejor;\nhilo, aguja y canto alegre\nlo pasaremos mejor\nSeguimos en las costuras,\ncon música y diversión;\nlos alumnos comeremos\nGolosinas un montón ",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2025-12-04T13:09:59.936Z",
      "model": "chirp-v4",
      "state": "succeeded",
      "style": "Villancico",
      "duration": 32.2
    }
  ]
}

這樣就完成了對已生成歌曲重新生成的操作,結果與上文類似。

Mashup 混曲生成功能

2025 年 12 月 suno 新推出 Mashup 功能,該功能可以根據兩首參考歌曲生成歌曲,然後我們還需要填寫如下參數:

  • action:內容為 mashup。
  • mashup_audio_ids:兩首參考歌曲的 ID。

填寫完畢之後自動生成了程式碼如下:

對應的 Python 程式碼:

import requests

url = "https://api.yxai-tech.top/suno/audios"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "action": "mashup",
    "lyric": "Sambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nSambuy come, Sambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\nSambuy come back",
    "model": "chirp-v4-5",
    "custom": True,
    "instrumental": False,
    "mashup_audio_ids": ["9f102969-0024-479e-b38f-c0c5db21383d","6aebb715-701c-433f-b976-a7ff5cf16255"]
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

點擊執行,可以發現會得到一個結果,如下:

{
  "success": true,
  "task_id": "3fe070eb-2ab1-4424-909c-acfe3ca761af",
  "trace_id": "2b220382-7a84-4853-ae43-05cdcad233a9",
  "data": [
    {
      "id": "5ff751dc-0e72-4de9-a54b-2cad50984b47",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-049",
      "image_large_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-050",
      "lyric": "Sambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nSambuy come, Sambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\nSambuy come back",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2026-01-25T15:13:30.181Z",
      "model": "chirp-v4-5",
      "state": "succeeded",
      "style": "",
      "duration": 219.08
    },
    {
      "id": "19c515c4-d7b3-4a17-8ab0-dd1ebd4861b8",
      "title": "",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-051",
      "image_large_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-052",
      "lyric": "Sambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nSambuy come, Sambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\n\\nSambuy come  \\nSambuy come back  \\nBluespawn, greenspawn are making you a spawn  \\nSambuy come back",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "",
      "created_at": "2026-01-25T15:13:30.181Z",
      "model": "chirp-v4-5",
      "state": "succeeded",
      "style": "",
      "duration": 163.12
    }
  ]
}

這樣就完成了對參考歌曲混曲生成的操作,結果與上文類似。

Samples 取樣生成歌曲

這裡的 samples 是單音訊區間取樣:從一首已有音訊中選擇起訖時間,將該片段作為取樣素材進行創作。它不同於下文使用 1 到 4 段完整參考音訊的 Inspo 靈感創作功能。需要填寫如下參數:

  • action:內容為 samples。
  • samples_start:取樣開始時間(秒),預設為 0,不得小於 0。
  • samples_end:取樣結束時間(秒),必填且必須大於開始時間。
  • audio_id:需要取樣的參考歌曲的 ID。

填寫完畢之後自動生成了程式碼如下:

對應的 Python 程式碼:

import requests

url = "https://api.yxai-tech.top/suno/audios"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "action": "samples",
    "model": "chirp-v5",
    "lyric": "[Verse 1]\\nPhone lit up\\nHeadline in my hand\\nFeels made up\\nStill says “you won’t understand”\\nYour name\\nMy name\\nSide by side in the scroll\\nCold black text\\nOn a story I used to hold\\n\\n[Chorus]\\nYou’re breaking news\\nAnd I’m just breaking\\nFront-page truth\\nHeart still shaking\\nEverybody reads\\nWhat we already knew\\nYou’re a story now\\nAnd I’m the one you broke it to\\n\\n[Verse 2]\\nNeighbors talk\\nThrough a half-closed door\\nCoffee cools\\nOn a cracked old floor\\nYour suitcase snaps\\nLike a camera flash\\nOne last quote\\nThen you cut to black\\n\\n[Chorus]\\nYou’re breaking news\\nAnd I’m just breaking\\nFront-page truth\\nHeart still shaking\\nEverybody reads\\nWhat we already knew\\nYou’re a story now\\nAnd I’m the one you broke it to\\n\\n[Bridge]\\nIs there a line\\nWhere we rewind\\nOr just a feed\\nThat leaves us behind\\nTell me\\nWho gets\\nThe final view\\nWhen I stop trending\\nWith you\\n\\n[Chorus]\\nYou’re breaking news\\nAnd I’m just breaking\\nFront-page truth\\nHeart still shaking\\nEverybody reads\\nWhat we already knew\\nYou’re a story now\\nAnd I’m the one you broke it to (yeah)",
    "custom": True,
    "instrumental": False,
    "audio_id": "0fa07665-6b8e-4a8b-8bd3-7e0cfcdada88",
    "samples_end": 102.16,
    "samples_start": 59.88
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

點擊執行,可以發現會得到一個結果,如下:

{
    "success": true,
    "task_id": "12135a45-6384-4683-9bb1-64f19933915a",
    "trace_id": "683e559d-340e-4c72-8fae-e683442ac7e9",
    "data": [
        {
            "id": "9a0b680f-a9ea-4a36-8695-8ea777ab6ee7",
            "title": "Whistle in the Wind",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-053",
            "image_large_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-054",
            "lyric": "[Verse 1]\nPhone lit up\nHeadline in my hand\nFeels made up\nStill says “you won’t understand”\nYour name\nMy name\nSide by side in the scroll\nCold black text\nOn a story I used to hold\n[Chorus]\nYou’re breaking news\nAnd I’m just breaking\nFront-page truth\nHeart still shaking\nEverybody reads\nWhat we already knew\nYou’re a story now\nAnd I’m the one you broke it to\n[Verse 2]\nNeighbors talk\nThrough a half-closed door\nCoffee cools\nOn a cracked old floor\nYour suitcase snaps\nLike a camera flash\nOne last quote\nThen you cut to black\n[Chorus]\nYou’re breaking news\nAnd I’m just breaking\nFront-page truth\nHeart still shaking\nEverybody reads\nWhat we already knew\nYou’re a story now\nAnd I’m the one you broke it to\n[Bridge]\nIs there a line\nWhere we rewind\nOr just a feed\nThat leaves us behind\nTell me\nWho gets\nThe final view\nWhen I stop trending\nWith you\n[Chorus]\nYou’re breaking news\nAnd I’m just breaking\nFront-page truth\nHeart still shaking\nEverybody reads\nWhat we already knew\nYou’re a story now\nAnd I’m the one you broke it to (yeah)",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": "",
            "created_at": "2026-01-31T14:34:45.043Z",
            "model": "chirp-v5",
            "state": "succeeded",
            "style": "acoustic with a hint of optimism,folk-pop,female vocals",
            "duration": 176.92
        },
        {
            "id": "66473dee-3aaf-43b2-80fd-76568b3abbb1",
            "title": "Whistle in the Wind",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-055",
            "image_large_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-056",
            "lyric": "[Verse 1]\nPhone lit up\nHeadline in my hand\nFeels made up\nStill says “you won’t understand”\nYour name\nMy name\nSide by side in the scroll\nCold black text\nOn a story I used to hold\n[Chorus]\nYou’re breaking news\nAnd I’m just breaking\nFront-page truth\nHeart still shaking\nEverybody reads\nWhat we already knew\nYou’re a story now\nAnd I’m the one you broke it to\n[Verse 2]\nNeighbors talk\nThrough a half-closed door\nCoffee cools\nOn a cracked old floor\nYour suitcase snaps\nLike a camera flash\nOne last quote\nThen you cut to black\n[Chorus]\nYou’re breaking news\nAnd I’m just breaking\nFront-page truth\nHeart still shaking\nEverybody reads\nWhat we already knew\nYou’re a story now\nAnd I’m the one you broke it to\n[Bridge]\nIs there a line\nWhere we rewind\nOr just a feed\nThat leaves us behind\nTell me\nWho gets\nThe final view\nWhen I stop trending\nWith you\n[Chorus]\nYou’re breaking news\nAnd I’m just breaking\nFront-page truth\nHeart still shaking\nEverybody reads\nWhat we already knew\nYou’re a story now\nAnd I’m the one you broke it to (yeah)",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": "",
            "created_at": "2026-01-31T14:34:45.043Z",
            "model": "chirp-v5",
            "state": "succeeded",
            "style": "acoustic with a hint of optimism,folk-pop,female vocals",
            "duration": 177.48
        }
    ]
}

這樣就完成了取樣生成歌曲的操作,結果與上文類似。

Inspo 靈感創作功能

Inspo 靈感創作功能可以根據 1 到 4 段完整參考音訊生成新的音樂,支援拖曳或上傳音訊作為靈感來源。API 使用現有 inspo action:用戶端提供可公開存取的音訊 URL,服務會自動完成參考音訊準備和創作,無需用戶端分別讀取歌詞、風格或時長再組合請求。它不同於上文的區間取樣,也不同於複刻原曲風格的 Cover。使用時需要填寫如下參數:

  • action:內容為 inspo。
  • audio_urls:參考音訊的 URL 清單,需提供 1 到 4 個可公開存取的音訊網址。
  • model:使用的模型,推薦 chirp-v6。
  • prompt:歌詞或創作提示詞(可選)。
  • instrumental:設為 true 時依純音樂請求生成,不使用歌詞。
  • persona_id:在支援該組合的服務通道上使用指定聲音;參考音訊會在準備階段綁定到該聲音所需的資源環境。
  • lyric_prompt:當 custom=true 且未提供 lyric 時,用於自動生成歌詞。

說明:參考音訊需為可公開存取的音訊檔案。若參考音訊與平台曲庫中的已知錄音完全相符,Suno 可能會因版權驗證而拒絕生成,建議使用自有或由 Suno 生成的音訊作為靈感來源。

對應的 Python 程式碼:

import requests

url = "https://api.yxai-tech.top/suno/audios"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "action": "inspo",
    "model": "chirp-v6",
    "audio_urls": [
        "https://cdn.acedata.cloud/uploads/a0bc051f-42c2-4a46-aeb4-582dcc884ad2"
    ],
    "prompt": "Rework these references as warm acoustic folk with soft vocals"
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

下方保留一份已驗證的歷史回應快照;快照使用當時的 chirp-v5,目前請求範例推薦 chirp-v6,回傳結構一致:

{
    "success": true,
    "task_id": "725e6b41-78d0-4adf-856c-05e81098c029",
    "trace_id": "8c2f0b3e-2f6a-4738-8b1d-c58068ca3dab",
    "data": [
        {
            "id": "20ca5628-86e0-4c32-8ae4-9f0c481e45f3",
            "title": "Inspo Demo",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-057",
            "lyric": "",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": "",
            "created_at": "2026-06-18T13:01:53.910Z",
            "model": "chirp-v5",
            "state": "succeeded",
            "style": "acoustic, folk, warm",
            "duration": 36.92
        },
        {
            "id": "8744a796-9961-45af-868d-4f3bc1c44257",
            "title": "Inspo Demo",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-058",
            "lyric": "",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": "",
            "created_at": "2026-06-18T13:01:53.910Z",
            "model": "chirp-v5",
            "state": "succeeded",
            "style": "acoustic, folk, warm",
            "duration": 84.16
        }
    ]
}

這樣就完成了靈感創作的操作,回傳結果與一般生成歌曲一致。

非同步回呼

由於 Suno 生成音樂的時間相對較長,大約需要 1-2 分鐘,如果 API 長時間無回應,HTTP 請求會一直保持連線,導致額外的系統資源消耗,所以本 API 也提供了非同步回呼的支援。

整體流程是:用戶端發起請求的時候,額外指定一個 callback_url 欄位,用戶端發起 API 請求之後,API 會立刻回傳一個結果,包含一個 task_id 的欄位資訊,代表目前的任務 ID。當任務完成之後,生成音樂的結果會透過 POST JSON 的形式傳送到用戶端指定的 callback_url,其中也包括了 task_id 欄位,這樣任務結果就可以透過 ID 關聯起來了。

下面我們透過範例來了解具體如何操作。

首先,Webhook 回呼是一個可以接收 HTTP 請求的服務,開發者應該替換為自己架設的 HTTP 伺服器的 URL。此處為了方便示範,使用一個公開的 Webhook 範例網站 https://webhook.site/,開啟該網站即可取得一個 Webhook URL,如圖所示:

將此 URL 複製下來,就可以作為 Webhook 來使用,此處的範例為 https://webhook.site/03e60575-3d96-4132-b681-b713d78116e2。

接下來,我們可以設定欄位 callback_url 為上述 Webhook URL,同時填入 prompt,如圖所示:

點擊執行,可以發現會立即得到一個結果,如下:

{
  "task_id": "44472ab8-783b-4054-b861-5bf14e462f60"
}

稍等片刻,我們可以在 https://webhook.site/03e60575-3d96-4132-b681-b713d78116e2 上觀察到生成歌曲的結果,如圖所示:

內容如下:

{
  "success": true,
  "task_id": "44472ab8-783b-4054-b861-5bf14e462f60",
  "data": [
    {
      "id": "da4324e5-84b2-484b-b0e9-dd261381c594",
      "title": "Winter Whispers",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-059",
      "lyric": "[Verse]\nSnow falling gently from the sky\nChildren giggling as they pass by\nFire crackling\nCozy and warm\nChristmas spirit begins to swarm\n[Verse 2]\nTwinkling lights\nA sight to behold\nStockings hung\nWaiting to be filled with gold\nGifts wrapped with love\nPiled high\nExcitement in the air\nYou can't deny\n[Chorus]\nWinter whispers in the wind\nJoy and love it brings\nLet's celebrate this season\nWith the ones we're missing",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "https://cdn.acedata.cloud/assets/examples/gemini/04a043bd-6b23-4b4e-945c-ce48158c3eee-3a89912507c7.mp4?example=video-003",
      "created_at": "2024-05-11T07:33:05.430Z",
      "model": "chirp-v3",
      "prompt": "A song for Christmas",
      "style": "pop"
    },
    {
      "id": "b878a87b-a0db-4046-8ccd-ecd2fb3d4372",
      "title": "Winter Whispers",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-060",
      "lyric": "[Verse]\nSnow falling gently from the sky\nChildren giggling as they pass by\nFire crackling\nCozy and warm\nChristmas spirit begins to swarm\n[Verse 2]\nTwinkling lights\nA sight to behold\nStockings hung\nWaiting to be filled with gold\nGifts wrapped with love\nPiled high\nExcitement in the air\nYou can't deny\n[Chorus]\nWinter whispers in the wind\nJoy and love it brings\nLet's celebrate this season\nWith the ones we're missing",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": "https://cdn.acedata.cloud/assets/examples/gemini/04a043bd-6b23-4b4e-945c-ce48158c3eee-3a89912507c7.mp4?example=video-004",
      "created_at": "2024-05-11T07:33:05.430Z",
      "model": "chirp-v3",
      "prompt": "A song for Christmas",
      "style": "pop"
    }
  ]
}

可以看到結果中有一個 task_id 欄位,其他的欄位都和上文類似,透過該欄位即可實現任務的關聯。

當然我們也可以透過串流呼叫來取得結果,我們只需要將請求標頭裡面的 accept 的值設定為 application/x-ndjson 即可,下面用一個範例輸入作為示範:

等待過程中我們可以得到以下輸出:

{"success":true,"task_id":"1af4b454-ce84-4512-a0a2-de3f8574ecd8","data":[{"id":"1f610752-f426-4fd5-89a8-ba2ad0370881","title":"Snowflakes and Mistletoe","lyric":"[Verse]\nLights are tangled on the tree again\nThe cat’s knocked over the wreath\nCookies burning in the oven too\nBut I’m still grinning through my teeth\n[Prechorus]\nSnow is falling like glitter in the sky\nI’ve got a feeling this year’s gonna fly\n[Chorus]\nSnowflakes and mistletoe\nEverywhere I go\nI know\nLove is the gift\nThe glow\nSnowflakes and mistletoe\n[Verse 2]\nGrandma’s singing a little off-key\nThe kids are laughing too loud\nThe dog’s stolen a turkey leg\nChaos is a Christmas crowd\n[Prechorus]\nBut the fire’s crackling\nWarm and bright\nAnd my heart’s a candle tonight\n[Chorus]\nSnowflakes and mistletoe\nEverywhere I go\nI know\nLove is the gift\nThe glow\nSnowflakes and mistletoe","audio_url":"","video_url":"","created_at":"2025-12-13T11:29:25.101Z","model":"chirp-v5","state":"pending","prompt":"A song for Christmas","style":"uplifting, orchestral with bells and acoustic guitar"},{"id":"d1a3109d-799b-401e-b032-4b501bcf26f3","title":"Snowflakes and Mistletoe","lyric":"[Verse]\nLights are tangled on the tree again\nThe cat’s knocked over the wreath\nCookies burning in the oven too\nBut I’m still grinning through my teeth\n[Prechorus]\nSnow is falling like glitter in the sky\nI’ve got a feeling this year’s gonna fly\n[Chorus]\nSnowflakes and mistletoe\nEverywhere I go\nI know\nLove is the gift\nThe glow\nSnowflakes and mistletoe\n[Verse 2]\nGrandma’s singing a little off-key\nThe kids are laughing too loud\nThe dog’s stolen a turkey leg\nChaos is a Christmas crowd\n[Prechorus]\nBut the fire’s crackling\nWarm and bright\nAnd my heart’s a candle tonight\n[Chorus]\nSnowflakes and mistletoe\nEverywhere I go\nI know\nLove is the gift\nThe glow\nSnowflakes and mistletoe","audio_url":"","video_url":"","created_at":"2025-12-13T11:29:25.101Z","model":"chirp-v5","state":"pending","prompt":"A song for Christmas","style":"uplifting, orchestral with bells and acoustic guitar"}]}
{"success":true,"task_id":"1af4b454-ce84-4512-a0a2-de3f8574ecd8","trace_id":"4440342a-41c4-4140-8bb1-3537a598ca2e","data":[{"id":"1f610752-f426-4fd5-89a8-ba2ad0370881","title":"Snowflakes and Mistletoe","image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-073","image_large_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-074","lyric":"[Verse]\nLights are tangled on the tree again\nThe cat’s knocked over the wreath\nCookies burning in the oven too\nBut I’m still grinning through my teeth\n[Prechorus]\nSnow is falling like glitter in the sky\nI’ve got a feeling this year’s gonna fly\n[Chorus]\nSnowflakes and mistletoe\nEverywhere I go\nI know\nLove is the gift\nThe glow\nSnowflakes and mistletoe\n[Verse 2]\nGrandma’s singing a little off-key\nThe kids are laughing too loud\nThe dog’s stolen a turkey leg\nChaos is a Christmas crowd\n[Prechorus]\nBut the fire’s crackling\nWarm and bright\nAnd my heart’s a candle tonight\n[Chorus]\nSnowflakes and mistletoe\nEverywhere I go\nI know\nLove is the gift\nThe glow\nSnowflakes and mistletoe","audio_url":"https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3","video_url":"","created_at":"2025-12-13T11:29:25.101Z","model":"chirp-v5","state":"succeeded","prompt":"A song for Christmas","style":"uplifting, orchestral with bells and acoustic guitar","duration":129.92},{"id":"d1a3109d-799b-401e-b032-4b501bcf26f3","title":"Snowflakes and Mistletoe","image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-075","image_large_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-076","lyric":"[Verse]\nLights are tangled on the tree again\nThe cat’s knocked over the wreath\nCookies burning in the oven too\nBut I’m still grinning through my teeth\n[Prechorus]\nSnow is falling like glitter in the sky\nI’ve got a feeling this year’s gonna fly\n[Chorus]\nSnowflakes and mistletoe\nEverywhere I go\nI know\nLove is the gift\nThe glow\nSnowflakes and mistletoe\n[Verse 2]\nGrandma’s singing a little off-key\nThe kids are laughing too loud\nThe dog’s stolen a turkey leg\nChaos is a Christmas crowd\n[Prechorus]\nBut the fire’s crackling\nWarm and bright\nAnd my heart’s a candle tonight\n[Chorus]\nSnowflakes and mistletoe\nEverywhere I go\nI know\nLove is the gift\nThe glow\nSnowflakes and mistletoe","audio_url":"https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3","video_url":"","created_at":"2025-12-13T11:29:25.101Z","model":"chirp-v5","state":"succeeded","prompt":"A song for Christmas","style":"uplifting, orchestral with bells and acoustic guitar","duration":127.16}]}

串流回應會為同一個 task_id 依序推送處理中狀態和最終結果;上面僅保留首次與最終狀態兩筆真實回應,省略重複的中間更新。

錯誤處理

如果發生錯誤,您將得到類似如下的錯誤訊息:

{
  "success": false,
  "error": {
    "code": "forbidden",
    "message": "Song Description contained artist name: eminem"
  },
  "trace_id": "9bb7c2f4-3b7b-4965-b50a-f663874b1b6f",
  "task_id": "9bb3a2a6-c438-436d-a9f3-fa466abc077c"
}

下面是 HTTP 狀態碼、error.code、error.message 的列表:

style 長度限制隨模型而異;若回傳長度錯誤,請縮短內容,並以回應中的限制為準。 | 狀態碼 | error.code | error.message | | ------ | ----------------------------- | -------------------------------------------------------------------------- | | 400 | bad_request | 歌曲 ID 不存在或已下架。 | | 400 | bad_request | 提示詞過長。 | | 400 | bad_request | 標籤過長。 | | 400 | bad_request | 上傳的音訊與現有作品相符。 | | 400 | bad_request | instrumental 必須是布林值 | | 400 | bad_request | 標題過長。 | | 400 | bad_request | 主題過長。 | | 400 | bad_request | style 必須小於或等於 120 | | 400 | bad_request | custom 必須是布林值 | | 400 | bad_request | 延長音訊時必須提供 audio_id | | 400 | bad_request | 延長音訊時必須提供 continue_at | | 400 | bad_request | continue_at 必須是大於 0 的數字 | | 400 | bad_request | 延長音訊且 instrumental 為 false 時必須提供 lyric | | 400 | bad_request | 產生音訊時必須提供 prompt | | 400 | bad_request | 產生自訂音訊時必須提供 lyric | | 403 | forbidden | 提示詞格式可能有誤 | | 403 | forbidden | 提示詞可能受著作權保護 | | 403 | forbidden | 提示詞包含不適當的內容 | | 403 | forbidden | 歌曲描述被標記為需要審核 | | 403 | forbidden | 歌曲描述包含藝人名稱 | | 403 | forbidden | 標籤包含藝人名稱 | | 403 | forbidden | 歌詞包含受著作權保護的內容 | | 403 | forbidden | 歌曲描述包含製作人標籤 | | 403 | forbidden | 一般 OpenAI 錯誤 | | 403 | forbidden | 提示詞被標記為需要審核 | | 429 | too_many_requests | 請求過多。請稍後再試。 | | 500 | api_error | 無法根據歌曲描述產生歌詞 | | 500 | api_error | 工作因未知錯誤而失敗 | | 500 | api_error | 服務維護中,產生作業已暫停 | | 500 | api_error | 帳號可能已離線 | | 500 | suno_processing_unavailable | 音樂處理服務無法使用。請提供追蹤 ID 並聯絡支援團隊。 | | 500 | suno_model_unavailable | 所選模型無法用於此操作。請提供追蹤 ID 並聯絡支援團隊。 | | 500 | suno_processing_failed | 音樂處理未傳回音訊。請提供追蹤 ID 並聯絡支援團隊。 | | 504 | timeout | 等待音訊產生時逾時 |

對於明確尚未受理的暫時限流,平台可能在本次請求的時間預算內等待後進行有限次數的重試。若最終仍回傳 429(too_many_requests),請稍後再試;失敗的請求不收費。

使用 async=true 或 callback_url 時,收到 task_id 僅表示任務已建立,不代表產生成功。請透過回呼或 Suno Tasks API 確認原任務的最終結果;在終態明確前不要重複提交,以免建立重複任務。