查询任务
curl --request GET \
--url https://api.ephone.ai/suno/v2/fetch/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ephone.ai/suno/v2/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.ephone.ai/suno/v2/fetch/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ephone.ai/suno/v2/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))
}{
"code": "success",
"data": {
"task_id": "5adac6ee-...",
"action": "music",
"model": "suno/music",
"status": "SUCCESS",
"progress": "100%",
"submit_time": 1757800000000,
"finish_time": 1757800120000,
"musics": [
{
"music_id": "89b20862-...",
"title": "Rain on Tin Roof",
"tags": "lo-fi piano",
"audio_url": "https://...",
"image_url": "https://...",
"duration": 187.56
}
]
}
}{
"error": {
"message": "Invalid Token",
"type": "rix_api_error"
}
}{
"code": "error",
"message": "task not found"
}{
"error": {
"message": "Too many requests, please try again later",
"type": "rix_api_error"
}
}查询
查询任务
用提交时返回的 task_id 查询任务状态与结果。
GET
/
suno
/
v2
/
fetch
/
{task_id}
查询任务
curl --request GET \
--url https://api.ephone.ai/suno/v2/fetch/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ephone.ai/suno/v2/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.ephone.ai/suno/v2/fetch/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ephone.ai/suno/v2/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))
}{
"code": "success",
"data": {
"task_id": "5adac6ee-...",
"action": "music",
"model": "suno/music",
"status": "SUCCESS",
"progress": "100%",
"submit_time": 1757800000000,
"finish_time": 1757800120000,
"musics": [
{
"music_id": "89b20862-...",
"title": "Rain on Tin Roof",
"tags": "lo-fi piano",
"audio_url": "https://...",
"image_url": "https://...",
"duration": 187.56
}
]
}
}{
"error": {
"message": "Invalid Token",
"type": "rix_api_error"
}
}{
"code": "error",
"message": "task not found"
}{
"error": {
"message": "Too many requests, please try again later",
"type": "rix_api_error"
}
}| status | 含义 |
|---|---|
SUBMITTED | 已提交 |
QUEUED | 排队中 |
IN_PROGRESS | 处理中 |
SUCCESS | 已完成,产物在响应里 |
FAILURE | 失败,原因见 fail_reason |
此页面对您有帮助吗?