Suno 查询
curl --request GET \
--url https://openp.ai/suno/fetch/{id}import requests
url = "https://openp.ai/suno/fetch/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://openp.ai/suno/fetch/{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://openp.ai/suno/fetch/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://openp.ai/suno/fetch/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openp.ai/suno/fetch/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openp.ai/suno/fetch/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body视频与图像生成
Suno 查询
GET /suno/fetch/ —— 轮询 Suno 任务状态
GET
/
suno
/
fetch
/
{id}
Suno 查询
curl --request GET \
--url https://openp.ai/suno/fetch/{id}import requests
url = "https://openp.ai/suno/fetch/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://openp.ai/suno/fetch/{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://openp.ai/suno/fetch/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://openp.ai/suno/fetch/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openp.ai/suno/fetch/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openp.ai/suno/fetch/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body获取 Suno 音乐生成任务的当前状态与结果。
请求
curl https://openp.ai/suno/fetch/task_01... \
-H "Authorization: Bearer $OPENPAI_API_KEY"
响应
{
"code": "success",
"data": {
"task_id": "task_01...",
"status": "SUCCESS",
"progress": 100,
"clips": [
{
"id": "clip_a",
"title": "Rainy Night",
"audio_url": "https://...mp3",
"video_url": "https://...mp4",
"image_url": "https://...png",
"duration": 180,
"lyric": "...",
"tags": "lofi, hiphop",
"model_name": "chirp-v4"
},
{
"id": "clip_b",
"title": "Rainy Night",
"audio_url": "https://...mp3",
"duration": 175
}
]
}
}
status
| 值 | 含义 |
|---|---|
PENDING | 队列中 |
TEXT_GENERATING | 生成歌词 |
FIRST_SUCCESS | 首段已就绪(可流式播放) |
STREAMING | 流式生成中 |
SUCCESS | 全部完成 |
FAILURE | 失败 |
批量查询
curl -X POST https://openp.ai/suno/fetch \
-H "Authorization: Bearer $OPENPAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ids":["task_01","task_02"]}'
注意
audio_url/video_url等链接通常仅在 24-48 小时 内可访问,请及时下载到自有存储。- 任务一般 1-3 分钟内完成,长曲目(continue)可能更久。
- 失败任务建议先看
failure_reason,常见原因:上游过载、上游拒绝、歌词太长。
⌘I