RIFF.2 音乐生成(灵感模式)
方法: POST路径: /riffusion/generate/topic
通过提供主题词生成两首音乐作品。
请求参数
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
topic
string
音乐主题
必需
instrumental
boolean
可选
是否为纯音乐,不包含人声
默认值:
false
示例
{
"model"
:
"FUZZ-1.0"
,
"topic"
:
"string"
,
"instrumental"
:
false
}请求示例代码
Shell
bash
curl --location --request POST '/riffusion/generate/topic' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "FUZZ-1.0",
"topic": "string",
"instrumental": false
}'返回响应
🟢 200 成功
内容类型: application/json
响应结构
text
jobs
array
[object]
必需
id
string
必需示例
json
{
"jobs": [
{
"id": "a375338b-0e3c-4072-9283-8601e09d0b86"
},
{
"id": "e2e51d01-18bc-455e-9e33-851e0811a29a"
}
]
}