KIE.AI
Old Model
  • All Model
  • Old Model
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
Support
Old Model
  • All Model
  • Old Model
Old Model
  • All Model
  • Old Model
Suno API
4o Image APIVeo3.1 APIRunway APIFlux Kontext API
Suno API
4o Image APIVeo3.1 APIRunway APIFlux Kontext API
  1. Music Generation
  • Suno API 快速开始
  • Music Generation
    • 音乐封面生成回调
    • 生成音乐回调
    • 音乐扩展回调
    • 音频上传和翻唱回调
    • 音频上传和扩展回调
    • 添加伴奏回调
    • 添加人声回调
    • 替换音乐分区回调
    • 生成音乐
      POST
    • 延长音乐
      POST
    • 上传并翻唱音乐
      POST
    • 上传并扩展音乐
      POST
    • 添加伴奏生成音乐
      POST
    • 添加人声生成音乐
      POST
    • 获取音乐任务详情
      GET
    • 获取带时间戳的歌词
      POST
    • 提升音乐风格
      POST
    • 替换音乐分区
      POST
    • 生成音乐封面
      POST
    • 获取音乐封面生成详情
      GET
    • 生成 Persona
      POST
    • 生成混音音乐
      POST
    • 恢复音频
      POST
  • Lyrics Generation
    • 生成歌词回调
    • 生成歌词
      POST
    • 获取歌词任务详情
      GET
  • WAV Conversion
    • 转换为WAV格式回调
    • 转换为WAV格式
    • 获取WAV转换详情
  • Vocal Removal
    • 音频分离回调
    • MIDI 生成回调
    • 人声和乐器分离
    • 获取人声和乐器分离详情
    • 从音频生成 MIDI
    • 获取 MIDI 生成详情
  • Music Video Generation
    • MP4生成完成回调
    • 创建音乐视频
    • 获取音乐视频详情
  • Sounds Generation
    • 生成声音
  • voice
    • Suno Voice 生成回调
    • Suno Voice 验证短句回调
    • Suno Voice生成验证短句接口
    • Suno Voice获取验证短句接口
    • Suno Voice自建音色生成接口
    • Suno Voice获取自建音色记录
    • Suno Voice 重新生成验证短句
    • Suno Voice检查是否可用接口
  1. Music Generation

生成音乐

