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>'
{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "<string>",
    "action": "GENERATIONS",
    "status": "SUCCESS",
    "fail_reason": "<string>",
    "submit_time": 123,
    "start_time": 123,
    "finish_time": 123,
    "progress": "100%",
    "data": [
      {
        "id": "<string>",
        "tags": "<string>",
        "title": "<string>",
        "prompt": "<string>",
        "audioUrl": "<string>",
        "duration": 123,
        "imageUrl": "<string>",
        "modelName": "<string>",
        "createTime": 123,
        "sourceAudioUrl": "<string>",
        "sourceImageUrl": "<string>",
        "streamAudioUrl": "<string>",
        "sourceStreamAudioUrl": "<string>"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://www.qhaigc.net/docs/llms.txt

Use this file to discover all available pages before exploring further.

功能说明

查询之前创建的音乐生成任务状态。该接口返回任务级状态信息,以及任务成功后生成的 2 首歌曲结果。

请求方式

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())

返回结果

成功查询且任务已完成时的结果:
{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "750ced71bcdde0f6b7677c967722b888",
    "action": "GENERATIONS",
    "status": "SUCCESS",
    "fail_reason": "",
    "submit_time": 1773486571,
    "start_time": 0,
    "finish_time": 1773486652,
    "progress": "100%",
    "data": [
      {
        "id": "6ea663c2-0e79-4aad-8c97-3c344cde3d42",
        "tags": "pop, Bright, uptempo J-Pop groove at 150 BPM, female vocals, j-pop",
        "title": "春天转圈圈",
        "prompt": "[Verse 1]\\n闹钟还在打喷嚏...",
        "audioUrl": "https://tempfile.aiquickdraw.com/r/4676fa10852c46feac6cd00c7bb86d59.mp3",
        "duration": 180.4,
        "imageUrl": "https://musicfile.removeai.ai/NmVhNjYzYzItMGU3OS00YWFkLThjOTctM2MzNDRjZGUzZDQy.jpeg",
        "modelName": "chirp-bluejay",
        "createTime": 1773486651435,
        "sourceAudioUrl": "https://cdn1.suno.ai/6ea663c2-0e79-4aad-8c97-3c344cde3d42.mp3",
        "sourceImageUrl": "https://cdn2.suno.ai/image_6ea663c2-0e79-4aad-8c97-3c344cde3d42.jpeg",
        "streamAudioUrl": "https://musicfile.removeai.ai/NmVhNjYzYzItMGU3OS00YWFkLThjOTctM2MzNDRjZGUzZDQy",
        "sourceStreamAudioUrl": "https://cdn1.suno.ai/6ea663c2-0e79-4aad-8c97-3c344cde3d42.mp3"
      },
      {
        "id": "0b5ff5be-5209-460d-b346-cc2fc186a240",
        "tags": "pop, Bright, uptempo J-Pop groove at 150 BPM, female vocals, j-pop",
        "title": "春天转圈圈",
        "prompt": "[Verse 1]\\n闹钟还在打喷嚏...",
        "audioUrl": "https://tempfile.aiquickdraw.com/r/ea9409e9726141a686bb6a44409ed647.mp3",
        "duration": 180.36,
        "imageUrl": "https://musicfile.removeai.ai/MGI1ZmY1YmUtNTIwOS00NjBkLWIzNDYtY2MyZmMxODZhMjQw.jpeg",
        "modelName": "chirp-bluejay",
        "createTime": 1773486651435,
        "sourceAudioUrl": "https://cdn1.suno.ai/0b5ff5be-5209-460d-b346-cc2fc186a240.mp3",
        "sourceImageUrl": "https://cdn2.suno.ai/image_0b5ff5be-5209-460d-b346-cc2fc186a240.jpeg",
        "streamAudioUrl": "https://musicfile.removeai.ai/MGI1ZmY1YmUtNTIwOS00NjBkLWIzNDYtY2MyZmMxODZhMjQw",
        "sourceStreamAudioUrl": "https://cdn1.suno.ai/0b5ff5be-5209-460d-b346-cc2fc186a240.mp3"
      }
    ]
  }
}

相关接口

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

成功响应

code
string
Example:

"success"

message
string
Example:

""

data
object