创建音乐生成任务
音乐生成提交接口,兼容旧 /suno/submit/music 路径。返回任务 ID,后续通过 /suno/fetch/{task_id} 查询。
音乐生成任务提交接口。路径保持 /suno/submit/music,实际可通过 upstream_model、music_model、engine、model_id 或 modelId 选择生成引擎。创建接口返回 task_id,随后用 /suno/fetch/{task_id} 查询输出。
提示词描述模式
适合只描述风格、情绪、语言、歌手类型和场景,由模型自动生成歌曲内容。
{
"model": "suno_music",
"upstream_model": "suno-v5",
"prompt": "Imitating "Billie Jean," create a DJ song with the theme of "the artificial intelligence revolution."",
"make_instrumental": false
}
轻音乐或纯伴奏
可使用 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、lyric、custom_lyrics 或 customLyrics。
{
"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} 查询状态、音频地址、封面、标题、歌词和上游返回的原始片段信息。
授权
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
请求体
固定传 suno_music。
suno_music "suno_music"
提示词描述模式下为音乐风格、情绪和场景;歌词高级模式下可作为歌词兼容字段。
生成引擎选择值。
"suno-v5"
upstream_model 的兼容别名。
upstream_model 的兼容别名。
上游模型 ID 兼容字段。
model_id 的 camelCase 兼容字段。
描述模式提示词兼容字段。
是否生成纯伴奏。
是否按轻音乐/背景音乐方向生成。
是否按纯音乐方向生成。
是否使用自定义模式。
custom_mode 的 camelCase 兼容字段。
歌曲标题。
风格标签,例如 electro pop, female vocal。
风格兼容字段。
曲风兼容字段。
曲风兼容字段。
歌词内容。
lyrics 兼容别名。
lyrics 兼容别名。
lyrics 兼容别名。
