Suno 歌曲生成 API 對接說明

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

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

失敗結果與重試

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

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

模型選擇

目前推薦以下 V6 系列模型。

Suno 官網 API model 適用情境
v6 chirp-v6(預設) 通用歌曲生成和編輯
v6-wild chirp-v6-wild 實驗性曲風與配器
v6-mini chirp-v6-mini 快速迭代創作想法

官網在 Create → Songs 的右上角選擇模型。

Suno 官網創作頁的 V6 模型選單

現有整合仍可使用原型號,成功後沿用原費率。羲云科技提供下文所述的 Suno 歌曲生成與編輯 API。

準備歌曲請求

登入應用程式列表,開啟通用應用程式並複製 API KEY。在 Suno 歌曲偵錯頁面可以直接選擇應用程式;在自己的程式碼裡將複製的值填入 Authorization: Bearer {token}。使用受限金鑰提交非同步歌曲時,還需要開放任務查詢介面。 範例中的 API_KEY 是應用程式金鑰。程式碼裡出現的 audio_id 和 persona_id 請換成你自己的資源 ID。

下面的歌曲 JSON 為對應操作的真實最終狀態節錄。部分回應只展示歌詞開頭和部分媒體欄位。用 async: true 或 callback_url 提交時,先拿到 task_id,再透過回呼或任務查詢讀取最終狀態。

基本使用

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

這對應 Suno 官網 Create → Songs → Simple 中填寫歌曲描述後點擊 Create。

Suno 官網 Simple 模式中填入 A song for Christmas 後的 Create 表單

呼叫羲云科技 API 時,設定以下請求標頭和請求本文。請求標頭包括:

  • 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,預設為 chirp-v6。
  • 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:自訂模式的歌詞內容,V6 系列最多 5000 字元。
  • custom:是否採用自訂模式,預設為:false。
  • instrumental:Suno 官方的靈感模式的純音樂選項。
  • title:自訂模式的音樂標題,最多 100 字元。
  • style:自訂模式的音樂風格,最多 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。實際演唱以成品為準。
  • 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。

續寫或翻唱前可用 POST /suno/availability 檢查來源歌曲或私人音色。檢查只需一個 UUID,私人素材使用建立時的應用程式和呼叫者身分。 可用性檢查指南

進階參數適用範圍

參數 取值 支援的 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 支援人聲控制的生成操作 偏好項,不保證嚴格遵循

平台會驗證參數類型和數值範圍。各參數的適用操作見上表,效果取決於操作、模式和模型。

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

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

生成的程式碼如下:

curl -sS -X POST 'https://api.acedata.cloud/suno/audios' \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
  "action": "generate",
  "model": "chirp-v6",
  "prompt": "A song for Christmas"
}'

也可以在除錯頁面點擊「Try」直接測試 API。以下是使用 V6 生成的兩首歌曲的最終狀態節錄。

