Skip to main content
POST
cURL
/generate 端点支持 15 种不同的任务类型,每种类型需要不同的参数集。在调用此端点之前,我们强烈建议使用 Generate Schema 端点获取您任务类型所需的精确必填/可选字段和完整请求示例。

快速开始

1

检查必填参数

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

发送生成请求

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

轮询任务状态

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

任务类型概览

所有任务都需要 taskmodel 字段。使用 GET /suno/v2/generate/schema?task=xxx 获取任何特定任务类型的完整参数详情。

通用参数

以下参数在大多数任务类型中通用:

persona 对象

controls 对象

示例

task=inspiration 必须使用 创建播放列表 返回的真实 playlist_id。旧模式 playlist_id: "inspiration" + playlist_clip_ids废弃。详见 Inspiration 流程
不确定该传哪些参数? 调用 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,
add_stems
示例:

"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_*, add_stems, 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.

示例:
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.

示例:
persona
object

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

示例:
controls
object

Advanced controls. Sliders (01): style_weight / audio_weight / weirdness_constraint. Optional duration (10360s) for custom length on chirp-v55+ (ignored on older models). [Optional: all generate tasks]

示例:
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]

示例:
playlist_id
string

Suno playlist ID. [Required: inspiration] Must be obtained via /playlist/create → /playlist/addClips before calling /generate. Add inspiration clips (1–4, same account) to the playlist first. When combined with persona (vox_playlist_condition), the playlist must exist on the same account as the persona.

示例:

"119573ff-8e48-4fe6-9029-39c76c9a5597"

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.

示例:
stem_control_tags
string

Stem control tags for add_stems. [Optional: add_stems] Default "add ".

示例:

"add "

响应

201 - application/json
taskId
string
必填

task id. Use this id to query task status.

示例:

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