v1

latestOpenAPI 3.0.32026-07-241112213.6 KB

Query Task

Query the status and output of an AI music generation task by taskId. outputs is empty while the task is in progress; on success, returns the generated audio fileId and access URL.

Status: Unfinished tasks are always returned as running; finished tasks return success or fail.

Credits: costCredit is the actual credit consumed; updated after task success.

get/v1/common_task/ai_music/task/query

Query parameters

taskIdstring required

Task ID returned from the submit API

needCloudFrontUrlboolean

When true, outputs[].url prefers CloudFront CDN URLs; default false returns S3 URLs

Headers

Topview-Uidstring required

User ID; must match the task owner

Authorizationstring required

API key for authentication. Format: Bearer {apiKey}

Response

Query successful

codestring

Business status code; 200 on success

messagestring

Status message

Example response

{
  "code": "200",
  "message": "Success",
  "result": {
    "taskId": "6f4b5a8c9d0e1f2a3b4c5d6",
    "status": "success",
    "costCredit": 1,
    "styles": "Hip Hop, Boom Bap",
    "enhancePrompt": true,
    "enhancePromptStyle": "Enhanced style text with richer descriptors",
    "outputs": [
      {
        "fileId": "output_file_id",
        "url": "https://cdn.example.com/output.mp3"
      }
    ]
  }
}