{
  "success": true,
  "task_id": "c409f30d-4b2f-4ad9-8ae7-f394e367713d",
  "trace_id": "f9ff7920-2b74-4c69-867b-183cd41166fa",
  "data": [
    {
      "id": "15b56d7a-1ad1-4dc6-bc74-79b102caceeb",
      "title": "Room for One More Chair",
      "lyric": "[Verse 1]\nThe kettle sings, the window steams\nA paper chain hangs slightly crooked\nYou set the old tin on the shelf\nAnd laugh at how the years have kept it",
      "audio_url": "https://cdn.acedata2.cloud/suno/15b56d7a-1ad1-4dc6-bc74-79b102caceeb.mp3",
      "created_at": "2026-12-01T09:02:22.466Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "A song for Christmas",
      "style": "Cinematic Christmas pop with film-score scale, a steady four-on-the-floor pulse, driving syncopated percussion, and a repeating cello ostinato. Begin with intimate piano and close, warm lead vocals; build through layered strings, brass swells, and wordless choir accents into a wide, uplifting final chorus. Polished, spacious mix with clear vocal focus and dynamic section lifts.",
      "duration": 231.96
    },
    {
      "id": "555bf85a-907c-4573-b6f3-e816c04aabb9",
      "title": "Always Room for More",
      "lyric": "[Intro]\n[Wordless vocals]\nOh—ah, oh—ah\n[Verse 1]\nSnow gathers softly on the windowpane",
      "audio_url": "https://cdn.acedata2.cloud/suno/555bf85a-907c-4573-b6f3-e816c04aabb9.mp3",
      "created_at": "2026-12-01T09:02:22.466Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "A song for Christmas",
      "style": "Cinematic Christmas pop with marathon-film scale, syncopated rhythmic drive, cello ostinato, four-on-the-floor pulse, and wordless vocal drops. Begin with a restrained cello figure and distant wordless voices; build into a broad, uplifting chorus with layered strings, punchy percussion, and a clear lead vocal. Use a brief countdown-style dropout before the final chorus, then finish with a full, resolved orchestral-pop ending. Polished, spacious mix with strong low-end and crisp rhythmic detail.",
      "duration": 231.2
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

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

欄位說明如下:

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

自訂生成

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

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

[Verse]
Window lights across the bay
Guide the boats that drift away
[Chorus]
Bring the morning home to me
Fold the stars into the sea

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

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

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

對應官網 Create → Songs → Advanced。把歌詞填入 Lyrics,曲風填入 Styles,再設定歌曲標題。

Suno 官網 Advanced 模式中填入範例的 Window Lights 歌詞

Suno 官網 Advanced 模式中填入範例曲風和歌名

對應的程式碼:

curl -sS -X POST 'https://api.acedata.cloud/suno/audios' \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
  "action": "generate",
  "model": "chirp-v6",
  "custom": true,
  "title": "Window Lights",
  "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
  "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea"
}'

在官網創作完成後,可以在 My Songs 試聽兩首候選歌曲。圖中是官網生成的兩首 Window Lights。後面的 JSON 是羲云科技 API 獨立實測的回應。 Suno 官網 My Songs 中獨立生成的兩首 Window Lights

{
  "success": true,
  "task_id": "f87a3222-b5f6-4bc6-8324-1923e8349478",
  "trace_id": "f5490512-610e-4335-947c-fdee98bb415a",
  "data": [
    {
      "id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32",
      "title": "Window Lights",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/3f8c1800-7a96-4a2b-811f-5fee716a9e32.mp3",
      "created_at": "2026-11-30T17:50:09.196Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
      "duration": 47.6
    },
    {
      "id": "ebafbeeb-9bdb-4b28-9c03-6a09734ba6df",
      "title": "Window Lights",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/ebafbeeb-9bdb-4b28-9c03-6a09734ba6df.mp3",
      "created_at": "2026-11-30T17:50:09.196Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
      "duration": 43.32
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

自訂歌手風格生成功能

先生成要參考的歌曲,再呼叫 POST /suno/persona。傳入該歌曲的 audio_id 和角色名稱 name,可選填 description。回應會給出 persona_id。 Suno Persona API

對應的 Python 程式碼:

import os

import requests

url = "https://api.acedata.cloud/suno/persona"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "name": "Window Lights style",
    "description": "Soft acoustic folk, fingerpicked guitar and brushed drums",
    "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32",
}

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

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

{
  "success": true,
  "task_id": "e36f2c78-f333-4f84-ad23-a371ff73df6d",
  "data": {
    "persona_id": "1787f427-02ea-4e5c-8b88-458779881804"
  }
}

在下一個歌曲請求中,把上一步回傳的 data.persona_id 填入 persona_id,再把用於建立角色的歌曲 ID 填入 audio_id。一般風格角色使用 artist_consistency。從人聲片段建立的 VOX 角色使用 artist_consistency_vox。 VOX 人聲片段

在官網為創作新增已有角色時,透過 Advanced → + Voice → My Voices 開啟選擇面板。截圖展示這個入口。

Suno 官網 Advanced 中開啟 My Voices 的選擇面板

對應的 Python 程式碼:

import os

import requests

url = "https://api.acedata.cloud/suno/audios"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "artist_consistency",
    "model": "chirp-v6",
    "persona_id": "1787f427-02ea-4e5c-8b88-458779881804",
    "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32",
    "custom": True,
    "style": "Soft acoustic folk",
    "lyric": "[Chorus]\nBlue boats glide beyond the bay",
}

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

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

{
  "success": true,
  "task_id": "540f43fd-a229-4644-b693-dd9727700462",
  "trace_id": "98ac0837-b64e-498d-92ce-51ceddcd9007",
  "data": [
    {
      "id": "9e5030c7-233c-4521-8e93-f008ee583a97",
      "title": "Blue Boats",
      "lyric": "[Chorus]\nBlue boats glide beyond the bay",
      "audio_url": "https://cdn.acedata2.cloud/suno/9e5030c7-233c-4521-8e93-f008ee583a97.mp3",
      "created_at": "2026-11-30T18:14:21.715Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk",
      "duration": 40.72
    },
    {
      "id": "cf72ce86-1816-4efb-94a6-6f4aded1c83d",
      "title": "Blue Boats",
      "lyric": "[Chorus]\nBlue boats glide beyond the bay",
      "audio_url": "https://cdn.acedata2.cloud/suno/cf72ce86-1816-4efb-94a6-6f4aded1c83d.mp3",
      "created_at": "2026-11-30T18:14:21.715Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk",
      "duration": 20
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

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

繼續生成功能

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

{
  "id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32"
}

這裡的 id 是生成後歌曲的 ID,可以從前面範例的 data[] 取出。 如果想對自己上傳的歌曲繼續生成,就設 action 為 upload_extend。所需歌曲 ID 從上傳回應中的 data.audio_id 取得。 Suno 上傳生成 API

{
  "success": true,
  "task_id": "7f995f02-e4ab-4ad8-adfd-584a1d70c745",
  "data": {
    "audio_id": "a6dbc2ab-a2ab-4c32-a7fb-2cfa7abd122d"
  }
}

需要續寫指定歌詞時,填寫續寫片段的歌詞,並可指定風格。

  • 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 之前的原歌詞仍不會被取代。

官網選擇 Edit → Extend。拖曳波形選擇續寫起點,波形下方的 Extend from 對應 continue_at。

Suno 官網 Extend 表單選擇 36.6 秒作為續寫起點

下面的 API 請求範例從原曲第 36.5 秒開始續寫。

對應的 Python 程式碼:

import os

import requests

url = "https://api.acedata.cloud/suno/audios"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "extend",
    "model": "chirp-v6",
    "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32",
    "continue_at": 36.5,
    "custom": True,
    "lyric": "[Outro]\nCarry one more light for me\nHome across the quiet sea",
    "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
}

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

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

{
  "success": true,
  "task_id": "21085c89-c028-4386-84b1-7653f009d56a",
  "trace_id": "fe072f90-0ceb-457b-837b-4765367f1516",
  "data": [
    {
      "id": "aaed0954-f055-49b4-9b93-5776179a7d9c",
      "lyric": "[Outro]\nCarry one more light for me\nHome across the quiet sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/aaed0954-f055-49b4-9b93-5776179a7d9c.mp3",
      "created_at": "2026-11-30T18:05:01.698Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
      "duration": 41.92
    },
    {
      "id": "c12c00d4-1211-406a-8658-af6c3029f3b9",
      "lyric": "[Outro]\nCarry one more light for me\nHome across the quiet sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/c12c00d4-1211-406a-8658-af6c3029f3b9.mp3",
      "created_at": "2026-11-30T18:05:01.698Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
      "duration": 41.6
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

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

上傳後的續寫使用 upload_extend。保留相同的 continue_at、歌詞與風格填寫方式,將 audio_id 換成上傳回傳的 data.audio_id。

{
  "action": "upload_extend",
  "model": "chirp-v6",
  "audio_id": "a6dbc2ab-a2ab-4c32-a7fb-2cfa7abd122d",
  "continue_at": 36.5,
  "custom": true,
  "lyric": "[Outro]\\nCarry one more light for me\\nHome across the quiet sea",
  "style": "Soft acoustic folk"
}

上傳後續寫的最終狀態節錄。

{
  "success": true,
  "task_id": "7fc1c79b-72d2-4697-a18e-caf6fee7d22c",
  "trace_id": "fa320093-4e8e-4eba-89eb-610ad31cd271",
  "data": [
    {
      "id": "8cb590ab-c3e4-4179-b3ad-773b4eba4c32",
      "audio_url": "https://cdn.acedata2.cloud/suno/8cb590ab-c3e4-4179-b3ad-773b4eba4c32.mp3",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 45.4
    },
    {
      "id": "112ec6d7-df1a-40ca-b295-967a9cb747b4",
      "audio_url": "https://cdn.acedata2.cloud/suno/112ec6d7-df1a-40ca-b295-967a9cb747b4.mp3",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 33.16
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

取得完整歌曲

請先試聽 extend 的回傳結果,並核對實際長度。有些結果已經包含 continue_at 之前保留的部分和後續新內容。若回傳獨立續寫片段,或者需要明確合併多次續寫,再使用下方拼接功能。

  • action:內容為 concat。
  • audio_id:最後一個續寫片段的 ID。 官網從已生成的續寫候選中開啟 ⋯ → Create → Get Whole Song。API 使用所選續寫片段的 ID。範例選用 aaed0954-f055-49b4-9b93-5776179a7d9c。 Suno 續寫說明
{
  "action": "concat",
  "model": "chirp-v6",
  "audio_id": "aaed0954-f055-49b4-9b93-5776179a7d9c"
}

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

{
  "success": true,
  "task_id": "7f74f719-18ed-4605-b345-e93dd671e384",
  "trace_id": "3cf0e5da-47ca-4c41-9c4b-98c721684879",
  "data": [
    {
      "id": "1e2411b4-1a0c-4e83-87d4-c968c62a7e19",
      "title": "Window Lights",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea\n[Outro]\nCarry one more light for me\nHome across the quiet sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/1e2411b4-1a0c-4e83-87d4-c968c62a7e19.mp3",
      "created_at": "2026-11-30T18:11:42.286Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
      "duration": 78.4
    }
  ],
  "cost": {
    "amount": 0.036,
    "currency": "credit",
    "list_amount": 0.04
  }
}

音樂翻版

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

在官網成品選單選擇 Remix → Cover。本機音訊先在 + Audio → Upload 匯入,再進行翻唱。

Suno 官網選取 Cover 後的參考歌曲和波形

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

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

例如來源歌曲 ID 是 3f8c1800-7a96-4a2b-811f-5fee716a9e32,那麼可以設定參數如下。可以用 prompt 指定變化方向。

{
  "action": "cover",
  "model": "chirp-v6",
  "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32",
  "prompt": "Reimagine this acoustic folk song as soft bossa nova."
}

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

{
  "success": true,
  "task_id": "475cee66-4cde-4a41-936a-4025587a55ab",
  "trace_id": "5b961fe5-e712-4264-8a26-5465d7636cd9",
  "data": [
    {
      "id": "a743e000-516a-4416-826b-086b61e1907c",
      "title": "Mango Peel Moon",
      "lyric": "[Verse 1]\nYou left your cup by the sink\nHalf a lime in the glass\nI saw your shirt on the chair\nAnd the morning move too fast",
      "audio_url": "https://cdn.acedata2.cloud/suno/a743e000-516a-4416-826b-086b61e1907c.mp3",
      "created_at": "2026-11-30T18:05:01.716Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "Reimagine this acoustic folk song as soft bossa nova.",
      "style": "Soft bossa nova with brushed syncopation, nylon-string guitar, upright bass, and light shaker; verse rides close-mic and conversational, pre-chorus opens with a breathy lift and subtle harmony, chorus lands on a warm repeated hook with soft gang doubles. Gentle conga taps, piano grace notes, and a small tape-wobble transition before the bridge. Intimate, warm, and silky in the mix., acoustic, folk, bossa nova, soft",
      "duration": 222.48
    },
    {
      "id": "8520edee-3678-4533-bcb7-deda59c5807c",
      "title": "Mango Peel Moon",
      "lyric": "[Verse 1]\nYou left your cup by the sink\nHalf a lime in the glass\nI saw your shirt on the chair\nAnd the morning move too fast",
      "audio_url": "https://cdn.acedata2.cloud/suno/8520edee-3678-4533-bcb7-deda59c5807c.mp3",
      "created_at": "2026-11-30T18:05:01.716Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "Reimagine this acoustic folk song as soft bossa nova.",
      "style": "Soft bossa nova with brushed syncopation, nylon-string guitar, upright bass, and light shaker; verse rides close-mic and conversational, pre-chorus opens with a breathy lift and subtle harmony, chorus lands on a warm repeated hook with soft gang doubles. Gentle conga taps, piano grace notes, and a small tape-wobble transition before the bridge. Intimate, warm, and silky in the mix., acoustic, folk, bossa nova, soft",
      "duration": 212.76
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

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

翻唱上傳音訊時,可以使用以下請求和上傳結果的 audio_id。

{
  "action": "upload_cover",
  "model": "chirp-v6",
  "audio_id": "a6dbc2ab-a2ab-4c32-a7fb-2cfa7abd122d",
  "prompt": "Acoustic ballad with warm cello and soft vocals"
}

上傳後翻唱的最終狀態節選。

{
  "success": true,
  "task_id": "d3f33f44-6abe-4429-84e7-b7a01933711f",
  "trace_id": "bf5f5bf1-494a-4520-a70b-b3cb1145e2f9",
  "data": [
    {
      "id": "305ee2e5-a06c-46e7-9bad-bebc5010f0a5",
      "title": "Hands On The Rail",
      "audio_url": "https://cdn.acedata2.cloud/suno/305ee2e5-a06c-46e7-9bad-bebc5010f0a5.mp3",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 214.8
    },
    {
      "id": "20eafedb-f0ec-4440-adcb-32d815b70824",
      "title": "Hands On The Rail",
      "audio_url": "https://cdn.acedata2.cloud/suno/20eafedb-f0ec-4440-adcb-32d815b70824.mp3",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 257.6
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

替換片段

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

在 Suno 官網選擇 Edit → Replace section,在波形上選取要替換的區間。波形下方的兩個時間欄位對應 replace_section_start 和 replace_section_end。

Suno 官網 Replace section 表單中的 6.5 到 16.5 秒示範選取區間

輸入怎麼填

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

發起任務並取得完整歌曲

以下實測範例選取 8.5 秒到 16.5 秒的區間。請將 audio_id 和起訖時間換成自己試聽後確認的完整歌曲與選取區間。

{
  "action": "replace_section",
  "model": "chirp-v6",
  "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32",
  "replace_section_start": 8.5,
  "replace_section_end": 16.5,
  "lyric": "Blue boats glide beyond the bay",
  "prompt": "Blue boats glide beyond the bay",
  "async": true
}

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

預設模式的兩首完整歌曲實測節錄。

{
  "success": true,
  "task_id": "8616c06a-2b00-4c0e-be1d-42b529783cd4",
  "trace_id": "2219245a-188a-4b92-b852-4d4ec2a09ff9",
  "data": [
    {
      "id": "cc1074ab-16a5-4dc6-bfe0-5f993094e536",
      "title": "Window Lights",
      "lyric": "[Verse]\nBlue boats glide beyond the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/cc1074ab-16a5-4dc6-bfe0-5f993094e536.mp3",
      "created_at": "2026-11-30T18:12:12.903Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
      "duration": 46.4
    },
    {
      "id": "4930f34e-2ce5-41c5-b318-3e28eefe2cde",
      "title": "Window Lights",
      "lyric": "[Verse]\nBlue boats glide beyond the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/4930f34e-2ce5-41c5-b318-3e28eefe2cde.mp3",
      "created_at": "2026-11-30T18:12:13.509Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
      "duration": 47.6
    }
  ],
  "cost": {
    "amount": 0.72,
    "currency": "credit",
    "list_amount": 0.8
  }
}

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

  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 按各自價格計費。

在官網選擇 Edit → Get stems,開啟 Extract Stems and MIDI。透過 API 只需拆出人聲和伴奏時使用 stems,需要更多獨立樂器音軌時使用下面的 all_stems。

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

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

例如,使用原曲 3f8c1800-7a96-4a2b-811f-5fee716a9e32 發起分離請求。

{
  "action": "stems",
  "model": "chirp-v6",
  "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32"
}

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

{
  "success": true,
  "task_id": "269799ed-e450-44ae-a3cc-491f3073e604",
  "trace_id": "39c95376-0fda-4453-969d-fa72a3b6c722",
  "data": [
    {
      "id": "316898fd-a7ac-4c2a-9190-7a88aa02fcaa",
      "title": "(Vocals)",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/316898fd-a7ac-4c2a-9190-7a88aa02fcaa.mp3",
      "created_at": "2026-11-30T18:05:01.768Z",
      "state": "succeeded",
      "duration": 47.6
    },
    {
      "id": "08cc9c7a-9014-4c16-8f3f-d1d449673d2b",
      "title": "(Instrumental)",
      "audio_url": "https://cdn.acedata2.cloud/suno/08cc9c7a-9014-4c16-8f3f-d1d449673d2b.mp3",
      "created_at": "2026-11-30T18:05:01.768Z",
      "state": "succeeded",
      "duration": 47.6
    },
    {
      "id": "86718589-8382-49d7-8aae-0656b6da3a1d",
      "title": "(Vocals)",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/86718589-8382-49d7-8aae-0656b6da3a1d.mp3",
      "created_at": "2026-11-30T18:05:01.768Z",
      "state": "succeeded",
      "duration": 47.6
    },
    {
      "id": "bb125c17-cbf4-46e1-b48b-f457bea9f389",
      "title": "(Instrumental)",
      "audio_url": "https://cdn.acedata2.cloud/suno/bb125c17-cbf4-46e1-b48b-f457bea9f389.mp3",
      "created_at": "2026-11-30T18:05:01.768Z",
      "state": "succeeded",
      "duration": 47.6
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

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

全音軌人聲與伴奏分離

官網在 Extract Stems and MIDI 彈出視窗中選擇 Auto split,對應自動拆分多條獨立音軌的情境。

Suno 官網全音軌分離選取 Auto split 的介面

任務會等待全部音軌生成完成後才回傳成功終態。處理中出現可播放網址不代表整組音軌已經完成。 全音軌分離每次成功請求的標準費用為 1.6 Credits。處理中已經顯示試聽網址時,也需要等任務完成再取得整組音軌。

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

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

例如,使用來源歌曲 3f8c1800-7a96-4a2b-811f-5fee716a9e32 分離所有音軌。所選音軌的 data[].id 可作為 MIDI 擷取的輸入。 MIDI 擷取

{
  "action": "all_stems",
  "model": "chirp-v6",
  "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32"
}

透過以上參數即可得到所有音軌的人聲與樂曲分離結果,結果如下:

  "success": true,
  "task_id": "36358e35-a2d5-4406-82a3-8ff9636c8959",
  "trace_id": "012a7311-f7cd-40c8-8939-aa682249bcad",
  "data": [
    {
      "id": "72707f4d-d3fd-4c90-a0ca-696480666842",
      "title": "(Vocals)",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/b0bf4d5fafce804a93ac0f7ad9c64dd75ea09ea0ae934d01fefba1bff2eb1eee.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "41852f08-1d98-4cc6-b3a7-8438580cb2fb",
      "title": "(Backing Vocals)",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/28a43f6215fd8bcf13b17c591d6d465ce0227349e9a4d8ea4a624f715549f396.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "57e07045-43bb-40b3-9989-d57e0083339e",
      "title": "(Drums)",
      "audio_url": "https://cdn.acedata2.cloud/suno/c2058a6a6844a72a4a80fe1b90bbe4596342f1dc417a882d5045f3626615d8d9.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "b568865b-57e1-4bc5-a541-5f652419b84f",
      "title": "(Bass)",
      "audio_url": "https://cdn.acedata2.cloud/suno/3f840e1be98c3166b841519c9de967dd8985be22aa7cf578cbb9b198265e6d5d.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "b241d1f8-3141-4772-8bb3-4ca007258e14",
      "title": "(Guitar)",
      "audio_url": "https://cdn.acedata2.cloud/suno/9a01856b7df6f1198f07009de62178fcf96a331d7b544401085971e7dae0a113.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "f34e809a-ce8e-4724-9bcf-0b6fad45966c",
      "title": "(Keyboard)",
      "audio_url": "https://cdn.acedata2.cloud/suno/1e4eda67c22c42a88ad20200d6f293f95e319c4607cb8ef4067a47d235991beb.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "8c9c14c8-c243-4794-ad33-147f31b76fde",
      "title": "(Percussion)",
      "audio_url": "https://cdn.acedata2.cloud/suno/5eb662d60f36f71f1860ec7852174254807e089601c42887a3ccb5f1db7b7c64.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "648491b5-6294-4010-b35d-a638f2dc285f",
      "title": "(Strings)",
      "audio_url": "https://cdn.acedata2.cloud/suno/2997d2534a1395e74c10a0039895d76665397d8fd186a297324270d482fef656.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "a8e86ddb-8e35-44c2-a61c-0b72f0c5bc08",
      "title": "(Synth)",
      "audio_url": "https://cdn.acedata2.cloud/suno/4efddd81cd03b51e9f8c28a4af78ee2bba0d8ff8bb2f159b2ff9d17cdd7c966f.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "49f363d9-769e-4e96-8651-9e5b3ae85361",
      "title": "(FX)",
      "audio_url": "https://cdn.acedata2.cloud/suno/75457e8ee8d89b44035ca069668cb39e402e91cec772dbef02b196981c81f5bd.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "16a6f2b1-7add-40a9-b746-321f92005991",
      "title": "(Brass)",
      "audio_url": "https://cdn.acedata2.cloud/suno/8fd176374ef70383edfaaacd22de3cc8737d029393283cb3167e6d1fa68322f1.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "5fcddae2-d081-47e3-847c-61c69851bdfe",
      "title": "(Woodwinds)",
      "audio_url": "https://cdn.acedata2.cloud/suno/df44088f262c58ba6edee0216450dc71533f682f9d4a77865916c28f6fa03cbb.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    },
{
      "id": "9372a7d2-5e62-430a-a243-2a44ee25f24d",
      "title": "(Vocals)",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/9ce56fd9ab3f403cd1e4db565e1c400400e4a1c3318c48d780286bcfbc1066c1.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "1556bc3d-56de-4c62-878e-9f9d1d1872a1",
      "title": "(Backing Vocals)",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/e60e61f565f8b1b24517881ac7992f61ad4d8d517965907151289bc1fde1f8df.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "aa280b4c-27b3-4e6a-ad55-f1fc1e0b139f",
      "title": "(Drums)",
      "audio_url": "https://cdn.acedata2.cloud/suno/72c5145ed4ec2963be8b5ce76c44462d63add6f899deae610901ae89910d3c25.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "6e7bc012-82d3-4320-9584-65d3c7c7acd1",
      "title": "(Bass)",
      "audio_url": "https://cdn.acedata2.cloud/suno/6beac0c0ad82ea676c31787de84ff2c51d1ef944bd8c772204b84ce37eadb880.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "a45c3d09-122c-419a-a78c-5cf8888c6513",
      "title": "(Guitar)",
      "audio_url": "https://cdn.acedata2.cloud/suno/824dd2be231d01a36c5e6a9230636f7890034e47408c40cdb7a126450b98fbff.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "4b57e164-b18b-4488-abc9-fd5fc1d1282a",
      "title": "(Keyboard)",
      "audio_url": "https://cdn.acedata2.cloud/suno/222495df0dc443ad4fa5a70db7d20f67ee044ed2a687e33ddd943496539ec217.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "44ff0ac0-df04-4910-ba19-198511d289a4",
      "title": "(Percussion)",
      "audio_url": "https://cdn.acedata2.cloud/suno/d07ba9228004a8e77d8e1b847067094fa64aef81fa7dcaf19ab97dd600d6045d.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "c25fa87b-d2ad-43a5-8fcc-33c30bfafd87",
      "title": "(Strings)",
      "audio_url": "https://cdn.acedata2.cloud/suno/52e8146f16a787522c9f1bcdc53312768a5a1d109a1107b1875cabd958d0c083.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "d9de2c63-894e-4f6f-af6e-419aff8a9c4a",
      "title": "(Synth)",
      "audio_url": "https://cdn.acedata2.cloud/suno/d691e4e4c43c323f600d0d86e4867497bb15ee5950b8d636ad59f6127a6a3628.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "beaeb6d8-6145-423b-a2ac-5cd89eba88a3",
      "title": "(FX)",
      "audio_url": "https://cdn.acedata2.cloud/suno/624952ce80227d3b9f5b0d4a9b6e662ccf6af9a486a5b3dc8910201916888cd1.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "3f8c3548-7f59-4ca4-a5f8-35d4e9cd41a0",
      "title": "(Brass)",
      "audio_url": "https://cdn.acedata2.cloud/suno/ce61374a0b7377815345e7eeb0d6132be3ed3c1a02a22a4e809a5702bdba9114.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }, {
      "id": "2ea4d9e2-1836-4dcc-ab4d-786e019f8b03",
      "title": "(Woodwinds)",
      "audio_url": "https://cdn.acedata2.cloud/suno/cade07b8d2b55bfe76e8789e17951997b6bf4c5f9089a21573598992c712e19b.mp3",
      "created_at": "2026-11-30T18:05:02.631Z",
      "state": "succeeded",
      "duration": 47.6
    }
  ],
  "cost": {
    "amount": 1.44,
    "currency": "credit",
    "list_amount": 1.6
  }
}

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

新增音軌

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

Suno Studio 官網教學示範了在時間軸底部新增音軌,再用 Create 為已有編曲產生一個新樂器軌。Suno Studio 教學

  • 必填:action、audio_id、stem_type。 stem_type 可填 vocals、backing_vocals、drums、bass、guitar、keyboard、percussion、strings、synth、fx、brass 或 woodwinds。擷取指定音軌時也使用這些值。

  • 可選: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",
  "model": "chirp-v6",
  "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32",
  "stem_type": "strings",
  "prompt": "Quiet cello counter-melody",
  "async": true
}

終態回應:

{
  "success": true,
  "task_id": "af1493f7-18d1-4027-a1a1-79b8443c9349",
  "trace_id": "2c1bc14e-df12-4ed4-b505-39c821b9d878",
  "data": [
    {
      "id": "280c819e-eb70-4e3c-b57e-749597771d30",
      "title": "Cello Counter-Melody",
      "lyric": "Quiet cello counter-melody",
      "audio_url": "https://cdn.acedata2.cloud/suno/280c819e-eb70-4e3c-b57e-749597771d30.mp3",
      "created_at": "2026-11-30T18:05:01.740Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 48
    },
    {
      "id": "6e419425-9892-4fce-b44b-3884db5db7d5",
      "title": "Cello Counter-Melody",
      "lyric": "Quiet cello counter-melody",
      "audio_url": "https://cdn.acedata2.cloud/suno/6e419425-9892-4fce-b44b-3884db5db7d5.mp3",
      "created_at": "2026-11-30T18:05:01.740Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 47.6
    }
  ],
  "cost": {
    "amount": 0.6048,
    "currency": "credit",
    "list_amount": 0.672
  }
}

擷取音軌

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

官網在 Extract Stems and MIDI 彈出視窗中選擇 Split from mix,再選擇要擷取的音軌。圖中以主唱為例,右側顯示剩餘混音。

Suno 官網 Split from mix 選中 Lead Vocal 並顯示其餘混音

  • 必填:action、audio_id、stem_type。
  • 可選:audio_format,目前公開雙通道契約僅支援 mp3。
  • 計費:1.12 Credits。
{
  "action": "extract_stem",
  "model": "chirp-v6",
  "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32",
  "stem_type": "vocals",
  "audio_format": "mp3",
  "async": true
}

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

{
  "success": true,
  "task_id": "fa4e30e0-0aff-4387-8cb1-1cbeaecb3af3",
  "trace_id": "47310496-7818-4e8c-b90d-8b0bcf683351",
  "data": [
    {
      "id": "74744dc1-3d94-4dca-b5bd-7fbb90559c1e",
      "title": "(Vocals)",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/74744dc1-3d94-4dca-b5bd-7fbb90559c1e.mp3",
      "created_at": "2026-11-30T18:05:02.527Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 47.6,
      "stem_set": 1
    },
    {
      "id": "dcd7249a-0cac-40f5-a354-c3974447831a",
      "title": "(Instrumental)",
      "audio_url": "https://cdn.acedata2.cloud/suno/dcd7249a-0cac-40f5-a354-c3974447831a.mp3",
      "created_at": "2026-11-30T18:05:02.527Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 47.6,
      "stem_set": 1
    },
    {
      "id": "505d4be6-7412-413a-8651-dd545f3a7cbf",
      "title": "(Vocals)",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/505d4be6-7412-413a-8651-dd545f3a7cbf.mp3",
      "created_at": "2026-11-30T18:05:02.527Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 47.6,
      "stem_set": 2
    },
    {
      "id": "96dbed16-4559-45d1-b5a7-356646217ec5",
      "title": "(Instrumental)",
      "audio_url": "https://cdn.acedata2.cloud/suno/96dbed16-4559-45d1-b5a7-356646217ec5.mp3",
      "created_at": "2026-11-30T18:05:02.527Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 47.6,
      "stem_set": 2
    }
  ],
  "stem_sets": [
    {
      "stem_type": "vocals",
      "isolated": {
        "id": "74744dc1-3d94-4dca-b5bd-7fbb90559c1e",
        "title": "(Vocals)",
        "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
        "audio_url": "https://cdn.acedata2.cloud/suno/74744dc1-3d94-4dca-b5bd-7fbb90559c1e.mp3",
        "created_at": "2026-11-30T18:05:02.527Z",
        "model": "chirp-v6",
        "state": "succeeded",
        "duration": 47.6,
        "stem_set": 1
      },
      "remainder": {
        "id": "dcd7249a-0cac-40f5-a354-c3974447831a",
        "title": "(Instrumental)",
        "audio_url": "https://cdn.acedata2.cloud/suno/dcd7249a-0cac-40f5-a354-c3974447831a.mp3",
        "created_at": "2026-11-30T18:05:02.527Z",
        "model": "chirp-v6",
        "state": "succeeded",
        "duration": 47.6,
        "stem_set": 1
      }
    },
    {
      "stem_type": "vocals",
      "isolated": {
        "id": "505d4be6-7412-413a-8651-dd545f3a7cbf",
        "title": "(Vocals)",
        "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
        "audio_url": "https://cdn.acedata2.cloud/suno/505d4be6-7412-413a-8651-dd545f3a7cbf.mp3",
        "created_at": "2026-11-30T18:05:02.527Z",
        "model": "chirp-v6",
        "state": "succeeded",
        "duration": 47.6,
        "stem_set": 2
      },
      "remainder": {
        "id": "96dbed16-4559-45d1-b5a7-356646217ec5",
        "title": "(Instrumental)",
        "audio_url": "https://cdn.acedata2.cloud/suno/96dbed16-4559-45d1-b5a7-356646217ec5.mp3",
        "created_at": "2026-11-30T18:05:02.527Z",
        "model": "chirp-v6",
        "state": "succeeded",
        "duration": 47.6,
        "stem_set": 2
      }
    }
  ],
  "cost": {
    "amount": 1.008,
    "currency": "credit",
    "list_amount": 1.12
  }
}

生成音效

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

對應官網 Create → Sounds,可以選擇 One-Shot 或 Loop,再設定節拍和調性。

Suno 官網 Sounds 填寫範例提示詞並選取 One-Shot

  • 必填:action、sound、sound_type。
  • 選填:model、bpm、key、audio_format;audio_format 目前僅支援 mp3。

bpm 可填 1 到 300 的整數,key 可使用 Dm 等標準調性寫法。

  • sound_type:one-shot 或 loop。
  • 計費:0.112 Credits。
{
  "action": "sounds",
  "model": "chirp-v6",
  "sound": "One soft bell hit with a very short room tail",
  "sound_type": "one-shot",
  "audio_format": "mp3",
  "async": true
}
{
  "success": true,
  "task_id": "07ecdbad-7aec-42f0-a635-f4b79961b92f",
  "trace_id": "5ddef2e4-479f-475a-89c3-eebe651c4d28",
  "data": [
    {
      "id": "9e6920c3-3f0a-48aa-b37e-64a4ac64abcd",
      "title": "One soft bell hit with a very short room tail",
      "audio_url": "https://cdn.acedata2.cloud/suno/9e6920c3-3f0a-48aa-b37e-64a4ac64abcd.mp3",
      "created_at": "2026-11-30T18:05:02.350Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "one-shot, One soft bell hit with a very short room tail",
      "duration": 2.8
    },
    {
      "id": "ec8db770-6080-4a91-a198-83788cff392f",
      "title": "One soft bell hit with a very short room tail",
      "audio_url": "https://cdn.acedata2.cloud/suno/ec8db770-6080-4a91-a198-83788cff392f.mp3",
      "created_at": "2026-11-30T18:05:02.350Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "one-shot, One soft bell hit with a very short room tail",
      "duration": 2.4
    }
  ],
  "cost": {
    "amount": 0.1008,
    "currency": "credit",
    "list_amount": 0.112
  }
}

調整音訊速度

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

對應官網歌曲選單 Edit → Adjust speed。音訊卡片中的倍速控制項和 Keep Pitch 開關分別對應 speed_multiplier 與 keep_pitch。

Suno 官網 Adjust speed 設為 1.15 倍並開啟 Keep Pitch

  • 必填:action、audio_id、speed_multiplier、title。
  • 選填:keep_pitch。
  • speed_multiplier:範圍 0.25–4。
  • 計費:0.28 Credits。
{
  "action": "adjust_speed",
  "model": "chirp-v6",
  "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32",
  "speed_multiplier": 1.15,
  "keep_pitch": true,
  "title": "Window Lights (faster)",
  "async": true
}

這次將 47.6 秒的原曲設定為 1.15 倍速,回傳的成品長度約為 41.39 秒。

{
  "success": true,
  "task_id": "d0b470bc-3167-41a4-a563-e22efb3abd2b",
  "trace_id": "e0288e22-d7c7-40ed-8dc7-cd85f12e253b",
  "data": [
    {
      "id": "e35ef50f-c386-4d78-8ec4-b8d44252a993",
      "title": "Window Lights (faster)",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/e35ef50f-c386-4d78-8ec4-b8d44252a993.mp3",
      "created_at": "2026-11-30T18:05:01.352Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
      "duration": 41.3913125
    }
  ],
  "cost": {
    "amount": 0.252,
    "currency": "credit",
    "list_amount": 0.28
  }
}

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

自訂生成的進階參數

在官網 Advanced 模式中開啟 More Options。Weirdness 對應 weirdness,Style Influence 對應 style_influence。

Suno 官網未新增參考音訊時 More Options 的預設設定

有參考音訊的翻唱表單中還可以看到 Audio Influence,對應 audio_weight。這三個權重欄位在 API 中的取值為 0 到 1,官網以百分比顯示。

Suno 官網 Cover 已載入參考音訊時的 Audio Influence 滑桿

可以在自訂生成參數中設定這些值。下面的程式碼示範兩項百分比控制和排除風格。

import os

import requests

url = "https://api.acedata.cloud/suno/audios"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "generate",
    "model": "chirp-v6",
    "custom": True,
    "title": "Window Lights",
    "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
    "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
    "weirdness": 0.35,
    "style_influence": 0.8,
    "negative_tags": "heavy distortion",
}

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

生成完成後,依照基本使用流程讀取 data 中的兩個候選。以下是這組進階參數的實測最終狀態節錄。

{
  "success": true,
  "task_id": "c400fcab-e6b1-4311-91a8-832d096ac797",
  "trace_id": "114383d0-d9be-41c9-95ba-2729e7c08fc3",
  "data": [
    {
      "id": "d90c143f-871e-4f6d-8afe-ef4e525f35b5",
      "title": "Window Lights",
      "audio_url": "https://cdn.acedata2.cloud/suno/d90c143f-871e-4f6d-8afe-ef4e525f35b5.mp3",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 55.6
    },
    {
      "id": "9c7c7f9f-cf85-409a-bbf2-e76085347d5c",
      "title": "Window Lights",
      "audio_url": "https://cdn.acedata2.cloud/suno/9c7c7f9f-cf85-409a-bbf2-e76085347d5c.mp3",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 62.72
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

沒有參考音訊或音色時,audio_weight 的影響可能減弱。

控制歌曲時長

在官網 Advanced → More Options → Duration 選擇 Custom 後可設定時長。圖中的 1:30 對應下方實測請求的 duration: 90。

Suno 官網 Duration 自訂設定為 1 分 30 秒

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

這裡在 custom: true 的歌曲生成請求中示範。模型會把 duration 當作目標時長。同一次請求的兩首歌也可能長短不同。需要精確長度時,可以在拿到成品後裁剪。

對應的 Python 程式碼:

import os

import requests

url = "https://api.acedata.cloud/suno/audios"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "generate",
    "model": "chirp-v6",
    "custom": True,
    "duration": 90,
    "title": "Window Lights",
    "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
    "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
}

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

請求的 duration 為 目標時長。回應的 data[].duration 是每首歌曲的 實際時長。本次 V6 請求目標為 90 秒,兩個候選的實際時長分別為 89.48 秒和 89.56 秒。

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

實測最終狀態節錄。

{
  "success": true,
  "task_id": "1a01d321-6780-4d8e-8612-02a0fad33102",
  "trace_id": "ffddaa23-a3dd-44de-aa4e-58a6e3f1ca2c",
  "data": [
    {
      "id": "8603c0f3-a396-455c-b945-fb48e65bf014",
      "title": "Window Lights",
      "audio_url": "https://cdn.acedata2.cloud/suno/8603c0f3-a396-455c-b945-fb48e65bf014.mp3",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 89.48
    },
    {
      "id": "50487a72-bc9c-4511-93d7-e2949dfb00c0",
      "title": "Window Lights",
      "audio_url": "https://cdn.acedata2.cloud/suno/50487a72-bc9c-4511-93d7-e2949dfb00c0.mp3",
      "model": "chirp-v6",
      "state": "succeeded",
      "duration": 89.56
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

Add Instrumental 功能

Add Instrumental 可以為清唱配樂。在官網 Create → Songs → Advanced 透過 + Audio → Upload 匯入清唱,在音訊卡片右上角選擇 Edit instruments。API 使用上傳後回傳的 audio_id。 Suno Upload API

Suno 官網使用示範曲定位 Edit instruments 模式與波形

下方實測請求使用上傳的清唱音訊。

上傳後,記錄回傳的 data.audio_id。

{
  "success": true,
  "task_id": "68d3a7d4-8b16-4339-a16f-df245819cbaf",
  "data": {
    "audio_id": "1f360814-4115-42d9-b196-9d513f4cd6fa"
  }
}

本例的上傳結果是 audio_id: 1f360814-4115-42d9-b196-9d513f4cd6fa。還需要填寫下面的參數。

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

對應的 Python 程式碼如下。

import os

import requests

url = "https://api.acedata.cloud/suno/audios"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "underpainting",
    "model": "chirp-v6",
    "audio_id": "1f360814-4115-42d9-b196-9d513f4cd6fa",
    "style": "Soft acoustic folk, fingerpicked guitar",
    "underpainting_end": 20,
}

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

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

{
  "success": true,
  "task_id": "ad95f427-f6bd-4cea-901a-83ce4b35c547",
  "trace_id": "866ab30e-e1bd-4572-adad-3db9cdaf1036",
  "data": [
    {
      "id": "335eb864-7259-408f-930b-7b14f48704e6",
      "title": "Morning on the Porch",
      "audio_url": "https://cdn.acedata2.cloud/suno/335eb864-7259-408f-930b-7b14f48704e6.mp3",
      "created_at": "2026-11-30T18:14:21.553Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk, fingerpicked guitar",
      "duration": 20
    },
    {
      "id": "0eda172d-6284-411c-9cfb-7428ed571707",
      "title": "Morning on the Porch",
      "audio_url": "https://cdn.acedata2.cloud/suno/0eda172d-6284-411c-9cfb-7428ed571707.mp3",
      "created_at": "2026-11-30T18:14:21.553Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk, fingerpicked guitar",
      "duration": 19.56
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

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

Add Vocals 功能

Add Vocals 可以為伴奏編寫並演唱歌詞。在官網 Create → Songs → Advanced 透過 + Audio → Upload 匯入伴奏,在音訊卡片上選擇 Edit vocals,在下方 Lyrics 填寫要演唱的歌詞。API 使用上傳後回傳的 audio_id。 Suno Upload API

Suno 官網 Edit vocals 模式及已填入範例歌詞的 Lyrics 輸入區

圖中使用示範曲來顯示所選的編輯模式。下方實測請求使用上傳的伴奏音訊。

上傳後,記錄回傳的 data.audio_id。

{
  "success": true,
  "task_id": "8137181d-bafb-4cc3-aa9c-5db843d8815b",
  "data": {
    "audio_id": "48782d61-b915-447f-a042-f744d46fa7d9"
  }
}

這個範例的伴奏 audio_id 是 48782d61-b915-447f-a042-f744d46fa7d9。再填寫下列參數。

  • action:內容為 overpainting。
  • overpainting_start:對上傳的歌曲新增人聲的起始時間,預設值是 0。
  • overpainting_end:對上傳的歌曲新增人聲的結束時間,必須小於歌曲的總時長。
  • audio_id:上傳的伴奏 ID。
  • custom:填寫歌詞時可以明確開啟自訂模式。
  • lyric:自訂模式下填寫的歌詞。
  • style:伴奏的風格。

對應的 Python 程式碼如下。

import os

import requests

url = "https://api.acedata.cloud/suno/audios"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "overpainting",
    "model": "chirp-v6",
    "audio_id": "48782d61-b915-447f-a042-f744d46fa7d9",
    "lyric": "Blue boats glide beyond the bay",
    "style": "Soft acoustic folk",
    "overpainting_end": 20,
    "custom": True,
}

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

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

{
  "success": true,
  "task_id": "ba3841ca-651b-4ee7-86ed-f74184c3c66d",
  "trace_id": "ca82996b-d3e9-4295-a04f-f242ddc44616",
  "data": [
    {
      "id": "c8751c2c-802b-4a04-b6c1-442999148876",
      "title": "Morning on the Porch",
      "audio_url": "https://cdn.acedata2.cloud/suno/c8751c2c-802b-4a04-b6c1-442999148876.mp3",
      "created_at": "2026-11-30T18:14:21.639Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk",
      "duration": 21.96
    },
    {
      "id": "554e555d-c31a-4fb4-ab6f-9434f3863bfc",
      "title": "Morning on the Porch",
      "audio_url": "https://cdn.acedata2.cloud/suno/554e555d-c31a-4fb4-ab6f-9434f3863bfc.mp3",
      "created_at": "2026-11-30T18:14:21.639Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "style": "Soft acoustic folk",
      "duration": 19.44
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

新增人聲後,從兩個結果中選擇所需的歌曲。

Remaster 功能

Remaster 可以重新製作現有歌曲。對應官網的 Edit → Remaster。彈出視窗中的 Variation 對應 variation_category。API 使用本應用程式可處理的來源歌曲 ID。

Suno 官網 Remaster 彈出視窗的 Variation 強度選項

  • action:內容為 remaster。
  • audio_id:需要重新生成的歌曲 ID。
  • model:請求中省略該欄位。
  • variation_category:重新製作強度,可填 subtle、normal(預設)或 high。

對應的 Python 程式碼如下。

import os

import requests

url = "https://api.acedata.cloud/suno/audios"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "remaster",
    "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32",
    "variation_category": "normal",
    "async": True,
}

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

成功時與其他歌曲操作一樣,從 data[].id 和 data[].audio_url 取得重新製作的結果。以下是一次重新製作測試查詢到的失敗最終狀態節錄。

{
  "success": false,
  "task_id": "add2ba31-609e-48ca-9933-5711a88067fe",
  "trace_id": "47579d6e-185f-462e-83d2-6c827675e58d",
  "error": {
    "code": "timeout",
    "message": "timeout while waiting for audio generation"
  }
}

如果重新製作逾時,使用原 task_id 查詢。需要排查時請保留 trace_id 和來源歌曲 ID。

Mashup 混曲生成功能

Mashup 可以根據兩首或更多參考歌曲生成混曲。在官網成品選單選擇 Remix → Mashup 後,可在音訊卡片中選入兩首歌曲。

Suno 官網 Mashup 音訊卡片已選入兩首參考歌曲

  • action:內容為 mashup。
  • mashup_audio_ids:至少兩首參考歌曲的 ID。
  • prompt:可選,用來提示混曲的方向。

對應的 Python 程式碼如下。

import os

import requests

url = "https://api.acedata.cloud/suno/audios"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "mashup",
    "model": "chirp-v6",
    "mashup_audio_ids": ["3f8c1800-7a96-4a2b-811f-5fee716a9e32", "ebafbeeb-9bdb-4b28-9c03-6a09734ba6df"],
    "prompt": "Gentle acoustic folk",
}

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

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

{
  "success": true,
  "task_id": "5e229f57-5912-47fd-b7db-7a7b778de356",
  "trace_id": "0c86539d-5931-46fb-a19f-a57ee5e20cc4",
  "data": [
    {
      "id": "242ce421-8e5d-45c8-83d4-98fb7264a90a",
      "title": "Open Window Cello",
      "lyric": "[Instrumental]",
      "audio_url": "https://cdn.acedata2.cloud/suno/242ce421-8e5d-45c8-83d4-98fb7264a90a.mp3",
      "created_at": "2026-11-30T18:05:02.391Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "Gentle acoustic folk",
      "style": "Acoustic folk with a gentle 6/8 sway and fingerpicked guitar leading the pulse; verse feels sparse and intimate, pre-chorus opens with soft brushed percussion and warm low strings, chorus blooms into layered acoustic strums and a fragile hummed melody. Airy room vocals, light harmony doubles, reverse guitar swells, creaking chair detail, intimate close-mic mix with natural wood warmth., folk, gentle, acoustic",
      "duration": 187.96
    },
    {
      "id": "12fcfa48-fd9c-4b05-92e7-efef411b4804",
      "title": "Open Window Cello",
      "lyric": "[Instrumental]",
      "audio_url": "https://cdn.acedata2.cloud/suno/12fcfa48-fd9c-4b05-92e7-efef411b4804.mp3",
      "created_at": "2026-11-30T18:05:02.391Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "Gentle acoustic folk",
      "style": "Acoustic folk with a gentle 6/8 sway and fingerpicked guitar leading the pulse; verse feels sparse and intimate, pre-chorus opens with soft brushed percussion and warm low strings, chorus blooms into layered acoustic strums and a fragile hummed melody. Airy room vocals, light harmony doubles, reverse guitar swells, creaking chair detail, intimate close-mic mix with natural wood warmth., folk, gentle, acoustic",
      "duration": 198.76
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

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

Samples 取樣生成歌曲

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

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

對應官網 Remix → Sample this song。波形下方 Selection 的起訖時間對應 samples_start 與 samples_end。使用目前歌曲的實際時長確定取樣範圍。

Suno 官網 Sample 表單中的 1.2 到 7.1 秒示範選取範圍

下面的 API 實測選取範圍為 1 到 7 秒。對應的 Python 程式碼如下。

import os

import requests

url = "https://api.acedata.cloud/suno/audios"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "samples",
    "model": "chirp-v6",
    "audio_id": "3f8c1800-7a96-4a2b-811f-5fee716a9e32",
    "samples_start": 1.0,
    "samples_end": 7.0,
    "prompt": "Sunlit folk and gentle hand percussion",
}

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

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

{
  "success": true,
  "task_id": "4bb808f2-c6ea-4739-8ea0-e57427e600fe",
  "trace_id": "7969e486-fd68-44e9-a605-2eeb9355caf8",
  "data": [
    {
      "id": "c0858070-d39a-4fd8-8722-61e816cdccc2",
      "title": "Cedar Morning",
      "lyric": "[Instrumental]",
      "audio_url": "https://cdn.acedata2.cloud/suno/c0858070-d39a-4fd8-8722-61e816cdccc2.mp3",
      "created_at": "2026-11-30T18:05:01.689Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "Sunlit folk and gentle hand percussion",
      "style": "Folk with a sunlit 92 BPM sway, brushed acoustic guitar carrying the verse, soft hand percussion and upright bass joining on the lift; chorus opens with harmony guitar strums, airy mandolin filigree, and a warm shaker pulse. Bridge strips to fingerpicked guitar and thumb taps, then final pass blooms with tambourine and subtle group hums. Bright, intimate, wood-grain mix., folk, gentle",
      "duration": 152.8
    },
    {
      "id": "7618fbbe-caf7-4754-bd3f-170022069174",
      "title": "Cedar Morning",
      "lyric": "[Instrumental]",
      "audio_url": "https://cdn.acedata2.cloud/suno/7618fbbe-caf7-4754-bd3f-170022069174.mp3",
      "created_at": "2026-11-30T18:05:01.689Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "Sunlit folk and gentle hand percussion",
      "style": "Folk with a sunlit 92 BPM sway, brushed acoustic guitar carrying the verse, soft hand percussion and upright bass joining on the lift; chorus opens with harmony guitar strums, airy mandolin filigree, and a warm shaker pulse. Bridge strips to fingerpicked guitar and thumb taps, then final pass blooms with tambourine and subtle group hums. Bright, intimate, wood-grain mix., folk, gentle",
      "duration": 168
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

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

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 生成的音訊作為靈感來源。

在官網可以從歌曲選單 Remix → Use as inspiration 進入音訊卡片的 Inspo 模式。還可以把其他音軌拖到卡片下方作為整段參考。

Suno 官網 Inspo 音訊卡片上的參考曲目和剩餘新增位置

對應的 Python 程式碼:

import os

import requests

url = "https://api.acedata.cloud/suno/audios"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "inspo",
    "model": "chirp-v6",
    "audio_urls": ["https://cdn.acedata2.cloud/suno/3f8c1800-7a96-4a2b-811f-5fee716a9e32.mp3", "https://cdn.acedata2.cloud/suno/e4218e38-3e6f-4e47-93d8-bb15bedcafbd.mp3"],
    "prompt": "Rework these references as warm acoustic folk with soft vocals",
}

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

下面是 V6 靈感創作的實測終態節選。

{
  "success": true,
  "task_id": "a6fd0b9c-811a-4b67-af38-37c7de46849e",
  "trace_id": "f3cc2e70-ca82-45a6-af06-6c14340cdef6",
  "data": [
    {
      "id": "386bfdc1-5606-45fa-8077-6cba30355382",
      "title": "Come Home by the Water",
      "lyric": "[Verse 1]\nWindow lights across the bay\nGuide the boats that drift away\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/386bfdc1-5606-45fa-8077-6cba30355382.mp3",
      "created_at": "2026-11-30T18:06:25.242Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "Rework these references as warm acoustic folk with soft vocals",
      "style": "Warm acoustic folk, intimate fingerpicked steel-string guitar, soft brushed percussion, mellow upright bass, subtle close harmony, gentle female lead vocal, calm unhurried pulse, organic room ambience, restrained dynamics with a fuller final refrain, natural close-miked mix",
      "duration": 264.8
    },
    {
      "id": "0ab926b9-ca32-41a6-83fc-e7fffdf8607c",
      "title": "Fold the Stars into the Sea",
      "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\nBring the morning home to me\nFold the stars into the sea",
      "audio_url": "https://cdn.acedata2.cloud/suno/0ab926b9-ca32-41a6-83fc-e7fffdf8607c.mp3",
      "created_at": "2026-11-30T18:06:25.242Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "Rework these references as warm acoustic folk with soft vocals",
      "style": "Warm acoustic folk, intimate soft female lead vocal, fingerpicked steel-string guitar and mellow strummed acoustic guitar, subtle upright bass, restrained brushed percussion, close natural vocal with light room ambience. Begin with sparse guitar and voice, gradually add bass and soft percussion, open into a tender chorus, then settle into a quiet guitar-led outro; organic, warm, uncluttered mix.",
      "duration": 208.4
    }
  ],
  "cost": {
    "amount": 0.504,
    "currency": "credit",
    "list_amount": 0.56
  }
}

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

非同步回呼

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

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

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

準備一個能接收 POST JSON 的 Webhook 位址,將其傳給 callback_url。只設定 callback_url 就會非同步提交,也可以同時設定 async: true。

curl -sS -X POST 'https://api.acedata.cloud/suno/audios' \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
  "action": "generate",
  "model": "chirp-v6",
  "prompt": "A song for Christmas",
  "callback_url": "https://example.com/webhooks/suno"
}'

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

{
  "task_id": "c409f30d-4b2f-4ad9-8ae7-f394e367713d"
}

任務完成後,伺服器將終態 JSON 傳送到設定的回呼位址。以下使用本指南的實測歌曲結果展示終態結構。

{
  "success": true,
  "task_id": "c409f30d-4b2f-4ad9-8ae7-f394e367713d",
  "trace_id": "f9ff7920-2b74-4c69-867b-183cd41166fa",
  "data": [
    {
      "id": "15b56d7a-1ad1-4dc6-bc74-79b102caceeb",
      "title": "Room for One More Chair",
      "lyric": "[Verse 1]\nThe kettle sings, the window steams\nA paper chain hangs slightly crooked\nYou set the old tin on the shelf\nAnd laugh at how the years have kept it",
      "audio_url": "https://cdn.acedata2.cloud/suno/15b56d7a-1ad1-4dc6-bc74-79b102caceeb.mp3",
      "created_at": "2026-12-01T09:02:22.466Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "A song for Christmas",
      "style": "Cinematic Christmas pop with film-score scale, a steady four-on-the-floor pulse, driving syncopated percussion, and a repeating cello ostinato. Begin with intimate piano and close, warm lead vocals; build through layered strings, brass swells, and wordless choir accents into a wide, uplifting final chorus. Polished, spacious mix with clear vocal focus and dynamic section lifts.",
      "duration": 231.96
    },
    {
      "id": "555bf85a-907c-4573-b6f3-e816c04aabb9",
      "title": "Always Room for More",
      "lyric": "[Intro]\n[Wordless vocals]\nOh—ah, oh—ah\n[Verse 1]\nSnow gathers softly on the windowpane",
      "audio_url": "https://cdn.acedata2.cloud/suno/555bf85a-907c-4573-b6f3-e816c04aabb9.mp3",
      "created_at": "2026-12-01T09:02:22.466Z",
      "model": "chirp-v6",
      "state": "succeeded",
      "prompt": "A song for Christmas",
      "style": "Cinematic Christmas pop with marathon-film scale, syncopated rhythmic drive, cello ostinato, four-on-the-floor pulse, and wordless vocal drops. Begin with a restrained cello figure and distant wordless voices; build into a broad, uplifting chorus with layered strings, punchy percussion, and a clear lead vocal. Use a brief countdown-style dropout before the final chorus, then finish with a full, resolved orchestral-pop ending. Polished, spacious mix with strong low-end and crisp rhythmic detail.",
      "duration": 231.2
    }
  ]
}

依 task_id 關聯任務,並對重複回呼進行去重。回呼中 success 為 false 時,從 error 讀取失敗原因。只有 async: true 時,可透過 Suno Tasks 免費查詢。

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

curl -NsS -X POST 'https://api.acedata.cloud/suno/audios' \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/x-ndjson' \
  -d '{
  "action": "generate",
  "model": "chirp-v6",
  "prompt": "A song for Christmas"
}'

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

{"success":true,"task_id":"c409f30d-4b2f-4ad9-8ae7-f394e367713d","data":[{"id":"15b56d7a-1ad1-4dc6-bc74-79b102caceeb","lyric":"A song for Christmas","created_at":"2026-12-01T09:02:22.466Z","model":"chirp-v6","state":"pending","prompt":"A song for Christmas"},{"id":"555bf85a-907c-4573-b6f3-e816c04aabb9","lyric":"A song for Christmas","created_at":"2026-12-01T09:02:22.466Z","model":"chirp-v6","state":"pending","prompt":"A song for Christmas"}]}
{"success":true,"task_id":"c409f30d-4b2f-4ad9-8ae7-f394e367713d","trace_id":"f9ff7920-2b74-4c69-867b-183cd41166fa","data":[{"id":"15b56d7a-1ad1-4dc6-bc74-79b102caceeb","title":"Room for One More Chair","lyric":"[Verse 1]\nThe kettle sings, the window steams\nA paper chain hangs slightly crooked\nYou set the old tin on the shelf\nAnd laugh at how the years have kept it","audio_url":"https://cdn.acedata2.cloud/suno/15b56d7a-1ad1-4dc6-bc74-79b102caceeb.mp3","created_at":"2026-12-01T09:02:22.466Z","model":"chirp-v6","state":"succeeded","prompt":"A song for Christmas","style":"Cinematic Christmas pop with film-score scale, a steady four-on-the-floor pulse, driving syncopated percussion, and a repeating cello ostinato. Begin with intimate piano and close, warm lead vocals; build through layered strings, brass swells, and wordless choir accents into a wide, uplifting final chorus. Polished, spacious mix with clear vocal focus and dynamic section lifts.","duration":231.96},{"id":"555bf85a-907c-4573-b6f3-e816c04aabb9","title":"Always Room for More","lyric":"[Intro]\n[Wordless vocals]\nOh—ah, oh—ah\n[Verse 1]\nSnow gathers softly on the windowpane","audio_url":"https://cdn.acedata2.cloud/suno/555bf85a-907c-4573-b6f3-e816c04aabb9.mp3","created_at":"2026-12-01T09:02:22.466Z","model":"chirp-v6","state":"succeeded","prompt":"A song for Christmas","style":"Cinematic Christmas pop with marathon-film scale, syncopated rhythmic drive, cello ostinato, four-on-the-floor pulse, and wordless vocal drops. Begin with a restrained cello figure and distant wordless voices; build into a broad, uplifting chorus with layered strings, punchy percussion, and a clear lead vocal. Use a brief countdown-style dropout before the final chorus, then finish with a full, resolved orchestral-pop ending. Polished, spacious mix with strong low-end and crisp rhythmic detail.","duration":231.2}],"cost":{"amount":0.504,"currency":"credit","list_amount":0.56}}

每行是獨立的 JSON 物件,使用相同的 task_id。處理中也可能回傳 success: true,請結合歌曲狀態辨識進度。這裡展示 V6 實測的首條進度和末條最終狀態。若連線中斷,優先使用原任務 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 | 提示詞被標記為需要審核 | | 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 確認原任務的最終結果;在終態明確前不要重複提交,以免建立重複任務。