Suno Tasks API
POSThttps://api.01ai.cloud/suno/tasks
可以用來查詢當前 Suno 任務狀態。
相關產品
請求頭
acceptstring
指定伺服器返回的回應格式。
請選擇
authorizationstring
Bearer token
請求體
idstring
Suno 任務的 ID。
idsarray
Suno 任務的 ID 列表。
actionstring
操作類型。使用 `retrieve` 獲取單個任務,使用 `retrieve_batch` 批量獲取多個任務。
請選擇
響應
成功200
操作成功執行。
響應體
idstring
任務 ID。
typestring
任務類型。
api_idstring
API標識符。
elapsednumber
處理持續時間(秒)。
requestobject
創建該任務的 API 操作所記錄的請求體;字段取決於具體操作和動作。
object <string, unknown>
user_idstring
任務所屬帳號。
responseobject
創建該任務的 API 操作所記錄的最終響應;字段遵循該操作文檔中的成功或錯誤響應結構。
object <string, unknown>
trace_idstring
請求追蹤 ID。
created_atnumber
任務創建時間,Unix 時間戳(秒)。
started_atnumber
處理開始時間,Unix 時間戳(秒)。
finished_atnumber
處理完成時間,Unix 時間戳(秒)。
actor_user_idstring
執行授權請求的帳號。
credential_idstring
用於啟動任務的憑據。
application_idstring
用於計費的應用。
authorization_idstring
啟動任務時使用的授權。
成功200
操作成功執行。
響應體
countinteger
匹配任務總數。
itemsarray
匹配的任務列表。
數組
idstring
任務 ID。
typestring
任務類型。
api_idstring
API標識符。
elapsednumber
處理持續時間(秒)。
requestobject
創建該任務的 API 操作所記錄的請求體;字段取決於具體操作和動作。
object <string, unknown>
user_idstring
任務所屬帳號。
responseobject
創建該任務的 API 操作所記錄的最終響應;字段遵循該操作文檔中的成功或錯誤響應結構。
object <string, unknown>
trace_idstring
請求追蹤 ID。
created_atnumber
任務創建時間,Unix 時間戳(秒)。
started_atnumber
處理開始時間,Unix 時間戳(秒)。
finished_atnumber
處理完成時間,Unix 時間戳(秒)。
actor_user_idstring
執行授權請求的帳號。
credential_idstring
用於啟動任務的憑據。
application_idstring
用於計費的應用。
authorization_idstring
啟動任務時使用的授權。
示例
{
"count": 0,
"items": []
}成功200
操作成功執行。
響應體
object
失敗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"
}失敗401invalid_token
未授權,授權令牌無效或缺失。
響應體
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 音樂生成
允许用通用余额
啟用「允許通用餘額」後,專屬餘額不足將自動使用通用餘額。

