跳转到主要内容
POST
custom 决定字段是否生效:写了但模式不对的字段会被上游静默忽略(不报错)。custom=true(自定义)时 prompt(歌词)、titlestylenegative_tagsauto_lyricspersona_idstyle_weightweirdness_constraintaudio_weight 生效;custom=false(灵感)时 prompt 作灵感描述,title/style 及上述自定义字段被忽略。vocal_gender 两种模式都生效。
本端点走独立路由,字段名与其他端点略有不同:style(而非 tags)。

Authorizations

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

Body

model
string
默认值:"suno"
音频模型。当前传 suno(不传默认 suno)。
custom
boolean
默认值:"false"
false=灵感模式;true=自定义模式(prompt 作歌词)。默认 false
instrumental
boolean
默认值:"false"
true=纯音乐、无人声。默认 false
version
string
必填
生成版本:v3.5 / v4 / v4.5 / v4.5+ / v4.5-all / v5 / v5.5,影响音质与计费。两种模式下均必填,不传直接返回 400
prompt
string
灵感提示词 / 歌词。custom=false 时必填(作灵感描述);custom=true 时:instrumental=false必填(作歌词),instrumental=true 可不填。缺失时提交期直接返回 400(不打上游、不扣费)。
title
string
标题(自定义模式)。custom=false(灵感模式)时忽略
style
string
风格标签(自定义模式,对应上游 tags)。custom=false(灵感模式)时忽略
negative_tags
string
负向风格标签(不希望出现的风格)。custom=true 时生效
auto_lyrics
boolean
true=对输入歌词进行二次创作。custom=true 时生效
persona_id
string
Persona 风格 id。custom=true 时生效
vocal_gender
string
人声性别:Male / Female(也接受 m / f / male / female,后端自动归一)。两种模式均生效
style_weight
number
风格权重,0.001.00custom=true 时生效
weirdness_constraint
number
创意度,0.001.00custom=true 时生效
audio_weight
number
音频权重,0.001.00custom=true 时生效
获取结果:本接口为异步任务。提交后拿到 task_id,按 3–5s 间隔轮询 GET /v1/music/tasks/{task_id},直到 statuscompletedfailed(音乐生成通常 30–120s;生成中为 pendingprogress 排队 10 → 就绪 50 → 完成 100)。完成后在 data.result.music[]audio_url(另有 image_url / video_url / title / duration 等)。失败时 data.error.message 为原因,自动退回预扣额度。

Response

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