生成歌曲(自定义模式)
▼
Authorization
在 Header 添加参数 Authorization,其值为 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
请求参数
Header 参数
Content-Type
string
必需
示例: application/json
Accept
string
必需
示例: application/json
Authorization
string
可选
示例: Bearer {{YOUR_API_KEY}}
Body 参数 application/json
prompt
string
必需
自定义的完整歌词。
mv
string
必需
模型版本号
title
string
必需
歌词标题
tags
string
可选
歌曲风格
continue_at
integer
可选
续写歌曲的id
continue_clip_id
string
可选
task
string
可选
任务类型,默认"generate"
示例
{
"prompt": "[Verse]\nMove your paws\nLeft and right\nJump around\nFeel the light\nWhiskers twitch\nTails in the air\nDancing cats\nEverywhere\n\n[Chorus]\nCat dance\nOh\nLet's go!\nSwing your tails\nDon’t say no (don’t say no!)\nPurr and twirl\nLike a show\nCat dance\nLet's steal the glow\n\n[Verse 2]\nTiptoe steps\nSoft and sweet\nTiny paws\nUnbeatable beat\nMeow to the rhythm\nClaws precise\nEvery move\nFeline paradise\n\n[Chorus]\nCat dance\nOh\nLet's go!\nSwing your tails\nDon’t say no (don’t say no!)\nPurr and twirl\nLike a show\nCat dance\nLet's steal the glow\n\n[Bridge]\nOoh-ooh\nBounce and sway (ooh-ooh!)\nMoonlit grooves\nNight turns to day\nLean and stretch\nStrike your pose\nEvery kitty steals the show\n\n[Chorus]\nCat dance\nOh\nLet's go!\nSwing your tails\nDon’t say no (don’t say no!)\nPurr and twirl\nLike a show\nCat dance\nLet's steal the glow",
"mv": "chirp-v4",
"title": "Cat Dance",
"tags": "romantic raga",
"continue_at": 120,
"continue_clip_id": "",
"task": ""
}
请求示例代码
curl --location --request POST 'https://api.quickrouter.ai/suno/submit/music' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "[Verse]\nMove your paws\nLeft and right\nJump around\nFeel the light\nWhiskers twitch\nTails in the air\nDancing cats\nEverywhere\n\n[Chorus]\nCat dance\nOh\nLet's go!\nSwing your tails\nDon’t say no (don’t say no!)\nPurr and twirl\nLike a show\nCat dance\nLet's steal the glow\n\n[Verse 2]\nTiptoe steps\nSoft and sweet\nTiny paws\nUnbeatable beat\nMeow to the rhythm\nClaws precise\nEvery move\nFeline paradise\n\n[Chorus]\nCat dance\nOh\nLet's go!\nSwing your tails\nDon’t say no (don’t say no!)\nPurr and twirl\nLike a show\nCat dance\nLet's steal the glow\n\n[Bridge]\nOoh-ooh\nBounce and sway (ooh-ooh!)\nMoonlit grooves\nNight turns to day\nLean and stretch\nStrike your pose\nEvery kitty steals the show\n\n[Chorus]\nCat dance\nOh\nLet's go!\nSwing your tails\nDon’t say no (don’t say no!)\nPurr and twirl\nLike a show\nCat dance\nLet's steal the glow",
"mv": "chirp-v4",
"title": "Cat Dance",
"tags": "romantic raga",
"continue_at": 120,
"continue_clip_id": "",
"task": ""
}'
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer YOUR_API_KEY");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"prompt": "[Verse]\nMove your paws\nLeft and right\nJump around\nFeel the light\nWhiskers twitch\nTails in the air\nDancing cats\nEverywhere\n\n[Chorus]\nCat dance\nOh\nLet);
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.quickrouter.ai/suno/submit/music", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import http.client
import json
conn = http.client.HTTPSConnection("api.quickrouter.ai")
payload = json.dumps({
"prompt": "[Verse]\nMove your paws\nLeft and right\nJump around\nFeel the light\nWhiskers twitch\nTails in the air\nDancing cats\nEverywhere\n\n[Chorus]\nCat dance\nOh\nLet)
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
conn.request("POST", "/suno/submit/music", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
返回响应
响应参数 🟢 200 OK · application/json
code
string
必需
data
string
必需
message
string
必需
示例
{
"code": "success",
"data": "950bf3af-78a6-420e-8c01-3bde0bbb3ef9",
"message": ""
}