Skip to main content
POST
引用源音轨:源音轨必须来自 POST /v1/music/generations/uploadTask 创建的上传任务。传入该任务的 task_id,并用 audio_index 指定 data.result.music[] 中的音轨(1-based,默认 1)。普通生成任务不能作为本接口的源任务。
custom 决定字段是否生效;无论字段是否在当前模式生效,已提交字段仍须满足类型、范围和长度要求。custom=true 时 prompt(歌词)、title、tags、negative_tags、style_weight、weirdness、audio_weight 生效,gpt_description 被忽略;custom=false 时只认 gpt_description(此时必填,缺了提交期直接 400)。vocal_gender 两种模式都生效。不传 custom 时后端按此顺序推断:有 prompt → true;无 prompt 但有 gpt_description → false;否则有 tags/title → true。

Authorizations

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

Body

string
默认值:"suno"
音频模型。当前传 suno(不传默认 suno)。
string
必填
POST /v1/music/generations/uploadTask 返回的上传任务 ID。普通生成任务不能使用;缺失或无法解析源时提交期直接返回 400。
integer
默认值:"1"
引用源任务结果 data.result.music[] 中的第几首(1-based;默认 1;一次生成通常 2 首:索引 1 与 2)。
string
默认值:"v6"
公共版本:v6 / v6-wild / v6-mini;省略时默认 v6。使用 custom_model_id 时省略本字段。
string
创建模型任务返回的完整 UUID,与 version 互斥。
boolean
true=自定义模式(用 prompt 作歌词);false=灵感模式(用 gpt_description);不传时按内容推断(见上方 Warning)。
string
歌词,custom=true 时生效(灵感模式下会被忽略)。
string
灵感提示词,custom=false 时必填(缺了提交期直接 400、不扣费)。
string
标题。仅 custom=true 时生效。
string
风格标签。仅 custom=true 时生效。
string
排除的风格标签。仅 custom=true 时生效。
number
风格权重,0.00–1.00(超出范围提交期直接返回 400)。仅 custom=true 时生效。
number
创意度权重,0.00–1.00。兼容旧名 weirdness_constraint;新请求请使用 weirdness。
number
音频权重,0.00–1.00。仅 custom=true 时生效。
string
人声性别:Male / Female。两种模式均生效。
string
风格变化程度:off / normal / high / extra / max。
boolean
默认值:"false"
是否启用 Max 模式。启用时要求自定义模式,并按普通售价的 2 倍计费。
string
输出音频格式:mp3 / m4a / wav。本接口不支持目标时长字段。
本接口不支持 auto_lyrics、persona_id、instrumental 或目标时长字段。
获取结果:本接口为异步任务。提交后拿到 task_id,按 3–5s 间隔轮询 GET /v1/music/tasks/{task_id},直到 status 为 completed 或 failed(音乐生成通常 30–120s;生成中 status 可能为 pending 或 processing,progress 为 0–100 的整数且不保证按固定节点变化)。完成后在 data.result.music[] 取 audio_url。失败时 data.error.message 为原因,自动退回预扣额度。

Response

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