Generate Music
Generate a complete song from an inspiration prompt or custom lyrics.
custom controls text fields only. Mismatched text is ignored; weight fields are still validated:
custom=false(default, inspiration):promptis the inspiration description.title,style,negative_tags,auto_lyrics, andpersona_idare ignored.custom=true(custom):promptis lyrics. Those text fields take effect.style_weight,weirdness_constraint,audio_weight, andvocal_genderapply in both modes and are validated. Out-of-range values return 400; they are not silently dropped.
This model uses style for genre tags, not tags. Creativity uses weirdness_constraint, not weirdness.
- Provide either
version(v6/v6-wild/v6-mini) orcustom_model_id, not both.persona_idcannot be combined withcustom_model_id. custom=false:promptis required (≤3000).custom=trueand not instrumental:promptis required as lyrics (≤5000).max_mode=truerequirescustom=trueand bills at 2×.variety: "max"does not enable Max billing.durationis custom-mode only, 10–360 seconds.
Authorization
BearerAuth
使用 MAPI Bearer Token 认证。格式:Authorization: Bearer sk-xxxxxx。
In: header
Request Body
application/json
固定填写 suno-music。
公共版本:v6 / v6-wild / v6-mini。与 custom_model_id 至少提供一个;使用自定义模型时省略本字段。
"v6" | "v6-wild" | "v6-mini"创建自定义模型任务返回的完整 UUID。与 version、persona_id 互斥。与公共版本同价,创建模型本身另收 suno-create-model。
false 为灵感模式,prompt 作为灵感描述;true 为自定义模式,prompt 作为歌词。默认 false。
falsetrue 表示生成纯音乐、无人声;默认 false。
false灵感提示词或歌词。custom=false 时必填(灵感描述,不超过 3000 字符);custom=true 且 instrumental=false 时必填(歌词,不超过 5000 字符);自定义纯音乐可省略。
歌曲标题,不超过 80 个字符。仅 custom=true 时生效。
歌曲风格标签,不超过 1000 个字符。仅 custom=true 时生效;本模型使用 style,不是 tags。
不希望出现的风格标签。仅 custom=true 时生效。
是否对输入歌词进行二次创作。仅 custom=true 时生效。
Persona 风格 ID。仅 custom=true 时生效,与 custom_model_id 互斥。
人声性别。支持 Male、Female 以及 m、f、male、female,两种生成模式均生效。
"Male" | "Female" | "m" | "f" | "male" | "female"风格权重,范围 0.00–1.00。两种模式下都会校验并生效;数值 0 有效。
0 <= value <= 1创意度,范围 0.00–1.00。主生成使用本字段(不是 weirdness)。两种模式下都会校验并生效;数值 0 有效。
0 <= value <= 1音频权重,范围 0.00–1.00。两种模式下都会校验并生效;数值 0 有效。
0 <= value <= 1风格变化程度。可省略,没有固定默认值。选择 max 不会自动开启 Max 计费。
"off" | "normal" | "high" | "extra" | "max"是否启用 Max 模式。启用时要求 custom=true,按普通售价 2 倍计费。不支持时不要发送本字段。
false输出音频格式。省略时由服务自动选择。
"mp3" | "m4a" | "wav"目标生成时长,10–360 秒整数,仅 custom=true 时可用。实际成品时长以任务结果为准。
10 <= value <= 360Response Body
application/json
application/json
curl -X POST "https://loading/v1/music/generations" \ -H "Content-Type: application/json" \ -d '{ "model": "suno-music", "version": "v6", "custom": false, "prompt": "深夜城市 lo-fi 钢琴配雨声" }'{
"code": 200,
"message": "success",
"data": [
{
"status": "submitted",
"task_id": "task_aehCmxJ5YUNOIQGgkhvxaco4T9P2h3Dw"
}
]
}{
"code": "invalid_request",
"message": "suno-music requires either version (v6/v6-wild/v6-mini) or custom_model_id",
"data": null
}Last updated on