Suno Lyrics Generation API
POSThttps://api.01ai.cloud/suno/lyrics
Suno 歌詞生成 API,輸入提示詞生成完整結構化歌詞。支持 default 與 remi-v1 兩種模型。
相關產品
請求頭
acceptstring
指定伺服器返回的回應格式。
請選擇
authorizationstring
Bearer token
請求體
promptstring必填參數
用於生成歌詞的提示詞,描述期望的歌詞主題或風格。
modelstring必填參數
用於生成歌詞的模型,預設值為 `default`,可選值包括 `default` 和 `remi-v1`。
響應
成功200
請求成功,返回歌詞生成結果。
響應體
dataarray
根據提示詞生成的歌詞變體列表。
數組
tagsarray
為生成的歌詞推薦的音樂風格標籤。
數組
string
textstring
生成的歌詞正文內容。
titlestring
為生成的歌詞所建議的標題。
statusstring
該歌詞變體的生成狀態,例如 `complete`(已完成)。
elapsednumber
任務執行所耗費的秒數。
successboolean
標識本次請求是否成功的布林值。
task_idstring
本次歌詞生成任務的唯一 ID。
started_atnumber
任務開始執行的時間。
finished_atnumber
任務執行完成的時間。
示例
{
"data": [
{
"tags": [
"dreamy, mellow, ballad"
],
"text": "[Verse]\nSnowflakes falling from the sky\nWinter's cold touch\nOh how it gets me high\nI bundle up in layers\nOh so cozy\nStepping out and feeling the frost on my nose\n\n[Chorus]\nOh\nWinter's cold touch\nIt's a season that I love so much\nSnowfall brings a feeling so divine\nWinter's cold touch\nIt's a magical time",
"title": "Winter's Cold Touch",
"status": "complete"
},
{
"tags": [
"dream pop, mellow, shoegaze"
],
"text": "[Verse]\nThe world is covered in a blanket of white\nIcicles hanging\nShimmering so bright\nThe chilly air fills my lungs with every breath\nWalking in the snow\nLeaving footprints behind\n\n[Chorus]\nWinter wonderland\nEverything is so bright\nWinter wonderland\nHold me through the night",
"title": "Winter Wonderland",
"status": "complete"
}
],
"elapsed": 7.433,
"success": true,
"task_id": "2e26f7ff-0b82-4a60-bb9b-78db89f98b51",
"started_at": 1780684179.15,
"finished_at": 1780684186.583
}失敗400token_mismatched
請求錯誤,可能是參數缺失或無效。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。
示例
{
"error": {
"code": "token_mismatched",
"message": "The specified token is not matched with API."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}失敗400api_not_implemented
請求錯誤,可能是參數缺失或無效。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。
示例
{
"error": {
"code": "api_not_implemented",
"message": "The API is not implemented."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}失敗400disabled
請求錯誤,可能是參數缺失或無效。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。
示例
{
"error": {
"code": "disabled",
"message": "Your application has been disabled by Ace Data Cloud due to abnormal usage behavior, please contact our support to get more information."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}失敗400bad_request
請求錯誤,可能是參數缺失或無效。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。
示例
{
"error": {
"code": "bad_request",
"message": "model is invalid."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}失敗400no_token
請求錯誤,可能是參數缺失或無效。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。
示例
{
"error": {
"code": "no_token",
"message": "No token specified for the request."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}失敗401invalid_token
未授權,授權令牌無效或缺失。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。
示例
{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}失敗401token_expired
未授權,授權令牌無效或缺失。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。
示例
{
"error": {
"code": "token_expired",
"message": "token expired."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}失敗401token_mismatched
未授權,授權令牌無效或缺失。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。
示例
{
"error": {
"code": "token_mismatched",
"message": "token and api does not match."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}失敗403used_up
未授權,授權令牌無效或缺失。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。
失敗404no_api
未授權,授權令牌無效或缺失。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。
失敗429too_many_requests
請求過多,已超出速率限制。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。
失敗500api_error
伺服器內部錯誤,伺服器端發生異常。
響應體
errorobject
codestring
響應的錯誤碼。
messagestring
響應的錯誤信息。
retryableboolean
可選布林欄位。true 表示此次失敗允許使用相同參數稍後重新請求;false 表示不應原樣重試。欄位缺失時不應根據 HTTP 狀態或錯誤文字自動重發。已受理或執行結果不明確時,應查詢原 task_id。
trace_idstring
本次請求的追蹤 ID。

Integration workbench
Shell
Python
JavaScript
Java
Go
PHP
溫馨提示:對於流式請求,上面的代碼可能不完全適用。請參閱對接文檔以進行更改。
Suno 音樂生成
允许用通用余额
啟用「允許通用餘額」後,專屬餘額不足將自動使用通用餘額。

