上传音频并延伸
- 上传一段音频并在其后续写,一步完成,异步任务
- 与「续写延长」不同:这里直接收
audio_url,不用 task_id - 固定为自定义模式,无需先调上传接口
认证
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,默认也是 suno。
需为公网可访问的 HTTP(S) 音频直链,建议不超过 8 分钟。
本地路径与 blob: URL 不可用。
延伸起点。需大于等于 1 秒,且严格小于源音频实际时长。
可选 v6(默认)、v6-wild、v6-mini。使用 custom_model_id 时省略。
模型任务返回的完整 UUID。与 version、persona_id 互斥。
延伸段歌词,最多 5000 字符。不传则按纯音乐语义处理。
风格描述,最多 1000 字符。
标题,最多 80 字符。
排除的风格。
取值范围 0 到 1。
取值范围 0 到 1。
取值范围 0 到 1。
是否对输入歌词二次创作。
Male 或 Female。
与 custom_model_id 互斥。
目标时长 10 到 360 秒。实际时长以任务结果为准。
off、normal、high、extra、max。
启用后按普通售价 2 倍计费,默认 false。
mp3、m4a 或 wav。
Only suno is supported; the default is also suno.
A publicly reachable HTTP(S) direct audio link, best kept under 8 minutes.
Local paths and blob: URLs don't work.
The extension start point. Must be at least 1 second and strictly less than the source audio's actual duration.
v6 (default), v6-wild, or v6-mini. Omit when using custom_model_id.
The full UUID returned by a model creation task. Mutually exclusive with version and persona_id.
Lyrics for the extension, up to 5000 characters. When omitted it's treated as instrumental.
Style description, up to 1000 characters.
The title, up to 80 characters.
Styles to exclude.
From 0 to 1.
From 0 to 1.
From 0 to 1.
Whether to rework the supplied lyrics.
Male or Female.
Mutually exclusive with custom_model_id.
Target duration, 10 to 360 seconds. The actual duration follows the task result.
off, normal, high, extra, max.
When enabled, billed at 2× the regular price; defaults to false.
mp3, m4a, or wav.
与其他接口的分工
| 接口 | 输入 | 是否需要先上传 |
|---|---|---|
| 续写延长 | task_id + audio_index | 是 |
| 上传并延伸(本页) | audio_url + continue_at | 否 |
| 上传音频 | audioFilePath | — |
本接口把「上传」与「延伸」合成一步。省一次调用,也省一个中间状态要等。
| Endpoint | Input | Upload first? |
|---|---|---|
| Extend | task_id + audio_index | Yes |
| Upload and extend (this page) | audio_url + continue_at | No |
| Upload audio | audioFilePath | — |
This endpoint merges "upload" and "extend" into one step — one fewer call, and one fewer intermediate state to wait on.
固定为自定义模式
接口固定为自定义模式,所以:
- 不需要传
custom字段 - 不要传
instrumental - 不要传
gpt_description
传了这三个字段也不会生效,属于无效参数。
prompt 不传时会按纯音乐语义处理。想要有人声演唱,必须给歌词。
The endpoint is fixed to custom mode, so:
- No need to pass
custom - Don't pass
instrumental - Don't pass
gpt_description
Passing those three has no effect — they're invalid parameters here.
When prompt is omitted it's treated as instrumental. For sung vocals you must supply lyrics.
响应
响应状态码。
提交结果。取 data[0].task_id 轮询任务查询接口。
示例值 submitted。
任务标识,用于轮询。
The response status code.
The submission result. Take data[0].task_id and poll the task query endpoint.
Example value: submitted.
The task identifier, for polling.
continue_at 的边界
这是本接口最容易出错的地方,两个边界都不能踩:
| 边界 | 规则 |
|---|---|
| 下界 | 大于等于 1 秒 |
| 上界 | 严格小于源音频实际时长 |
上界是源音频的时长,不是你想续写到多长。想续写 60 秒的内容,continue_at 依然受源音频时长约束。
This is the endpoint's most error-prone spot; neither bound can be broken:
| Bound | Rule |
|---|---|
| Lower | At least 1 second |
| Upper | Strictly less than the source audio's actual duration |
The upper bound is the source audio's duration, not how long you want the extension to be. Even to extend by 60 seconds, continue_at is still constrained by the source duration.
错误码
For error response formats, status codes, and retry guidance see Error codes and rate limits; for troubleshooting steps on common errors see the FAQ.
使用示例
从上传音频续写
continue_at 指定从第几秒开始接续,必须大于等于 1 秒且小于源音频总时长。音频同样要走公网地址。
指定风格与标题
接了 prompt 之后,续写部分会沿用前面的调性,同时往提示词描述的方向走。想要新段落有明确标签,把 tags 一起传。
接着已有任务续写
如果源音频来自本平台生成的任务,直接用生成类接口的 extend,不必先导出再上传。
Continue from an uploaded audio file
continue_at sets the second to continue from and must be at least 1 second and less than the source's total duration. The audio likewise has to be at a public address.
With a style and title
Once prompt is supplied, the extension picks up the earlier key while heading in the direction the prompt describes. For a clear label on the new section, pass tags as well.
Continuing an existing task
If the source audio came from a task generated on this platform, use the generation endpoint's extend directly — no need to export and re-upload.