跳转到主要内容
POST
引用源音轨:基于已有歌曲的操作无需记任何上游 id,只需传 task_id(产出源音轨那次任务的我方 task_id)+ audio_index(结果 music[] 里第几首,1-based,默认 1)。
custom 决定字段是否生效:写了但模式不对的字段会被上游静默忽略(不报错)。custom=trueprompt(歌词)、titletagsnegative_tagsstyle_weightweirdness_constraintaudio_weightpersona_id 生效,gpt_description 被忽略;custom=false 时只认 gpt_description(此时必填,缺了提交期直接 400)。vocal_gender 两种模式都生效。不传 custom 时后端按此顺序推断:有 prompttrue;无 prompt 但有 gpt_descriptionfalse;否则有 tags/titletrue

用法

用法 A —— 指定风格翻唱(最常用,推荐) 给源歌曲 + 目标风格 tags,不用管 custom(系统看到 tags 会自动按 custom=true 处理):
想更精确可以再加 prompt(歌词)/ title 用法 B —— 灵感模式(custom=false 不指定具体风格,让上游自己发挥,但必须给 gpt_description 描述你想要的效果:
两种用法二选一,别只传 custom=false 却不给 gpt_description(会提交期直接 400)。

Authorizations

Authorization
string
必填
所有接口均需要使用Bearer Token进行认证获取 API Key:访问 API Key 管理页面 获取您的 API Key使用时在请求头中添加:

Body

model
string
默认值:"suno"
音频模型。当前传 suno(不传默认 suno)。
task_id
string
必填
产出源音轨那次任务的我方 task_id;缺失或无法解析源时提交期直接返回 400
audio_index
integer
默认值:"1"
引用源任务结果 data.music[] 中的第几首(1-based:1=第 1 首;默认 1;一次生成通常 2 首:索引 1 与 2)。
version
string
默认值:"v5.5"
生成版本:v3.5 / v4 / v4.5 / v4.5+ / v4.5-all / v5 / v5.5,影响音质与计费;不传默认 v5.5,非法值提交期直接返回 400
custom
boolean
true=自定义模式(用 prompt 作歌词);false=灵感模式(用 gpt_description);不传时按内容推断(见上方 Warning)。
prompt
string
歌词,custom=true 时生效(灵感模式下会被忽略)。
gpt_description
string
灵感提示词,custom=false必填(缺了提交期直接 400、不打上游、不扣费)。
title
string
标题。custom=true 时生效
tags
string
目标风格标签。custom=true 时生效
negative_tags
string
排除的风格标签。custom=true 时生效
style_weight
number
风格权重,0.001.00(超出范围提交期直接返回 400)。custom=true 时生效
weirdness_constraint
number
创意度权重,0.001.00(别名 weirdness)。custom=true 时生效
audio_weight
number
音频权重,0.001.00custom=true 时生效
vocal_gender
string
人声性别:Male / Female两种模式均生效
persona_id
string
Persona 风格 id。custom=true 时生效
获取结果:本接口为异步任务。提交后拿到 task_id,按 3–5s 间隔轮询 GET /v1/music/tasks/{task_id},直到 statuscompletedfailed(音乐生成通常 30–120s;生成中为 pendingprogress 排队 10 → 就绪 50 → 完成 100)。完成后在 data.result.music[]audio_url。失败时 data.error.message 为原因,自动退回预扣额度。

Response

code
integer
响应状态码
data
array
返回数据数组