按 ID 查询音乐任务
curl --request GET \
--url https://api.aiid.edu.kg/suno/fetch/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aiid.edu.kg/suno/fetch/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aiid.edu.kg/suno/fetch/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aiid.edu.kg/suno/fetch/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aiid.edu.kg/suno/fetch/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aiid.edu.kg/suno/fetch/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiid.edu.kg/suno/fetch/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "success",
"message": "",
"data": {
"task_id": "task_xxx",
"platform": "suno",
"action": "MUSIC",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://example.com/audio.mp3",
"properties": {
"upstream_model_name": "suno_music",
"origin_model_name": "suno-v5.5"
},
"data": [
{
"id": "clip_xxx",
"title": "夏日海风",
"audio_url": "https://example.com/audio.mp3",
"image_url": "https://example.com/cover.jpg",
"model_name": "suno-v5.5",
"metadata": {
"duration": 180,
"prompt": "轻快电子流行,夏日海边,女声 旋律"
}
}
]
}
}音乐生成任务格式
按 ID 查询音乐任务
通过 path task_id 查询音乐生成任务。
音乐生成任务查询接口。创建接口返回的 data 即任务 ID,通过 GET /suno/fetch/{task_id} 查询单个任务。
查询方式
GET /suno/fetch/task_xxx
查询输出
外层保持 new-api 任务结构:
code:成功时为success。message:错误或提示信息。data.task_id:任务 ID。data.status:任务状态,常见值NOT_START、SUBMITTED、QUEUED、IN_PROGRESS、SUCCESS、FAILURE。data.progress:任务进度。data.result_url:成功后可用的结果地址,若上游返回多首歌曲,以data.data内片段为准。data.data:上游音乐结果原始数据,通常包含歌曲片段数组或对象。
成功态示例:
{
"code": "success",
"message": "",
"data": {
"task_id": "task_xxx",
"platform": "suno",
"action": "MUSIC",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://example.com/audio.mp3",
"properties": {
"upstream_model_name": "suno_music",
"origin_model_name": "suno-v5.5"
},
"data": [
{
"id": "clip_xxx",
"title": "夏日海风",
"audio_url": "https://example.com/audio.mp3",
"image_url": "https://example.com/cover.jpg",
"model_name": "suno-v5.5",
"metadata": {
"duration": 180,
"prompt": "轻快电子流行,夏日海边,女声 旋律"
}
}
]
}
}
GET
/
suno
/
fetch
/
{task_id}
按 ID 查询音乐任务
curl --request GET \
--url https://api.aiid.edu.kg/suno/fetch/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aiid.edu.kg/suno/fetch/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aiid.edu.kg/suno/fetch/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aiid.edu.kg/suno/fetch/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aiid.edu.kg/suno/fetch/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aiid.edu.kg/suno/fetch/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiid.edu.kg/suno/fetch/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "success",
"message": "",
"data": {
"task_id": "task_xxx",
"platform": "suno",
"action": "MUSIC",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://example.com/audio.mp3",
"properties": {
"upstream_model_name": "suno_music",
"origin_model_name": "suno-v5.5"
},
"data": [
{
"id": "clip_xxx",
"title": "夏日海风",
"audio_url": "https://example.com/audio.mp3",
"image_url": "https://example.com/cover.jpg",
"model_name": "suno-v5.5",
"metadata": {
"duration": 180,
"prompt": "轻快电子流行,夏日海边,女声 旋律"
}
}
]
}
}授权
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
路径参数
提交音乐任务返回的任务 ID。
示例:
"task_xxx"
