添加音轨
- 在已有音轨上叠加一条 stem(声部),异步任务
- 与「添加伴奏」不同:这里只加一条特定乐器
- 生成参数与其他 suno 操作同源
认证
All endpoints authenticate with a Bearer token.
Get an API key: open the console and create one.
Add it to the request header:
Authorization: Bearer YOUR_OAIRoute_KEY引用源音轨
产出源音轨那次任务的 task_id。缺失或解析不到源任务时提交阶段返回 400。
指定源任务结果 data.result.music[] 中的第几首,默认 1,从 1 开始计数。一次生成一般是 2 首。
The task_id of the task that produced the source track. When it's missing or the source task can't be resolved, submission returns a 400.
Which track in the source task's data.result.music[], default 1, counting from 1. A single generation usually has 2.
生成参数
音频模型,当前只传 suno。
公共版本,默认 v6,可选 v6-wild、v6-mini。使用 custom_model_id 时应省略。
创建模型任务返回的完整 UUID,与 version 互斥。
true 为自定义模式,用 prompt 当歌词;false 为灵感模式,用 gpt_description。
不传时按传入内容推断:有 prompt 判 true,仅有 gpt_description 判 false,仅有 tags 或 title 判 true。
歌词,仅在 custom=true 时生效。
灵感提示词。custom=false 时必填,该模式下缺失会直接 400 且不扣费。
标题,仅 custom=true 时生效。
风格标签,仅 custom=true 时生效。这里就是描述要加什么声部的地方,例如 strings, warm。
需排除的风格标签,仅 custom=true 时生效。
风格权重,取值 0.00 到 1.00。超范围提交即 400,仅 custom=true 时生效。
创意权重,取值 0.00 到 1.00。旧名 weirdness_constraint 仍兼容。
音频权重,取值 0.00 到 1.00,仅 custom=true 时生效。
风格变化程度,可选 off、normal、high、extra、max。
启用 Max 模式,默认 false。要求自定义模式,按普通价格 2 倍计费。
输出格式,可选 mp3、m4a、wav。
The audio model; currently only suno.
The public version; defaults to v6, with v6-wild and v6-mini available. Omit when using custom_model_id.
The full UUID returned by a model creation task; mutually exclusive with version.
true is custom mode, with prompt as lyrics; false is inspiration mode, using gpt_description.
When omitted it's inferred from the content: prompt present means true, only gpt_description means false, only tags or title means true.
Lyrics; effective only with custom=true.
The inspiration prompt. Required when custom=false; in that mode, missing returns a 400 with no charge.
The title; effective only with custom=true.
Style tags; effective only with custom=true. This is where you describe which part to add, e.g. strings, warm.
Style tags to exclude; effective only with custom=true.
Style weight, 0.00 to 1.00. Out of range returns a 400 at submission; effective only with custom=true.
Creativity weight, 0.00 to 1.00. The old name weirdness_constraint is still supported.
Audio weight, 0.00 to 1.00; effective only with custom=true.
Degree of style variation: off, normal, high, extra, max.
Enables Max mode; defaults to false. Requires custom mode; billed at 2× the regular price.
Output format: mp3, m4a, or wav.
不支持的字段
auto_lyrics、persona_id、instrumental、vocal_gender、目标时长字段都不支持。
这里连 vocal_gender 都不支持——本接口是加器乐声部,不涉及人声性别。要加人声用「添加人声」接口。
auto_lyrics, persona_id, instrumental, vocal_gender, and target duration fields are all unsupported.
Even vocal_gender is unsupported here — this endpoint adds instrumental parts, which don't involve vocal gender. To add vocals, use "Add vocals".
响应
状态码。
提交后为 submitted。
任务唯一标识,用于轮询。
The status code.
submitted after submission.
The unique task identifier, for polling.
取结果
轮询 GET /v1/music/tasks/{task_id},建议间隔 3 到 5 秒,终止条件是 status 为 completed 或 failed。
通常耗时 30 到 120 秒,中间状态可能是 pending 或 processing。progress 为 0 到 100 的整数,变化节点不固定。
完成后从 data.result.music[] 读取 audio_url。失败原因见 data.error.message,预扣额度会自动退回。
Poll GET /v1/music/tasks/{task_id}, every 3 to 5 seconds; stop when status is completed or failed.
It usually takes 30 to 120 seconds, with intermediate states of pending or processing. progress is an integer from 0 to 100 that doesn't change on fixed steps.
On completion, read audio_url from data.result.music[]. The failure reason is in data.error.message, and the held balance is refunded automatically.
三个「添加」接口的分工
| 接口 | 加什么 | 用途 |
|---|---|---|
| 添加人声 | 演唱 | 给纯伴奏配唱 |
| 添加伴奏 | 整套伴奏 | 给清唱配器 |
| 添加音轨(本页) | 单条声部 | 给成品补弦乐、补和声 |
| Endpoint | What it adds | Use |
|---|---|---|
| Add vocals | Singing | Put vocals over an instrumental |
| Add instrumental | A full backing track | Put backing under a cappella |
| Add stem (this page) | One part | Add strings or harmony to a finished track |
错误码
For error response formats, status codes, and retry guidance see Error codes and rate limits; for troubleshooting steps on common errors see the FAQ.
使用示例
提交一个任务并拿到 task_id:
提交成功只表示任务已受理。真正的产物要拿返回的 task_id 去任务查询接口轮询,status 变成 completed 之后才有结果。
Submit a task and get a task_id:
A successful submission only means the task was accepted. To get the actual output, poll the task query endpoint with the returned task_id; results appear only after status becomes completed.