Skip to content
EN

音乐续写

方法: POST路径: /udio/submit/music

config.source.song_id

song_id 是你想要扩展的歌曲 id。

context_length

这里默认为 130。

config.mode

可以是 precede 也可以是 continuation。其中 precede 用于在歌曲前方扩展,同时配合 song_section_start 参数,可控制音频扩展的位置。 例如需要添加一个前奏,可以这套参数

config.model = "precede"
song_section_start = 0

如果是扩展前半部分,可以这样用:

config.model = "precede"
song_section_start = 0.4

同理,如果是需要扩展音频的后半部分,可以这样使用

config.model = "continuation"
song_section_start = 0.4

如果需要扩展结尾部分:

config.model = "continuation"
song_section_start = 0.9

请求参数

Header 参数

text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}

Body 参数 application/json

text
object
示例
{
}

请求示例代码

Shell

bash
curl --location --request POST '/udio/submit/music' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{}'

返回响应

🟢 200 成功

内容类型: application/json

响应结构

text
code
string
必需
message
string
必需
data
string
必需

示例

json
{
    "code": "success",
    "message": "",
    "data": "8b171b81-30c0-40a0-85de-627abad34eb6"
}