上传音频
- 把外部音频导入 Flow Music,异步任务
- 只接受公网可访问的 URL,不收二进制文件
- 导入后拿到的 clip_id 供延伸、替换、Cover、分离使用
认证
固定为 application/json。
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_KEYAlways application/json.
请求参数
请求体是 JSON,不是 multipart/form-data。
固定传 flowmusic,文档注明大小写不敏感。
待导入音频的公网可访问地址。
仅支持常见音频后缀,官方举例 .mp3 与 .wav。必须是外部能直接访问的地址。
The body is JSON, not multipart/form-data.
Always flowmusic; the docs note it's case-insensitive.
A publicly reachable URL for the audio to import.
Only common audio extensions are supported; the official examples are .mp3 and .wav. It must be an address reachable directly from the outside.
上传之后能做什么
导入成功后拿到的 clip_id 可以喂给四个下游接口:
| 下游 | 用途 |
|---|---|
| 音乐延伸 | 在已有音频后续写 |
| 片段替换 | 换掉中间某一段 |
| Cover 改编 | 换风格重新演绎 |
| 词曲分离 | 拆成人声与伴奏 |
不用为每个操作重新上传,一个 clip_id 可以反复用。
The clip_id returned after a successful import can feed four downstream endpoints:
| Downstream | Use |
|---|---|
| Extend music | Continue from the existing audio |
| Replace segment | Swap out one segment in the middle |
| Cover remix | Reinterpret in a new style |
| Stem separation | Split into vocals and instrumental |
You don't need to re-upload for each operation; one clip_id can be reused.
提交响应
成功时为 200。
初始值为 submitted。
任务唯一标识,用于后续查询。
200 on success.
The initial value is submitted.
The unique task identifier, used for later queries.
任务查询结果
用 GET /v1/music/tasks/{task_id} 查询。
任务 ID,与 task_id 对应。
任务状态,完成后为 completed。
进度百分比。
创建时间戳。
完成时间戳。
实际耗时,单位秒。
费用。
积分消耗。
导入产物的 clip_id,供延伸、替换、Cover、分离使用。
音频地址。
音频地址,与上一项同值。
Query with GET /v1/music/tasks/{task_id}.
The task ID, matching task_id.
The task status; completed when done.
Progress percentage.
Creation timestamp.
Completion timestamp.
Actual duration in seconds.
Cost.
Credits consumed.
The clip_id of the imported asset, for extension, replacement, cover remix, and separation.
The audio URL.
The audio URL; the same value as the previous item.
错误
| HTTP | 场景 |
|---|---|
| 400 | 参数缺失,如未传 audio_url |
| 429 | 分组容量饱和 |
错误描述。
错误类型,如 invalid_request、rate_limit_error。
相关参数。
错误码:invalid_request、quota_not_enough、rate_limit_error。
这个接口与 Suno 的「上传音频」是两个不同端点。Flow Music 用 uploadAudioFlowMusic,Suno 用 uploadTask。两边的产物不能互相引用。
| HTTP | Scenario |
|---|---|
| 400 | Missing parameters, e.g. audio_url not passed |
| 429 | Group capacity saturated |
The error description.
The error type, e.g. invalid_request or rate_limit_error.
The related parameter.
The error code: invalid_request, quota_not_enough, rate_limit_error.
This endpoint and Suno's "Upload audio" are two different endpoints. Flow Music uses uploadAudioFlowMusic; Suno uses uploadTask. Outputs from the two can't reference each other.
For more 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.