简单的将 suno.ai web 转为 api 接口,可对接中转。
使用方式
以下api都可以增加一个Header参数
Authorization : Bearer Client
其中Client为登录suno.ai后的cookie中的__client=xxxxx的值
如果不填写默认使用config.yaml中的配置中的Client
译文:
curl --location --request POST 'localhost:3560/v1/chat/completions' \
--header 'Authorization: Bearer client' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "chirp-v3-0",
"messages": [
{
"role": "user",
"content": "制作歌曲《万能的数字》"
}
]
}'
创建音乐任务
curl --location --request POST 'localhost:3560/v2/generate' \
--header 'Content-Type: application/json' \
--data-raw '{
"gpt_description_prompt": "an atmospheric metal song about dancing all night long",
"mv": "chirp-v3-0",
"prompt": "",
"make_instrumental": false
}'
支持如下参数:
- 默认参数
- gpt_description_prompt: 生成音乐的描述
- mv: 音乐模型
- 提示:生成音乐的提示
- make_instrumental: 是否生成无人声音乐
{
"gpt_description_prompt": "an atmospheric metal song about dancing all night long",
"mv": "chirp-v3-0",
"prompt": "",
"make_instrumental": false
}
- 习惯
- 提示:歌词
- 标签: 音乐标签
- mv: 音乐模型
- title: 音乐标题
- continue_clip_id: 继续生成音乐的clip_id
- continue_at: 继续生成音乐的时间
{
"prompt": "[Verse]\nEvery morning, when I wake up\nI stumble to the kitchen to get my cup (cup)\nThe smell, the taste, it's like a dream\nI'm addicted to that caffeinated beam\n\n[Chorus]\nI need my java fix, it's my daily high (high)\nGotta have my coffee, don't ask me why (why)\nBrew it strong, brew it black, can't get enough\nThat sweet, dark liquid, it keeps me buzzin' (buzzin')\n\n[Verse 2]\nEspresso, latte, cappuccino too\nI'll take it any way, as long as it's brew\nFrom the fancy cafes to the corner shops\nI'm on a mission to find the perfect crop (yeah)",
"tags": "epic blues",
"mv": "chirp-v3-0",
"title": "Coffee Addiction",
"continue_clip_id": null,
"continue_at": null
}
- 自定义纯音乐
- 提示:歌词
- 标签: 音乐标签
- mv: 音乐模型
- title: 音乐标题
- continue_clip_id: 继续生成音乐的clip_id
- continue_at: 继续生成音乐的时间
{
"prompt": "",
"tags": "epic blues",
"mv": "chirp-v3-0",
"title": "Coffee Addiction",
"continue_clip_id": null,
"continue_at": null
}
查询音乐任务
curl --location --request POST 'localhost:3560/v2/feed' \
--header 'Content-Type: application/json' \
--data-raw '{
"ids":"id1,id2"
}'
隐藏内容
此处内容需要权限查看
4、注意事项
- 本项目仅用于学习交流,不得用于商业用途
- 个人账号部分功能无法使用
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。侵权投诉邮箱:780825556@qq.com