- 系统使用介绍
- API介绍
- 项目说明
- 导言
- 身份验证
- 发出请求
- 参数详情
- 聊天(Chat)
- 音频(Audio)
- 图像(Images)
- 文件(Files)
- 自动补全(Completions)
- 嵌入(Embeddings)
- 音乐接口
- 绘图接口
- 视频接口
- 本系统API
生成歌曲
POST
{{BASE_URL}}/suno/submit/music
{{BASE_URL}}/suno/generate
{{BASE_URL}}/suno/generate/description-mode
分为3种模式
只需要提交以下参数
gpt_description_prompt
make_instrumental
mv
Suno 会自动生成 歌词、标题、风格标签
需要提交参数
prompt
title
tags
make_instrumental
mv
需要在自定义模式基础上携带
task_id
continue_at
continue_clip_id
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Content-Type
string
可选
示例值:
application/json
Accept
string
可选
示例值:
application/json
Body 参数application/json
prompt
string
必需
mv
string
必需
title
string
必需
tags
string
必需
make_instrumental
boolean
必需
task_id
string
必需
continue_at
number
必需
continue_clip_id
string
必需
gpt_description_prompt
string
必需
示例
1.灵感模式
{
"gpt_description_prompt": "cat"
}
2.自定义模式
{
"prompt": "[Verse]\nWalking down the streets\nBeneath the city lights\nNeon signs flickering\nLighting up the night\nHeart beating faster\nLike a drum in my chest\nI'm alive in this moment\nFeeling so blessed\n\nStilettos on the pavement\nStepping with grace\nSurrounded by the people\nMoving at their own pace\nThe rhythm of the city\nIt pulses in my veins\nLost in the energy\nAs my worries drain\n\n[Verse 2]\nConcrete jungle shining\nWith its dazzling glow\nEvery corner hiding secrets that only locals know\nA symphony of chaos\nBut it's music to my ears\nThe hustle and the bustle\nWiping away my fears",
"tags": "emotional punk",
"mv": "chirp-v3-0",
"title": "City Lights"
}
3.续写
{
"prompt": "[Verse]\nWalking down the streets\nBeneath the city lights\nNeon signs flickering\nLighting up the night\nHeart beating faster\nLike a drum in my chest\nI'm alive in this moment\nFeeling so blessed\n\nStilettos on the pavement\nStepping with grace\nSurrounded by the people\nMoving at their own pace\nThe rhythm of the city\nIt pulses in my veins\nLost in the energy\nAs my worries drain\n\n[Verse 2]\nConcrete jungle shining\nWith its dazzling glow\nEvery corner hiding secrets that only locals know\nA symphony of chaos\nBut it's music to my ears\nThe hustle and the bustle\nWiping away my fears",
"tags": "bass-driven atmospheric heavy metal",
"mv": "chirp-v3-0",
"title": "City Lights",
"task_id": "736a6f88-bd29-4b1e-b110-37132a5325ac"
"continue_clip_id": "ce2cfbce-9ea0-45b0-9386-020c0ff54a49",
"continue_at": 80
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST '{{BASE_URL}}/suno/submit/music' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '1.灵感模式
{
"gpt_description_prompt": "cat"
}
2.自定义模式
{
"prompt": "[Verse]\nWalking down the streets\nBeneath the city lights\nNeon signs flickering\nLighting up the night\nHeart beating faster\nLike a drum in my chest\nI'\''m alive in this moment\nFeeling so blessed\n\nStilettos on the pavement\nStepping with grace\nSurrounded by the people\nMoving at their own pace\nThe rhythm of the city\nIt pulses in my veins\nLost in the energy\nAs my worries drain\n\n[Verse 2]\nConcrete jungle shining\nWith its dazzling glow\nEvery corner hiding secrets that only locals know\nA symphony of chaos\nBut it'\''s music to my ears\nThe hustle and the bustle\nWiping away my fears",
"tags": "emotional punk",
"mv": "chirp-v3-0",
"title": "City Lights"
}
3.续写
{
"prompt": "[Verse]\nWalking down the streets\nBeneath the city lights\nNeon signs flickering\nLighting up the night\nHeart beating faster\nLike a drum in my chest\nI'\''m alive in this moment\nFeeling so blessed\n\nStilettos on the pavement\nStepping with grace\nSurrounded by the people\nMoving at their own pace\nThe rhythm of the city\nIt pulses in my veins\nLost in the energy\nAs my worries drain\n\n[Verse 2]\nConcrete jungle shining\nWith its dazzling glow\nEvery corner hiding secrets that only locals know\nA symphony of chaos\nBut it'\''s music to my ears\nThe hustle and the bustle\nWiping away my fears",
"tags": "bass-driven atmospheric heavy metal",
"mv": "chirp-v3-0",
"title": "City Lights",
"task_id": "736a6f88-bd29-4b1e-b110-37132a5325ac"
"continue_clip_id": "ce2cfbce-9ea0-45b0-9386-020c0ff54a49",
"continue_at": 80
}'
返回响应
🟢200成功
application/json
Body
code
string
必需
message
string
必需
data
string
task_id
示例
{
"code": "success",
"message": "",
"data": "736a6f88-bd29-4b1e-b110-37132a5325ac"
}
修改于 2024-11-13 02:01:39