Submit Suno task
curl --request POST \
--url https://api.wizzx.ai/api/v1/task/submit/suno \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Late-night city lo-fi piano with the sound of rain",
"instrumental": true
}
'import requests
url = "https://api.wizzx.ai/api/v1/task/submit/suno"
payload = {
"prompt": "Late-night city lo-fi piano with the sound of rain",
"instrumental": True
}
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({
prompt: 'Late-night city lo-fi piano with the sound of rain',
instrumental: true
})
};
fetch('https://api.wizzx.ai/api/v1/task/submit/suno', 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/submit/suno",
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([
'prompt' => 'Late-night city lo-fi piano with the sound of rain',
'instrumental' => true
]),
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/submit/suno"
payload := strings.NewReader("{\n \"prompt\": \"Late-night city lo-fi piano with the sound of rain\",\n \"instrumental\": true\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/submit/suno")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Late-night city lo-fi piano with the sound of rain\",\n \"instrumental\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizzx.ai/api/v1/task/submit/suno")
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 \"prompt\": \"Late-night city lo-fi piano with the sound of rain\",\n \"instrumental\": true\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "success",
"data": {
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_key": "<string>",
"credits_deducted": 1,
"action": "<string>"
},
"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>"
}{
"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>"
}音频生成
提交 Suno 任务
Suno V6 音乐生成的旧版 POST 入口,等同于 generate 音乐动作
POST
/
api
/
v1
/
task
/
submit
/
suno
Submit Suno task
curl --request POST \
--url https://api.wizzx.ai/api/v1/task/submit/suno \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Late-night city lo-fi piano with the sound of rain",
"instrumental": true
}
'import requests
url = "https://api.wizzx.ai/api/v1/task/submit/suno"
payload = {
"prompt": "Late-night city lo-fi piano with the sound of rain",
"instrumental": True
}
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({
prompt: 'Late-night city lo-fi piano with the sound of rain',
instrumental: true
})
};
fetch('https://api.wizzx.ai/api/v1/task/submit/suno', 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/submit/suno",
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([
'prompt' => 'Late-night city lo-fi piano with the sound of rain',
'instrumental' => true
]),
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/submit/suno"
payload := strings.NewReader("{\n \"prompt\": \"Late-night city lo-fi piano with the sound of rain\",\n \"instrumental\": true\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/submit/suno")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Late-night city lo-fi piano with the sound of rain\",\n \"instrumental\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizzx.ai/api/v1/task/submit/suno")
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 \"prompt\": \"Late-night city lo-fi piano with the sound of rain\",\n \"instrumental\": true\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "success",
"data": {
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_key": "<string>",
"credits_deducted": 1,
"action": "<string>"
},
"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>"
}{
"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 /api/v1/music/generate,并继续提供支持。新接入请使用音乐动作:除生成外,还支持续写、翻唱、编辑、分轨、分析与下载。
灵感模式(custom: false,默认)下 prompt 为必填的歌曲描述。自定义模式(custom: true)下 prompt 填写歌词,并可添加 title、style、negative_tags、auto_lyrics、persona_task_id、max_mode 与 duration。传入 generate 不接受的字段会返回 HTTP 422。一个请求通常返回两首,任务成功后请从 result_urls 或 result.tracks 读取全部曲目。
curl --fail-with-body --silent --show-error \
-X POST https://api.wizzx.ai/api/v1/task/submit/suno \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
--data '{
"prompt": "深夜城市 lo-fi 钢琴,伴着雨声",
"instrumental": true
}'
max_mode: true(仅自定义模式)为 120 积分,价格覆盖返回的所有曲目。具体积分以 /pricing 为准。请求头
请求体
application/json
- Option 1
- Option 2
Legacy entry for Suno music generation; identical to POST /api/v1/music/generate. Inspiration mode (custom=false) takes a song description in prompt. Custom mode (custom=true) takes lyrics in prompt plus optional title, style, negative_tags, auto_lyrics, persona_task_id, max_mode, and duration. One request usually returns 2 tracks. Billed per request; max_mode doubles the price.
此页面对您有帮助吗?
