跳转到主要内容
POST
/
suno
/
v2
/
generate
cURL
curl --request POST \
  --url https://api.mountsea.ai/suno/v2/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "task": "create",
  "model": "chirp-v50",
  "make_instrumental": false,
  "prompt": "[Verse]\nHello world, here I come...\n\n[Chorus]\nLa la la...",
  "continued_aligned_prompt": "[Verse 1]\nOriginal lyrics...\n\n[Chorus]\nNew replaced lyrics...\n\n[Verse 2]\nMore lyrics...",
  "infill_lyrics": "[Bridge]\nThis is the new bridge section\nWith updated lyrics...",
  "gpt_description_prompt": "A happy pop song about summer vacation",
  "tags": "Pop, Happy, Upbeat",
  "negative_tags": "Sad, Slow",
  "title": "Summer Vibes",
  "clip_id": "clip_abc123",
  "continue_at": 30,
  "range": {
    "start_s": 15.36,
    "end_s": 53.8
  },
  "infill_type": "smart",
  "infill_context_range": {
    "start_s": 0,
    "end_s": 69.16
  },
  "persona": {
    "persona_id": "persona_xyz789",
    "artist_clip_id": "clip_abc123",
    "persona_style": "vox"
  },
  "controls": {
    "style_weight": 0.6,
    "audio_weight": 0.4,
    "weirdness_constraint": 0.2
  },
  "vocal_gender": "m",
  "audio_url": "https://example.com/audio.mp3",
  "mashup_clip_ids": [
    "clip_abc123",
    "clip_def456"
  ],
  "playlist_clip_ids": [
    "1df1d908-842d-41a2-bce4-c798a551cd2d",
    "93d2bfe9-c6d4-42cd-88fc-ee508d4fa6ed"
  ],
  "sound": {
    "description": "深沉的低音和温暖的模拟质感",
    "type": "one_shot",
    "key": "F#",
    "bpm": 2
  }
}
'
{
  "taskId": "15c257ff-43f7-4678-bd41-202ad6b8488b"
}
/generate 端点支持 15 种不同的任务类型,每种类型需要不同的参数集。在调用此端点之前,我们强烈建议使用 Generate Schema 端点获取您任务类型所需的精确必填/可选字段和完整请求示例。

快速开始

1

检查必填参数

调用 GET /suno/v2/generate/schema?task=create 获取 create 任务的参数模式和请求示例。参见 Generate Schema →
2

发送生成请求

使用正确的参数调用 POST /suno/v2/generate
3

轮询任务状态

使用返回的 taskId 轮询获取任务状态,直到状态为 success

任务类型概览

任务描述关键必填字段
create从零开始创建新音乐model
extend延伸已有音乐clip_id, model
upload_extend延伸已上传的音频audio_url, model
upload_cover翻唱已上传的音频audio_url, model
cover翻唱已有片段clip_id, model
use_styles_lyrics使用片段的风格搭配新歌词clip_id, model
replace_section替换已有音频的某个段落clip_id, range, infill_context_range, continued_aligned_prompt, model
add_instrumental为指定范围添加伴奏clip_id, range, model
add_vocals为指定范围添加人声clip_id, range, model
gen_stem_two生成双轨音轨(人声 + 伴奏)clip_id, model
gen_stem_all生成所有音轨clip_id, model
mashup混搭两首歌曲mashup_clip_ids, model
sample从已有片段中采样clip_id, range, model
inspiration从灵感播放列表生成playlist_clip_ids, model
sound生成音效sound, model
所有任务都需要 taskmodel 字段。使用 GET /suno/v2/generate/schema?task=xxx 获取任何特定任务类型的完整参数详情。

通用参数