POST
/api/v1/generate
使用AI模型生成带或不带歌词的音乐。
使用指南
此接口根据您的文本提示创建音乐
每个请求会生成多个变体
您可以通过自定义模式和纯音乐设置来控制细节级别
参数详情
始终必填:customMode、instrumental、model
自定义模式下(customMode: true):
title 可选,最多 80 字符。仅此模式可用
prompt 可选;提供时将严格作为歌词使用并在生成的音轨中演唱。若同时传入 lyrics,优先使用 lyrics 作为歌词
style、lyrics、negativeTags 至少提供一项,全部为空时将拒绝生成
如果 instrumental: true:生成纯音乐(无歌词)
如果 instrumental: false:使用 lyrics(未传则回退到 prompt)作为歌词
可选:duration、negativeTags、vocalGender、styleWeight、weirdnessConstraint、audioWeight、variety、personaId、personaModel
不同模型的字符限制:
V4:prompt 3000字符,style 200字符
V4_5、V4_5PLUS、V4_5ALL、V5、V5_5:prompt 5000字符,style 1000字符
V6、V6_MINI、V6_WILD:style 1000字符;lyrics 5000字符;negativeTags 1000字符
title 长度限制:80字符(所有模型)
非自定义模式下(customMode: false):
prompt 可选;作为核心创意,歌词将根据它自动生成(不严格匹配输入),最多 3000 字符
lyrics 可作为歌词附件,与 prompt 同时使用
imageUrls、videoUrls、audioUrls、style、lyrics 至少提供一项,全部为空时将拒绝生成
imageUrls、videoUrls、audioUrls 仅在此模式下有效
请勿传入仅自定义模式可用的参数:title、negativeTags、duration、vocalGender、styleWeight、weirdnessConstraint、audioWeight、variety、personaId、personaModel
附件总数不超过 10:style+ lyrics +imageUrls +videoUrls +audioUrls
可选参数
prompt(string):描述所需音频内容的提示词。可选。自定义模式下作为歌词;非自定义模式下作为核心创意(最多 3000 字符)。
lyrics(string):歌词内容。可选。V6 最多 5000 字符。自定义模式优先于 prompt 作为歌词;非自定义模式可作为歌词附件与 prompt 同时使用。
imageUrls(array):图片参考。仅在 customMode 为 false 时有效。最多 5 张,单张不超过 10 MB,支持 jpeg、png、webp、bmp。
videoUrls(array):视频参考。仅在 customMode 为 false 时有效。最多 1 个,单个不超过 100 MB,时长不超过 241 秒,支持 mp4、mov、webm。
audioUrls(array):音频参考。仅在 customMode 为 false 时有效。时长需在 6 秒至 30 分钟之间,单个不超过 500 MB。
style(string):音乐风格规范。字符限制见上方「参数详情」。
title(string):曲目标题。可选。仅当 customMode 为 true 时可用。最多 80 字符。将显示在播放器界面和文件名中。
negativeTags(string):从生成音频中排除的音乐风格或特征。仅当 customMode 为 true 时可用。V6、V6_MINI、V6_WILD 最多 1000 字符。
vocalGender(string):人声性别偏好。m 男声,f 女声。仅当 customMode 为 true 时可用。根据实践,此参数只能加强概率,但不能保证一定遵循男女声的指令。
styleWeight(number):对指定风格的遵循强度。范围 0–1,保留两位小数。仅在 customMode 为 true 时有效。
weirdnessConstraint(number):创意/离散程度。范围 0–1,保留两位小数。仅在 customMode 为 true 时有效。
audioWeight(number):音频要素相对权重。范围 0–1,保留两位小数。仅在 customMode 为 true 时有效。
variety(number):生成结果的多样性。范围 0–4 的整数,默认 1。仅在 customMode 为 true 时有效。0 off(严格同一风格),1 normal(默认,平衡),2 high(风格差异明显),3 extra(大胆探索),4 max(最大差异)。
personaId(string):Persona ID 或 Voice ID。可选。要生成 Persona ID,请访问 生成 Persona 接口。
personaModel(string):persona 模型,可选 style_persona 或 voice_persona。仅 V5(已废弃)、V5.5(已废弃)、V6、V6_MINI、V6_WILD 可用。
duration(number):音频时长,单位为秒。范围 10–360,默认 20。仅当 customMode 为 true 时可用,且仅对 V5_5、V6、V6_MINI、V6_WILD 生效。
开发者注意事项
新用户建议:以 customMode: false 开始使用,更简单
生成的文件将保留14天
回调过程分三个阶段:text(文本生成)、first(第一首完成)、complete(全部完成)

Callbacks

audioGenerated

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
请求成功
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.kie.ai/api/v1/generate' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "prompt": "A calm and relaxing piano track with soft melodies",
  "customMode": true,
  "instrumental": true,
  "model": "V6",
  "callBackUrl": "https://api.example.com/callback",
  "style": "Classical",
  "title": "Peaceful Piano Meditation",
  "negativeTags": "Heavy Metal, Upbeat Drums",
  "vocalGender": "m",
  "styleWeight": 0.65,
  "weirdnessConstraint": 0.65,
  "audioWeight": 0.65,
  "personaId": "persona_123",
  "personaModel": "style_persona",
  "duration": 20
}'
Response Response Example
{
    "code": 200,
    "msg": "success",
    "data": {
        "taskId": "5c79****be8e"
    }
}
Previous
替换音乐分区回调
Next
延长音乐
Built with