curl --request POST \
--url https://api.aiid.edu.kg/suno/submit/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "suno_music",
"upstream_model": "suno-v6",
"prompt": "Create an energetic retro-pop DJ song about the artificial intelligence revolution.",
"make_instrumental": false
}
'{
"code": "success",
"message": "",
"data": "task_xxx"
}创建音乐或声音生成任务
音乐与声音生成提交接口,兼容旧 /suno/submit/music 路径。返回任务 ID,后续通过 /suno/fetch/{task_id} 查询。
音乐与声音生成任务提交接口。通过 upstream_model 传子模型名称。创建接口返回 task_id,随后用 /suno/fetch/{task_id} 查询输出。
未传 upstream_model(或只传 {"model":"suno_music"})时,默认使用 Suno v5.5。需要继续使用旧版 Suno 时,请显式传 "upstream_model":"suno-v5"。
可用子模型
| 类型 | upstream_model |
|---|---|
| 音乐 | suno-v6 |
| 音乐 | suno-v5.5 |
| 音乐 | suno-v5 |
| 音乐 | lyria-3-pro |
| 声音 | seed-audio-1.0 |
| 声音 | minimax-speech-2.8-hd |
提示词描述模式
适合只描述风格、情绪、语言、歌手类型和场景,由模型自动生成歌曲内容。
{
"model": "suno_music",
"upstream_model": "suno-v6",
"prompt": "Create an energetic retro-pop DJ song about the artificial intelligence revolution.",
"make_instrumental": false
}
声音生成
MiniMax Speech 可通过 extraParams 设置语音参数。
{
"model": "suno_music",
"upstream_model": "minimax-speech-2.8-hd",
"prompt": "欢迎使用新版语音生成服务。",
"extraParams": {
"voice": "moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85",
"outputFormat": "mp3",
"sampleRate": 32000,
"speed": 1,
"volume": 1,
"pitch": 0
}
}
MiniMax Speech 未传语音参数时,服务端默认发送上例中的 voice、outputFormat=mp3、sampleRate=32000、speed=1、volume=1 和 pitch=0。
Lyria 3 Pro 使用 upstream_model=lyria-3-pro:
{
"model": "suno_music",
"upstream_model": "lyria-3-pro",
"prompt": "Cinematic orchestral music with a hopeful finale."
}
轻音乐或纯伴奏
可使用 light_music=true 或 make_instrumental=true。light_music 表示偏轻音乐/背景音乐,make_instrumental 表示不生成演唱人声。
{
"model": "suno_music",
"upstream_model": "minimax-music-v2.6",
"prompt": "Warm cafe background music with soft piano and strings, relaxing and cinematic.",
"light_music": true,
"make_instrumental": true
}
歌词高级模式
适合业务侧已经准备好歌词,需要指定标题和风格标签。传 custom_mode=true,并使用 lyrics 提交歌词。
{
"model": "suno_music",
"upstream_model": "mureka-v9",
"custom_mode": true,
"title": "Summer Sea Breeze",
"tags": "electro pop, female vocal, bright summer",
"lyrics": "[Verse]\nSea breeze moves across the white sand\n[Chorus]\nTurn the summer into a beam of light"
}
查询
创建成功后保存返回的 data 任务 ID,例如 task_xxx,调用 GET /suno/fetch/{task_id} 查询状态、音频地址、封面、标题、歌词和上游返回的原始片段信息。
curl --request POST \
--url https://api.aiid.edu.kg/suno/submit/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "suno_music",
"upstream_model": "suno-v6",
"prompt": "Create an energetic retro-pop DJ song about the artificial intelligence revolution.",
"make_instrumental": false
}
'{
"code": "success",
"message": "",
"data": "task_xxx"
}授权
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
请求体
固定传 suno_music。
suno_music "suno_music"
音乐或声音的描述提示词。
子模型名称,如 suno-v6 或 suno-v5.5;默认 suno-v5.5。
"suno-v6"
MiniMax Speech 2.8 HD 的 voice、outputFormat、sampleRate、speed、volume、pitch 参数。
是否生成纯伴奏。
是否按轻音乐/背景音乐方向生成。
是否按纯音乐方向生成。
是否使用自定义模式。
歌曲标题。
风格标签,例如 electro pop, female vocal。
歌词内容。