以下参数在大多数任务类型中通用:
参数类型描述
taskstring必填。任务类型(见上表)
modelstring必填。模型版本:chirp-v55chirp-v50chirp-45+chirp-v45chirp-v45-litechirp-v40chirp-v35
promptstring歌词或提示文本
tagsstring | string[]风格标签(例如 "Pop, Happy, Upbeat"
negative_tagsstring | string[]要排除的风格
titlestring歌曲标题
make_instrumentalboolean生成无人声版本(默认:false
vocal_genderstring"m"(男声)或 "f"(女声)
controlsobject高级控制:style_weightaudio_weightweirdness_constraint(0~1)
personaobject用于风格模仿的声音角色

示例

curl -X POST https://api.mountsea.ai/suno/v2/generate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-key" \
  -d '{
    "task": "create",
    "model": "chirp-v55",
    "prompt": "[Verse]\nHello world, here I come...\n\n[Chorus]\nLa la la...",
    "tags": "Pop, Happy, Upbeat",
    "title": "Summer Vibes"
  }'
不确定该传哪些参数? 调用 GET /suno/v2/generate/schema?task=your_task — 它会返回每种任务类型的必填字段、可选字段、不允许的字段和完整的请求示例。试用 Generate Schema →

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
task
enum<string>
必填

Task type. Use GET /generate/schema?task=xxx to query required fields for each task.

可用选项:
create,
extend,
upload_extend,
upload_cover,
cover,
use_styles_lyrics,
replace_section,
add_instrumental,
add_vocals,
gen_stem_two,
gen_stem_all,
mashup,
sample,
inspiration,
sound
示例:

"create"

model
string
必填

Model version. Supports standard models (e.g. chirp-v50) and custom models (chirp-custom:).

示例:

"chirp-v50"

make_instrumental
boolean
默认值:false

Whether to make instrumental (no vocals). [Optional: all tasks]

示例:

false

prompt
string

Lyrics or prompt text. [Optional: all tasks] For replace_section: lyrics within infill_context_range (modified if replacement changes lyrics).

示例:

"[Verse]\nHello world, here I come...\n\n[Chorus]\nLa la la..."

continued_aligned_prompt
string

Full song lyrics after replacement. [Required: replace_section] Contains the complete lyrics of the entire song with the replaced section updated.

示例:

"[Verse 1]\nOriginal lyrics...\n\n[Chorus]\nNew replaced lyrics...\n\n[Verse 2]\nMore lyrics..."

infill_lyrics
string

Lyrics for the replaced section only. [Optional: replace_section] The specific lyrics within the range being replaced.

示例:

"[Bridge]\nThis is the new bridge section\nWith updated lyrics..."

gpt_description_prompt
string

Short description for GPT lyrics generation. [Optional: create, mashup, etc.]

示例:

"A happy pop song about summer vacation"

tags

Style tags. Supports string or array. [Optional: all tasks]

示例:

"Pop, Happy, Upbeat"

negative_tags

Negative style tags to exclude. [Optional: all tasks]

示例:

"Sad, Slow"

title
string

Song title. [Optional: all tasks]

示例:

"Summer Vibes"

clip_id
string

Source clip ID. [Required: extend, cover, use_styles_lyrics, replace_section, add_instrumental, add_vocals, gen_stem_*, sample]

示例:

"clip_abc123"

continue_at
number

Continue position in seconds. [Optional: extend, upload_extend]

必填范围: x >= 0
示例:

30

range
object

Target range { start_s, end_s }. [Required: replace_section, sample] For replace_section: the section to replace (duration should be > 6 seconds). For sample: the time range to sample from source clip.

示例:
{ "start_s": 15.36, "end_s": 53.8 }
infill_type
enum<string>

Infill mode for replace_section. [Optional: replace_section] "smart" = auto-select based on duration (default), "classic" = always use infill (better for long selections), "fixed" = always use fixed_infill (better for short selections).

可用选项:
smart,
classic,
fixed
示例:

"smart"

infill_context_range
object

Infill context range (must encompass range). [Required: replace_section] Should extend ~30s before range.start_s and ~30s after range.end_s. If range starts within first 30s, use 0 for start_s. If range ends within last 30s of song, use song duration for end_s.

示例:
{ "start_s": 0, "end_s": 69.16 }
persona
object

Artist persona config for style mimicking. [Optional: create, cover, extend]

示例:
{
  "persona_id": "persona_xyz789",
  "artist_clip_id": "clip_abc123",
  "persona_style": "vox"
}
controls
object

Advanced control sliders (0~1). [Optional: all tasks]

示例:
{
  "style_weight": 0.6,
  "audio_weight": 0.4,
  "weirdness_constraint": 0.2
}
vocal_gender
enum<string>

Vocal gender (m=male, f=female). [Optional: all tasks]

可用选项:
m,
f
示例:

"m"

audio_url
string<uri>

Audio URL for upload tasks. [Required: upload_extend, upload_cover]

示例:

"https://example.com/audio.mp3"

mashup_clip_ids
string[]

Two clip IDs for mashup [clip_a, clip_b]. [Required: mashup]

示例:
["clip_abc123", "clip_def456"]
playlist_clip_ids
string[]

Clip IDs for inspiration generation (max 4). Must be clips from the same account. [Required: inspiration]

Maximum array length: 4
示例:
[
  "1df1d908-842d-41a2-bce4-c798a551cd2d",
  "93d2bfe9-c6d4-42cd-88fc-ee508d4fa6ed"
]
sound
object

Sound generation config. [Required: sound] description is the core sound prompt (also auto-used as title). type/key/bpm are optional advanced options. Tags are auto-assembled; user-provided tags are ignored for sound task.

示例:
{
  "description": "深沉的低音和温暖的模拟质感",
  "type": "one_shot",
  "key": "F#",
  "bpm": 2
}

响应

201 - application/json
taskId
string
必填

task id. Use this id to query task status.

示例:

"15c257ff-43f7-4678-bd41-202ad6b8488b"