RIFF.1 音乐生成(专业模式)
方法: POST路径: /riffusion/generate
是否为纯音乐,不包含人声
请求参数
Header 参数
text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}Body 参数 application/json
text
model
enum<string>
使用的模型名称
必需
枚举值:
FUZZ-1.0
FUZZ-1.1
FUZZ-1.0 Pro
FUZZ-1.1 Pro
lyrics
string
歌词内容
必需
tag
string
音乐风格标签
必需
title
string
歌曲标题
必需
instrumental
boolean
可选
是否为纯音乐,不包含人声
默认值:
false
morph
object
可选
变形参数,用于特殊创作模式如翻唱、续写等
riff_id
string
可选
已创作歌曲的ID,与audio_upload_id二选一
audio_upload_id
string
可选
上传歌曲的ID,与riff_id二选一
transform
enum<string>
变形模式
可选
枚举值:
cover
extend
inpaint
swap_vocals
swap_sound
normalized_lyrics_strength
number
可选
歌词强度参数,取值0-1
>= 0
<= 1
normalized_sound_prompt_strength
number
可选
声音提示强度参数,取值0-1
>= 0
<= 1
normalized_weirdness
number
可选
奇特度参数,取值0-1
>= 0
<= 1
normalized_cover_strength
number
可选
翻唱强度参数,取值0-1
>= 0
<= 1
normalized_variation_strength
number
|
null
可选
变异强度参数,取值0-1
>= 0
<= 1
crop_end_at
number
可选
续写模式下的续写开始时间(秒)
replace_start_at
number
可选
替换模式下的开始时间(秒)
replace_end_at
number
可选
替换模式下的结束时间(秒)
duration
number
持续时间(秒)
可选
默认值:
0
示例
{
"model"
:
"FUZZ-1.0"
,
"lyrics"
:
"string"
,
"tag"
:
"string"
,
"title"
:
"string"
,
"instrumental"
:
false
,
"morph"
:
{
"riff_id"
:
"string"
,
"audio_upload_id"
:
"string"
,
"transform"
:
"cover"
,
"normalized_lyrics_strength"
:
0
,
"normalized_sound_prompt_strength"
:
0
,
"normalized_weirdness"
:
0
,
"normalized_cover_strength"
:
0
,
"normalized_variation_strength"
:
0
,
"crop_end_at"
:
0
,
"replace_start_at"
:
0
,
"replace_end_at"
:
0
,
"duration"
:
0
}
}请求示例代码
Shell
bash
curl --location --request POST '/riffusion/generate' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "FUZZ-1.0",
"lyrics": "string",
"tag": "string",
"title": "string",
"instrumental": false,
"morph": {
"riff_id": "string",
"audio_upload_id": "string",
"transform": "cover",
"normalized_lyrics_strength": 0,
"normalized_sound_prompt_strength": 0,
"normalized_weirdness": 0,
"normalized_cover_strength": 0,
"normalized_variation_strength": 0,
"crop_end_at": 0,
"replace_start_at": 0,
"replace_end_at": 0,
"duration": 0
}
}'返回响应
🟢 200 成功
内容类型: application/json
响应结构
text
jobs
array
[object]
必需
id
string
必需示例
json
{
"jobs": [
{
"id": "989aff28-4df4-48d9-8ea3-92b746b4b765"
},
{
"id": "322ebfd9-fefe-4728-a47a-c5825d7f0c2e"
}
]
}