V6(默认)、V6_WILD、V6_MINIV5_5、V5、V4_5PLUS、V4_5ALL、V4_5、V4customMode、instrumental、modelcustomMode: true):title 可选,最多 80 字符。仅此模式可用;customMode 为 false 时不支持prompt 可选;提供时将严格作为歌词使用并在生成的音轨中演唱。若同时传入 lyrics,优先使用 lyrics 作为歌词style、lyrics、negativeTags 至少提供一项,全部为空时将拒绝生成instrumental: true:生成纯音乐(无歌词)instrumental: false:使用 lyrics(未传则回退到 prompt)作为歌词negativeTags、vocalGender、duration 仅此模式可用。customMode 为 false 时请勿传入duration(10–360 秒)、negativeTags(V6 最多 1000 字符)、vocalGender(m / f)、styleWeight、weirdnessConstraint、audioWeight、variety、personaId、personaModelprompt 3000 字符,style 200 字符prompt 5000 字符,style 1000 字符style 1000 字符;lyrics 5000 字符;negativeTags 1000 字符title 长度限制:80 字符(所有模型)customMode: false):prompt 可选;作为核心创意,歌词将根据它自动生成(不严格匹配输入),最多 3000 字符instrumental: true,但仅靠该参数不保证一定生成纯音乐。建议同时在 prompt 中写明(例如开头写“纯音乐,无人声,无歌词。”),并避免在 prompt 中描述人声或演唱,以提高生成纯音乐的概率lyrics 可作为歌词附件,与 prompt 同时使用imageUrls、videoUrls、audioUrls、midiUrls、style、lyrics 至少提供一项,全部为空时将拒绝生成imageUrls、videoUrls、audioUrls、midiUrls 仅在此模式下有效title、negativeTags、duration、vocalGender、styleWeight、weirdnessConstraint、audioWeight、variety、personaId、personaModelstyle + lyrics + imageUrls + videoUrls + audioUrls + midiUrlsprompt 作为歌词;非自定义模式可作为歌词附件与 prompt 同时使用。customMode 为 false 时有效。最多 5 张,单张不超过 10 MB,支持 jpeg、png、webp、bmp。customMode 为 false 时有效。最多 1 个,单个不超过 100 MB,时长不超过 241 秒,支持 mp4、mov、webm。customMode 为 false 时有效。时长需在 6 秒至 30 分钟之间,单个不超过 500 MB。customMode 为 false 时有效。当前最多 1 个,单个不超过 256 KB,且须以标准 MThd\x00\x00\x00\x06 文件头开头,支持 mid、midi。仅 V6_WILD 支持,传入其他 model 会切换为 V6_WILD。customMode 为 true 时可用。最多 80 字符。将显示在播放器界面和文件名中。customMode 为 true 时可用。V6、V6_MINI、V6_WILD 最多 1000 字符。m 男声,f 女声。仅当 customMode 为 true 时可用。根据实践,此参数只能加强概率,但不能保证一定遵循男女声的指令。customMode 为 true 时有效。customMode 为 true 时有效。customMode 为 true 时有效。customMode 为 true 时有效。0 off(严格同一风格),1 normal(默认,平衡),2 high(风格差异明显),3 extra(大胆探索),4 max(最大差异)。style_persona 或 voice_persona。仅 V5(已废弃)、V5_5(已废弃)、V6、V6_MINI、V6_WILD 可用。customMode 为 true 时可用,且仅对 V5_5、V6、V6_MINI、V6_WILD 生效。{
"customMode": false,
"instrumental": false,
"prompt": "一段慵懒的 lo-fi 节奏并带柔和人声",
"lyrics": "[Verse] 夜晚城市 灯火辉煌",
"style": "lo-fi, chill",
"imageUrls": [
"https://example.com/reference-image.png"
],
"videoUrls": [
"https://example.com/reference-video.mp4"
],
"audioUrls": [
"https://example.com/reference-audio.mp3"
],
"midiUrls": [
"https://example.com/midi/reference.mid"
],
"model": "V6",
"callBackUrl": "https://example.com/callback"
}customMode: false 开始使用,更简单text(文本生成)、first(第一首完成)、complete(全部完成)curl --location 'https://apibox.erweima.ai/api/v1/generate' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "一段平静舒缓的钢琴曲,带有柔和的旋律",
"lyrics": "[Verse] 夜晚城市 灯火辉煌",
"imageUrls": [
"https://example.com/reference-image.png"
],
"videoUrls": [
"https://example.com/reference-video.mp4"
],
"audioUrls": [
"https://example.com/reference-audio.mp3"
],
"midiUrls": [
"https://example.com/midi/reference.mid"
],
"style": "Classical",
"title": "宁静钢琴冥想",
"customMode": true,
"instrumental": true,
"model": "V6",
"callBackUrl": "https://api.example.com/callback",
"negativeTags": "重金属, 快节奏鼓点",
"vocalGender": "m",
"styleWeight": 0.65,
"weirdnessConstraint": 0.65,
"audioWeight": 0.65,
"variety": 1,
"personaId": "persona_123",
"personaModel": "style_persona",
"duration": 20
}'{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79****be8e"
}
}