创建自定义模型
- 用 6 到 24 条参考音频训练一个可复用的模型,异步任务
- 训练可能持续数分钟,最长约 20 分钟
- 训练与每次生成分别计费
认证
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请求参数
默认 suno,该值固定,只有这一项取值。
模型名称。去除首尾空白后不能为空。
6 到 24 条公网可访问的 HTTP(S) 音频直链。
推荐用 MP3、WAV、M4A。每条链接都须直接返回音频文件,不能是需要登录的网页。
Defaults to suno; the value is fixed and it's the only accepted one.
The model name. Must not be empty after trimming leading and trailing whitespace.
6 to 24 publicly reachable HTTP(S) direct audio links.
MP3, WAV, and M4A are recommended. Every link must return the audio file directly, not a page that requires login.
参考音频怎么挑
训练质量取决于参考集的「一致性与多样性」:
| 要点 | 建议 |
|---|---|
| 数量 | 8 到 12 条通常够了,6 条是下限,24 条是上限 |
| 风格 | 目标风格占绝对多数,不要混入差异过大的曲目 |
| 时长 | 每条 30 秒以上,太短的片段信息量不足 |
| 音质 | 无底噪、无削波 |
| 人声 | 想训练特定音色,参考集里保持同一位演唱者 |
6 条是硬性下限,少一条就直接报错。但别为了凑数塞入风格冲突的曲目——那样训出来的模型会「四不像」,反而不如用公共版本。
Training quality depends on the reference set's "consistency and variety":
| Point | Advice |
|---|---|
| Count | 8 to 12 is usually enough; 6 is the floor, 24 the ceiling |
| Style | The target style should dominate; don't mix in very different tracks |
| Length | 30 seconds or more each; very short clips carry too little information |
| Quality | No background hiss, no clipping |
| Vocals | To train a specific timbre, keep the same singer throughout the reference set |
6 is a hard floor — one fewer and it errors out. But don't pad the set with clashing tracks: the resulting model turns out muddled, worse than just using a public version.
提交响应
响应状态码。
提交状态,提交成功时为 submitted。
训练任务 ID,用于轮询。
The response status code.
The submission status; submitted on success.
The training task ID, for polling.
完成响应
任务 ID。
任务状态,例如 completed。
进度百分比。
自定义模型 ID,需要保存。
模型名称。
The task ID.
The task status, such as completed.
The progress percentage.
The custom model ID. Save it.
The model name.
训练耗时
创建可能持续数分钟,最长约 20 分钟。轮询间隔建议放宽到 10 到 30 秒,不必像生成任务那样 3 到 5 秒一次。
Creation may run for several minutes, up to about 20. Widen the polling interval to 10 to 30 seconds — no need for the 3 to 5 seconds a generation task uses.
拿到 model_id 之后
在支持自定义模型的接口里传 custom_model_id,同时设 custom: true,并不再传 version 和 persona_id:
{
"model": "suno",
"custom": true,
"custom_model_id": "8f3a1c2e-....",
"prompt": "[Verse]\n新的歌词",
"tags": "my style"
}custom_model_id 与 version 互斥。两者同时出现会报错。这与「填了自定义模型就别填版本号」是同一条规则。
Pass custom_model_id on endpoints that support custom models, also set custom: true, and stop sending version and persona_id:
{
"model": "suno",
"custom": true,
"custom_model_id": "8f3a1c2e-....",
"prompt": "[Verse]\nNew lyrics here",
"tags": "my style"
}custom_model_id and version are mutually exclusive. Sending both errors out. This is the same rule as "if you supplied a custom model, don't also send a version number".
计费
训练和每次生成分别计费。训练是一次性成本,之后每次用这个模型生成按正常生成价收费。
Training and each generation are billed separately. Training is a one-off cost; afterwards each generation with this model is charged at the normal generation price.
错误码
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.