使用AI模型通过组合多个音频轨道创建混音音乐。
uploadUrlList 是必需的,必须包含恰好2个音频文件URLcustomMode: true)prompt字符限制:| 模型 | prompt 限制 | style 限制 |
|---|---|---|
| V4 | 3000字符 | 200字符 |
| V4_5 和 V4_5PLUS | 5000字符 | 1000字符 |
| V4_5ALL | 5000字符 | 1000字符 |
| V5和 V5_5 | 5000字符 | 1000字符 |
title 长度限制:80字符(所有模型)customMode: false)prompt 长度限制:500字符instrumental: 是否生成纯音乐customMode: false 开始使用,更简单text(文本生成)、first(第一首完成)、complete(全部完成)uploadUrlList 必须包含恰好2个音频文件URL才能进行混音生成| 参数 | 类型 | 描述 |
|---|---|---|
vocalGender | string | 人声性别偏好。m 男声,f 女声。注意:此参数仅在 customMode 为 true 时生效。根据实践,此参数只能加强概率,但不能保证一定遵循男女声的指令。 |
styleWeight | number | 对风格的遵循强度。注意:此参数 仅在 customMode 为 true 时生效。范围 0–1,保留两位小数。示例:0.61。 |
weirdnessConstraint | number | 创意/离散程度。注意:此参数仅在 customMode 为 true 时生效。范围 0–1,保留两位小数。示例:0.72。 |
audioWeight | number | 音频要素权重。注意:此参数仅在 customMode 为 true 时生效。范围 0–1,保留两位小数。示例:0.65。 |
curl --location --request POST 'https://api.kie.ai/api/v1/generate/mashup' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"uploadUrlList": [
"https://example.com/audio1.mp3",
"https://example.com/audio2.mp3"
],
"customMode": true,
"model": "V4",
"callBackUrl": "https://example.com/callback",
"prompt": "A calm and relaxing piano track with soft melodies",
"style": "Jazz",
"title": "Relaxing Piano",
"instrumental": true,
"vocalGender": "m",
"styleWeight": 0.61,
"weirdnessConstraint": 0.72,
"audioWeight": 0.65
}'{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79****be8e"
}
}