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,
"provider_task_id": "<string>",
"provider_key": "<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
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}提交 Suno 任务
POST Suno V6 音乐生成任务(灵感模式或自定义模式)
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,
"provider_task_id": "<string>",
"provider_key": "<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
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}提交任务
灵感模式(custom: false,默认)下 prompt 为必填的歌曲描述。自定义模式(custom: true)下 prompt 填写歌词,并可添加 title、style、negative_tags、max_mode 与 duration。一个请求通常返回两首,任务成功后请从 result_urls 读取全部曲目。
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 为准。授权
Wizzx API key. This is not a JWT.
请求体
- Option 1
- Option 2
Music generation. Inspiration mode (custom=false) takes a song description in prompt. Custom mode (custom=true) takes lyrics in prompt plus optional title, style, negative_tags, max_mode, and duration. One request usually returns 2 tracks in result_urls. Billed per request; max_mode doubles the price.
Inspiration mode: required song description, at most 3000 characters. Custom mode: lyrics, at most 5000 characters; required unless instrumental is true.
1 - 3000false Custom mode only. Higher quality at double the price.
false Case-insensitive. All versions cost the same.
v6, v6-wild, v6-mini Custom mode only.
80Custom mode only. Style tags.
1000Custom mode only. Styles to avoid.
1000Case-insensitive; m and f are accepted. Cannot be combined with instrumental=true.
Male, Female Custom mode only. Target length in seconds; actual length may differ. Does not change the price.
10 <= x <= 360此页面对您有帮助吗?
