Skip to main content
GET
/
v1
/
music
/
tasks
/
{task_id}
查询音乐生成任务
curl --request GET \
  --url https://api.qhaigc.net/v1/music/tasks/{task_id} \
  --header 'Authorization: Bearer <token>'
{
  "created": 123,
  "data": [
    {}
  ]
}

功能说明

查询之前创建的音乐生成任务状态。如果任务完成,将返回音频 URL、歌词、标题和封面等信息。

请求方式

GET /v1/music/tasks/{task_id}

调用示例

import requests

task_id = "task_123456789"
url = f"https://api.qhaigc.net/v1/music/tasks/{task_id}"
headers = {
    "Authorization": "Bearer sk-your-api-key-here"
}

response = requests.get(url, headers=headers)
print(response.json())

返回结果

成功查询且任务已完成时的结果:
{
  "created": 1755616949,
  "data": [
    {
      "id": "task_123456789",
      "url": "https://example.com/audio.mp3",
      "lyrics": "[00:00.00] 歌词内容...",
      "title": "春天的呼唤",
      "cover_url": "https://example.com/cover.jpg",
      "audio_url": "https://example.com/audio.mp3",
      "duration": 192.92,
      "tags": "J-Pop, anime, upbeat",
      "model": "suno-v4.5-plus"
    }
  ]
}

相关接口

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

task_id
string
required

Response

200 - application/json

成功响应

created
integer
data
object[]