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:成功後に利用可能な結果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"
レスポンス
200 - application/json
OK
