Query task status
curl --request POST \
--url https://api.wizzx.ai/api/v1/task/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.wizzx.ai/api/v1/task/status"
payload = { "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({task_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.wizzx.ai/api/v1/task/status', 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://api.wizzx.ai/api/v1/task/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'task_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wizzx.ai/api/v1/task/status"
payload := strings.NewReader("{\n \"task_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wizzx.ai/api/v1/task/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizzx.ai/api/v1/task/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"task_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "success",
"data": {
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"result_urls": [
"<string>"
],
"error": "<string>",
"credits_deducted": 1,
"result": {
"tracks": [
{
"index": 2,
"audio_url": "<string>",
"image_url": "<string>",
"video_url": "<string>",
"title": "<string>",
"style": "<string>",
"lyrics": "<string>",
"duration": 123
}
],
"lyrics": [
{
"text": "<string>",
"title": "<string>",
"style": "<string>"
}
],
"style": "<string>",
"files": [
{
"format": "mp3",
"url": "<string>"
}
],
"video_url": "<string>",
"bpm": {
"avg": 123,
"min": 123,
"max": 123
},
"persona_id": "<string>",
"model_id": "<string>",
"midi": {},
"aligned_lyrics": {},
"data": "<unknown>"
}
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}任务管理
查询任务状态
POST 查询异步生成任务状态
POST
/
api
/
v1
/
task
/
status
Query task status
curl --request POST \
--url https://api.wizzx.ai/api/v1/task/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.wizzx.ai/api/v1/task/status"
payload = { "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({task_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.wizzx.ai/api/v1/task/status', 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://api.wizzx.ai/api/v1/task/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'task_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wizzx.ai/api/v1/task/status"
payload := strings.NewReader("{\n \"task_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wizzx.ai/api/v1/task/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizzx.ai/api/v1/task/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"task_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "success",
"data": {
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"result_urls": [
"<string>"
],
"error": "<string>",
"credits_deducted": 1,
"result": {
"tracks": [
{
"index": 2,
"audio_url": "<string>",
"image_url": "<string>",
"video_url": "<string>",
"title": "<string>",
"style": "<string>",
"lyrics": "<string>",
"duration": 123
}
],
"lyrics": [
{
"text": "<string>",
"title": "<string>",
"style": "<string>"
}
],
"style": "<string>",
"files": [
{
"format": "mp3",
"url": "<string>"
}
],
"video_url": "<string>",
"bpm": {
"avg": 123,
"min": 123,
"max": 123
},
"persona_id": "<string>",
"model_id": "<string>",
"midi": {},
"aligned_lyrics": {},
"data": "<unknown>"
}
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1,
"balance": 1,
"required": 1,
"shortfall": 1,
"billing_url": "<string>"
}查询任务
使用提交响应中的 Wizzxtask_id,并携带同一个 API Key。推荐使用 RESTful GET /api/v1/task/{task_id}(也支持 GET /api/v1/task/status?task_id={task_id} 或 POST /api/v1/task/status)。三种方式都只读取已保存的任务状态,不会再次向 Provider 提交任务。
curl --fail-with-body --silent --show-error \
https://api.wizzx.ai/api/v1/task/4bbbc9e0-8de8-4f35-a31e-8596c1a6d18a \
-H "Authorization: Bearer <api_key>"
POST:
curl --fail-with-body --silent --show-error \
-X POST https://api.wizzx.ai/api/v1/task/status \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
--data '{
"task_id": "4bbbc9e0-8de8-4f35-a31e-8596c1a6d18a"
}'
PENDING、QUEUED、PROCESSING、REVIEW_REQUIRED、SUCCEEDED、FAILED。内部 DISPATCHING 会以 PROCESSING 返回。
非终态继续查询同一个 Task ID。遇到未知状态、REVIEW_REQUIRED 或提交结果不明确时,不得自动创建替代任务。若任务失败且预留积分已退回(或未实际扣费),credits_deducted 返回 0。
响应
成功的任务在result_urls 中列出生成的媒体。所有模型的该字段保持不变。
{
"code": 0,
"message": "success",
"data": {
"task_id": "4bbbc9e0-8de8-4f35-a31e-8596c1a6d18a",
"status": "SUCCEEDED",
"result_urls": ["https://cdn.wizzx.ai/images/2026/10/15/result.png"],
"error": "",
"credits_deducted": 9
},
"request_id": "0d9d7b8e-51f6-4a1e-8d0e-9b7c2a6f4c33"
}
音乐结果
已完成的音乐任务还会返回结构化的result 对象。返回哪些字段取决于动作;没有值的字段会被省略。其他模型不返回 result。
{
"code": 0,
"message": "success",
"data": {
"task_id": "6f0c1c52-2a4b-4d53-9a5e-3c0f2f7d9e11",
"status": "SUCCEEDED",
"result_urls": [
"https://cdn.wizzx.ai/audio/2026/10/15/track-1.mp3",
"https://cdn.wizzx.ai/audio/2026/10/15/track-2.mp3"
],
"error": "",
"credits_deducted": 60,
"result": {
"tracks": [
{
"index": 1,
"audio_url": "https://cdn.wizzx.ai/audio/2026/10/15/track-1.mp3",
"image_url": "https://cdn.wizzx.ai/images/2026/10/15/cover-1.jpg",
"title": "Midnight Drive",
"style": "synthwave, female vocal",
"lyrics": "[Verse]\n雨夜里霓虹闪烁的街道",
"duration": 119.8
},
{
"index": 2,
"audio_url": "https://cdn.wizzx.ai/audio/2026/10/15/track-2.mp3",
"image_url": "https://cdn.wizzx.ai/images/2026/10/15/cover-2.jpg",
"title": "Midnight Drive",
"style": "synthwave, female vocal",
"lyrics": "[Verse]\n雨夜里霓虹闪烁的街道",
"duration": 124.1
}
]
}
},
"request_id": "0d9d7b8e-51f6-4a1e-8d0e-9b7c2a6f4c33"
}
| 字段 | 由哪些动作返回 | 内容 |
|---|---|---|
tracks[] | 所有产出音频的动作 | index、audio_url、image_url、video_url、title、style、lyrics、duration(秒)。后续动作把 index 作为 audio_index 引用该曲目 |
lyrics[] | lyrics | title、text、style |
style | upsample-tags | 增强后的风格文本 |
files[] | download | format 与 url,按请求顺序排列 |
video_url | music-video | MP4 地址 |
bpm | bpm | avg、min、max |
persona_id | persona、create-voice | 仅供参考。引用该 Persona 时,把本任务的 task_id 作为 persona_task_id |
model_id | create-model | 仅供参考。引用该模型时,把本任务的 task_id 作为 custom_model_task_id |
midi | midi | state 与 instruments[](含 name 和 notes[]) |
aligned_lyrics | aligned-lyrics | alignment[] 与 waveform_data |
data | – | 输出没有已知结构时的原始结果 |
- 曲目保持原有顺序,即使某首曲目没有
audio_url(例如upload之后)。 - 音乐任务的
result_urls依次列出每首曲目的audio_url、download文件和音乐视频。歌词、BPM、MIDI 等文本与分析结果没有 URL,请从result读取。 - 媒体 URL 通常由
cdn.wizzx.ai提供。若复制到 CDN 失败,会返回原始 URL,该地址可能过期,请及时下载需要保留的结果。 - 2026 年 10 月 15 日之前完成的音乐任务没有
result。
此页面对您有帮助吗?
