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,
"duration": 120
},
"vocal_gender": "m",
"audio_url": "https://example.com/audio.mp3",
"mashup_clip_ids": [
"clip_abc123",
"clip_def456"
],
"playlist_id": "119573ff-8e48-4fe6-9029-39c76c9a5597",
"sound": {
"description": "深沉的低音和温暖的模拟质感",
"type": "one_shot",
"key": "F#",
"bpm": 2
},
"stem_control_tags": "add "
}
'import requests
url = "https://api.mountsea.ai/suno/v2/generate"
payload = {
"task": "create",
"model": "chirp-v50",
"make_instrumental": False,
"prompt": "[Verse]
Hello world, here I come...
[Chorus]
La la la...",
"continued_aligned_prompt": "[Verse 1]
Original lyrics...
[Chorus]
New replaced lyrics...
[Verse 2]
More lyrics...",
"infill_lyrics": "[Bridge]
This is the new bridge section
With 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,
"duration": 120
},
"vocal_gender": "m",
"audio_url": "https://example.com/audio.mp3",
"mashup_clip_ids": ["clip_abc123", "clip_def456"],
"playlist_id": "119573ff-8e48-4fe6-9029-39c76c9a5597",
"sound": {
"description": "深沉的低音和温暖的模拟质感",
"type": "one_shot",
"key": "F#",
"bpm": 2
},
"stem_control_tags": "add "
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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, duration: 120},
vocal_gender: 'm',
audio_url: 'https://example.com/audio.mp3',
mashup_clip_ids: ['clip_abc123', 'clip_def456'],
playlist_id: '119573ff-8e48-4fe6-9029-39c76c9a5597',
sound: {description: '深沉的低音和温暖的模拟质感', type: 'one_shot', key: 'F#', bpm: 2},
stem_control_tags: 'add '
})
};
fetch('https://api.mountsea.ai/suno/v2/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mountsea.ai/suno/v2/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'task' => 'create',
'model' => 'chirp-v50',
'make_instrumental' => false,
'prompt' => '[Verse]
Hello world, here I come...
[Chorus]
La la la...',
'continued_aligned_prompt' => '[Verse 1]
Original lyrics...
[Chorus]
New replaced lyrics...
[Verse 2]
More lyrics...',
'infill_lyrics' => '[Bridge]
This is the new bridge section
With 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,
'duration' => 120
],
'vocal_gender' => 'm',
'audio_url' => 'https://example.com/audio.mp3',
'mashup_clip_ids' => [
'clip_abc123',
'clip_def456'
],
'playlist_id' => '119573ff-8e48-4fe6-9029-39c76c9a5597',
'sound' => [
'description' => '深沉的低音和温暖的模拟质感',
'type' => 'one_shot',
'key' => 'F#',
'bpm' => 2
],
'stem_control_tags' => 'add '
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mountsea.ai/suno/v2/generate"
payload := strings.NewReader("{\n \"task\": \"create\",\n \"model\": \"chirp-v50\",\n \"make_instrumental\": false,\n \"prompt\": \"[Verse]\\nHello world, here I come...\\n\\n[Chorus]\\nLa la la...\",\n \"continued_aligned_prompt\": \"[Verse 1]\\nOriginal lyrics...\\n\\n[Chorus]\\nNew replaced lyrics...\\n\\n[Verse 2]\\nMore lyrics...\",\n \"infill_lyrics\": \"[Bridge]\\nThis is the new bridge section\\nWith updated lyrics...\",\n \"gpt_description_prompt\": \"A happy pop song about summer vacation\",\n \"tags\": \"Pop, Happy, Upbeat\",\n \"negative_tags\": \"Sad, Slow\",\n \"title\": \"Summer Vibes\",\n \"clip_id\": \"clip_abc123\",\n \"continue_at\": 30,\n \"range\": {\n \"start_s\": 15.36,\n \"end_s\": 53.8\n },\n \"infill_type\": \"smart\",\n \"infill_context_range\": {\n \"start_s\": 0,\n \"end_s\": 69.16\n },\n \"persona\": {\n \"persona_id\": \"persona_xyz789\",\n \"artist_clip_id\": \"clip_abc123\",\n \"persona_style\": \"vox\"\n },\n \"controls\": {\n \"style_weight\": 0.6,\n \"audio_weight\": 0.4,\n \"weirdness_constraint\": 0.2,\n \"duration\": 120\n },\n \"vocal_gender\": \"m\",\n \"audio_url\": \"https://example.com/audio.mp3\",\n \"mashup_clip_ids\": [\n \"clip_abc123\",\n \"clip_def456\"\n ],\n \"playlist_id\": \"119573ff-8e48-4fe6-9029-39c76c9a5597\",\n \"sound\": {\n \"description\": \"深沉的低音和温暖的模拟质感\",\n \"type\": \"one_shot\",\n \"key\": \"F#\",\n \"bpm\": 2\n },\n \"stem_control_tags\": \"add \"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mountsea.ai/suno/v2/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task\": \"create\",\n \"model\": \"chirp-v50\",\n \"make_instrumental\": false,\n \"prompt\": \"[Verse]\\nHello world, here I come...\\n\\n[Chorus]\\nLa la la...\",\n \"continued_aligned_prompt\": \"[Verse 1]\\nOriginal lyrics...\\n\\n[Chorus]\\nNew replaced lyrics...\\n\\n[Verse 2]\\nMore lyrics...\",\n \"infill_lyrics\": \"[Bridge]\\nThis is the new bridge section\\nWith updated lyrics...\",\n \"gpt_description_prompt\": \"A happy pop song about summer vacation\",\n \"tags\": \"Pop, Happy, Upbeat\",\n \"negative_tags\": \"Sad, Slow\",\n \"title\": \"Summer Vibes\",\n \"clip_id\": \"clip_abc123\",\n \"continue_at\": 30,\n \"range\": {\n \"start_s\": 15.36,\n \"end_s\": 53.8\n },\n \"infill_type\": \"smart\",\n \"infill_context_range\": {\n \"start_s\": 0,\n \"end_s\": 69.16\n },\n \"persona\": {\n \"persona_id\": \"persona_xyz789\",\n \"artist_clip_id\": \"clip_abc123\",\n \"persona_style\": \"vox\"\n },\n \"controls\": {\n \"style_weight\": 0.6,\n \"audio_weight\": 0.4,\n \"weirdness_constraint\": 0.2,\n \"duration\": 120\n },\n \"vocal_gender\": \"m\",\n \"audio_url\": \"https://example.com/audio.mp3\",\n \"mashup_clip_ids\": [\n \"clip_abc123\",\n \"clip_def456\"\n ],\n \"playlist_id\": \"119573ff-8e48-4fe6-9029-39c76c9a5597\",\n \"sound\": {\n \"description\": \"深沉的低音和温暖的模拟质感\",\n \"type\": \"one_shot\",\n \"key\": \"F#\",\n \"bpm\": 2\n },\n \"stem_control_tags\": \"add \"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/suno/v2/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"task\": \"create\",\n \"model\": \"chirp-v50\",\n \"make_instrumental\": false,\n \"prompt\": \"[Verse]\\nHello world, here I come...\\n\\n[Chorus]\\nLa la la...\",\n \"continued_aligned_prompt\": \"[Verse 1]\\nOriginal lyrics...\\n\\n[Chorus]\\nNew replaced lyrics...\\n\\n[Verse 2]\\nMore lyrics...\",\n \"infill_lyrics\": \"[Bridge]\\nThis is the new bridge section\\nWith updated lyrics...\",\n \"gpt_description_prompt\": \"A happy pop song about summer vacation\",\n \"tags\": \"Pop, Happy, Upbeat\",\n \"negative_tags\": \"Sad, Slow\",\n \"title\": \"Summer Vibes\",\n \"clip_id\": \"clip_abc123\",\n \"continue_at\": 30,\n \"range\": {\n \"start_s\": 15.36,\n \"end_s\": 53.8\n },\n \"infill_type\": \"smart\",\n \"infill_context_range\": {\n \"start_s\": 0,\n \"end_s\": 69.16\n },\n \"persona\": {\n \"persona_id\": \"persona_xyz789\",\n \"artist_clip_id\": \"clip_abc123\",\n \"persona_style\": \"vox\"\n },\n \"controls\": {\n \"style_weight\": 0.6,\n \"audio_weight\": 0.4,\n \"weirdness_constraint\": 0.2,\n \"duration\": 120\n },\n \"vocal_gender\": \"m\",\n \"audio_url\": \"https://example.com/audio.mp3\",\n \"mashup_clip_ids\": [\n \"clip_abc123\",\n \"clip_def456\"\n ],\n \"playlist_id\": \"119573ff-8e48-4fe6-9029-39c76c9a5597\",\n \"sound\": {\n \"description\": \"深沉的低音和温暖的模拟质感\",\n \"type\": \"one_shot\",\n \"key\": \"F#\",\n \"bpm\": 2\n },\n \"stem_control_tags\": \"add \"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "15c257ff-43f7-4678-bd41-202ad6b8488b"
}生成音乐
生成、延伸、翻唱、混搭等 — 统一的音乐生成端点
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,
"duration": 120
},
"vocal_gender": "m",
"audio_url": "https://example.com/audio.mp3",
"mashup_clip_ids": [
"clip_abc123",
"clip_def456"
],
"playlist_id": "119573ff-8e48-4fe6-9029-39c76c9a5597",
"sound": {
"description": "深沉的低音和温暖的模拟质感",
"type": "one_shot",
"key": "F#",
"bpm": 2
},
"stem_control_tags": "add "
}
'import requests
url = "https://api.mountsea.ai/suno/v2/generate"
payload = {
"task": "create",
"model": "chirp-v50",
"make_instrumental": False,
"prompt": "[Verse]
Hello world, here I come...
[Chorus]
La la la...",
"continued_aligned_prompt": "[Verse 1]
Original lyrics...
[Chorus]
New replaced lyrics...
[Verse 2]
More lyrics...",
"infill_lyrics": "[Bridge]
This is the new bridge section
With 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,
"duration": 120
},
"vocal_gender": "m",
"audio_url": "https://example.com/audio.mp3",
"mashup_clip_ids": ["clip_abc123", "clip_def456"],
"playlist_id": "119573ff-8e48-4fe6-9029-39c76c9a5597",
"sound": {
"description": "深沉的低音和温暖的模拟质感",
"type": "one_shot",
"key": "F#",
"bpm": 2
},
"stem_control_tags": "add "
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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, duration: 120},
vocal_gender: 'm',
audio_url: 'https://example.com/audio.mp3',
mashup_clip_ids: ['clip_abc123', 'clip_def456'],
playlist_id: '119573ff-8e48-4fe6-9029-39c76c9a5597',
sound: {description: '深沉的低音和温暖的模拟质感', type: 'one_shot', key: 'F#', bpm: 2},
stem_control_tags: 'add '
})
};
fetch('https://api.mountsea.ai/suno/v2/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mountsea.ai/suno/v2/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'task' => 'create',
'model' => 'chirp-v50',
'make_instrumental' => false,
'prompt' => '[Verse]
Hello world, here I come...
[Chorus]
La la la...',
'continued_aligned_prompt' => '[Verse 1]
Original lyrics...
[Chorus]
New replaced lyrics...
[Verse 2]
More lyrics...',
'infill_lyrics' => '[Bridge]
This is the new bridge section
With 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,
'duration' => 120
],
'vocal_gender' => 'm',
'audio_url' => 'https://example.com/audio.mp3',
'mashup_clip_ids' => [
'clip_abc123',
'clip_def456'
],
'playlist_id' => '119573ff-8e48-4fe6-9029-39c76c9a5597',
'sound' => [
'description' => '深沉的低音和温暖的模拟质感',
'type' => 'one_shot',
'key' => 'F#',
'bpm' => 2
],
'stem_control_tags' => 'add '
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mountsea.ai/suno/v2/generate"
payload := strings.NewReader("{\n \"task\": \"create\",\n \"model\": \"chirp-v50\",\n \"make_instrumental\": false,\n \"prompt\": \"[Verse]\\nHello world, here I come...\\n\\n[Chorus]\\nLa la la...\",\n \"continued_aligned_prompt\": \"[Verse 1]\\nOriginal lyrics...\\n\\n[Chorus]\\nNew replaced lyrics...\\n\\n[Verse 2]\\nMore lyrics...\",\n \"infill_lyrics\": \"[Bridge]\\nThis is the new bridge section\\nWith updated lyrics...\",\n \"gpt_description_prompt\": \"A happy pop song about summer vacation\",\n \"tags\": \"Pop, Happy, Upbeat\",\n \"negative_tags\": \"Sad, Slow\",\n \"title\": \"Summer Vibes\",\n \"clip_id\": \"clip_abc123\",\n \"continue_at\": 30,\n \"range\": {\n \"start_s\": 15.36,\n \"end_s\": 53.8\n },\n \"infill_type\": \"smart\",\n \"infill_context_range\": {\n \"start_s\": 0,\n \"end_s\": 69.16\n },\n \"persona\": {\n \"persona_id\": \"persona_xyz789\",\n \"artist_clip_id\": \"clip_abc123\",\n \"persona_style\": \"vox\"\n },\n \"controls\": {\n \"style_weight\": 0.6,\n \"audio_weight\": 0.4,\n \"weirdness_constraint\": 0.2,\n \"duration\": 120\n },\n \"vocal_gender\": \"m\",\n \"audio_url\": \"https://example.com/audio.mp3\",\n \"mashup_clip_ids\": [\n \"clip_abc123\",\n \"clip_def456\"\n ],\n \"playlist_id\": \"119573ff-8e48-4fe6-9029-39c76c9a5597\",\n \"sound\": {\n \"description\": \"深沉的低音和温暖的模拟质感\",\n \"type\": \"one_shot\",\n \"key\": \"F#\",\n \"bpm\": 2\n },\n \"stem_control_tags\": \"add \"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mountsea.ai/suno/v2/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task\": \"create\",\n \"model\": \"chirp-v50\",\n \"make_instrumental\": false,\n \"prompt\": \"[Verse]\\nHello world, here I come...\\n\\n[Chorus]\\nLa la la...\",\n \"continued_aligned_prompt\": \"[Verse 1]\\nOriginal lyrics...\\n\\n[Chorus]\\nNew replaced lyrics...\\n\\n[Verse 2]\\nMore lyrics...\",\n \"infill_lyrics\": \"[Bridge]\\nThis is the new bridge section\\nWith updated lyrics...\",\n \"gpt_description_prompt\": \"A happy pop song about summer vacation\",\n \"tags\": \"Pop, Happy, Upbeat\",\n \"negative_tags\": \"Sad, Slow\",\n \"title\": \"Summer Vibes\",\n \"clip_id\": \"clip_abc123\",\n \"continue_at\": 30,\n \"range\": {\n \"start_s\": 15.36,\n \"end_s\": 53.8\n },\n \"infill_type\": \"smart\",\n \"infill_context_range\": {\n \"start_s\": 0,\n \"end_s\": 69.16\n },\n \"persona\": {\n \"persona_id\": \"persona_xyz789\",\n \"artist_clip_id\": \"clip_abc123\",\n \"persona_style\": \"vox\"\n },\n \"controls\": {\n \"style_weight\": 0.6,\n \"audio_weight\": 0.4,\n \"weirdness_constraint\": 0.2,\n \"duration\": 120\n },\n \"vocal_gender\": \"m\",\n \"audio_url\": \"https://example.com/audio.mp3\",\n \"mashup_clip_ids\": [\n \"clip_abc123\",\n \"clip_def456\"\n ],\n \"playlist_id\": \"119573ff-8e48-4fe6-9029-39c76c9a5597\",\n \"sound\": {\n \"description\": \"深沉的低音和温暖的模拟质感\",\n \"type\": \"one_shot\",\n \"key\": \"F#\",\n \"bpm\": 2\n },\n \"stem_control_tags\": \"add \"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/suno/v2/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"task\": \"create\",\n \"model\": \"chirp-v50\",\n \"make_instrumental\": false,\n \"prompt\": \"[Verse]\\nHello world, here I come...\\n\\n[Chorus]\\nLa la la...\",\n \"continued_aligned_prompt\": \"[Verse 1]\\nOriginal lyrics...\\n\\n[Chorus]\\nNew replaced lyrics...\\n\\n[Verse 2]\\nMore lyrics...\",\n \"infill_lyrics\": \"[Bridge]\\nThis is the new bridge section\\nWith updated lyrics...\",\n \"gpt_description_prompt\": \"A happy pop song about summer vacation\",\n \"tags\": \"Pop, Happy, Upbeat\",\n \"negative_tags\": \"Sad, Slow\",\n \"title\": \"Summer Vibes\",\n \"clip_id\": \"clip_abc123\",\n \"continue_at\": 30,\n \"range\": {\n \"start_s\": 15.36,\n \"end_s\": 53.8\n },\n \"infill_type\": \"smart\",\n \"infill_context_range\": {\n \"start_s\": 0,\n \"end_s\": 69.16\n },\n \"persona\": {\n \"persona_id\": \"persona_xyz789\",\n \"artist_clip_id\": \"clip_abc123\",\n \"persona_style\": \"vox\"\n },\n \"controls\": {\n \"style_weight\": 0.6,\n \"audio_weight\": 0.4,\n \"weirdness_constraint\": 0.2,\n \"duration\": 120\n },\n \"vocal_gender\": \"m\",\n \"audio_url\": \"https://example.com/audio.mp3\",\n \"mashup_clip_ids\": [\n \"clip_abc123\",\n \"clip_def456\"\n ],\n \"playlist_id\": \"119573ff-8e48-4fe6-9029-39c76c9a5597\",\n \"sound\": {\n \"description\": \"深沉的低音和温暖的模拟质感\",\n \"type\": \"one_shot\",\n \"key\": \"F#\",\n \"bpm\": 2\n },\n \"stem_control_tags\": \"add \"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "15c257ff-43f7-4678-bd41-202ad6b8488b"
}/generate 端点支持 15 种不同的任务类型,每种类型需要不同的参数集。在调用此端点之前,我们强烈建议使用 Generate Schema 端点获取您任务类型所需的精确必填/可选字段和完整请求示例。快速开始
检查必填参数
GET /suno/v2/generate/schema?task=create 获取 create 任务的参数模式和请求示例。参见 Generate Schema →发送生成请求
POST /suno/v2/generate。轮询任务状态
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_id, model — 见 Inspiration 指南 |
sound | 生成音效 | sound, model |
task 和 model 字段。使用 GET /suno/v2/generate/schema?task=xxx 获取任何特定任务类型的完整参数详情。通用参数
以下参数在大多数任务类型中通用:| 参数 | 类型 | 描述 |
|---|---|---|
task | string | 必填。任务类型(见上表) |
model | string | 必填。模型版本:chirp-v55、chirp-v50、chirp-45+、chirp-v45、chirp-v45-lite、chirp-v40、chirp-v35 |
prompt | string | 歌词或提示文本 |
tags | string | string[] | 风格标签(例如 "Pop, Happy, Upbeat") |
negative_tags | string | string[] | 要排除的风格 |
title | string | 歌曲标题 |
make_instrumental | boolean | 生成无人声版本(默认:false) |
vocal_gender | string | "m"(男声)或 "f"(女声) |
controls | object | 高级控制 — 见下方 |
persona | object | 声音角色 — 见 Persona 总览 |
persona 对象
| 字段 | 类型 | 说明 |
|---|---|---|
persona_id | string | 必填。 来自片段 Persona、Clone Voice 或 Init+Complete |
artist_clip_id | string | 必填。 风格参考 clip |
persona_style | string | chirp-v50+ 仅 "vox" |
is_voice | boolean | Voice Persona(Clone Voice 或 Init+Complete)为 true。片段 Persona 保持 false |
controls 对象
| 字段 | 类型 | 说明 |
|---|---|---|
style_weight | number | 风格权重(0~1) |
audio_weight | number | 原音频权重(0~1) |
weirdness_constraint | number | 创意/怪异度(0~1);越高越有创意 |
duration | number | 目标曲长(秒,10~360)。chirp-v55+ 支持;旧模型与 chirp-custom:* 会静默忽略。不传则由模型决定时长 |
{
"task": "create",
"model": "chirp-v55",
"prompt": "[Verse]\nHello world...",
"tags": "Pop, Happy",
"controls": {
"style_weight": 0.6,
"audio_weight": 0.4,
"weirdness_constraint": 0.2,
"duration": 120
}
}
示例
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"
}'
curl -X POST https://api.mountsea.ai/suno/v2/generate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"task": "extend",
"model": "chirp-v55",
"clip_id": "clip_abc123",
"continue_at": 30,
"tags": "Pop, Happy"
}'
curl -X POST https://api.mountsea.ai/suno/v2/generate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"task": "sound",
"model": "chirp-v55",
"sound": {
"description": "A deep bass drop with warm analog texture",
"type": "one_shot",
"key": "F#",
"bpm": 120
}
}'
task=inspiration 必须使用 创建播放列表 返回的真实 playlist_id。旧模式 playlist_id: "inspiration" + playlist_clip_ids 已废弃。详见 Inspiration 流程。GET /suno/v2/generate/schema?task=your_task — 它会返回每种任务类型的必填字段、可选字段、不允许的字段和完整的请求示例。试用 Generate Schema →授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
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 version. Supports standard models (e.g. chirp-v50) and custom models (chirp-custom:).
"chirp-v50"
Whether to make instrumental (no vocals). [Optional: all tasks]
false
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..."
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..."
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..."
Short description for GPT lyrics generation. [Optional: create, mashup, etc.]
"A happy pop song about summer vacation"
Style tags. Supports string or array. [Optional: all tasks]
"Pop, Happy, Upbeat"
Negative style tags to exclude. [Optional: all tasks]
"Sad, Slow"
Song title. [Optional: all tasks]
"Summer Vibes"
Source clip ID. [Required: extend, cover, use_styles_lyrics, replace_section, add_instrumental, add_vocals, gen_stem_*, add_stems, sample]
"clip_abc123"
Continue position in seconds. [Optional: extend, upload_extend]
x >= 030
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.
Show child attributes
Show child attributes
{ "start_s": 15.36, "end_s": 53.8 }
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 (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.
Show child attributes
Show child attributes
{ "start_s": 0, "end_s": 69.16 }
Artist persona config for style mimicking. [Optional: create, cover, extend, replace_section]
Show child attributes
Show child attributes
{
"persona_id": "persona_xyz789",
"artist_clip_id": "clip_abc123",
"persona_style": "vox"
}
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]
Show child attributes
Show child attributes
{
"style_weight": 0.6,
"audio_weight": 0.4,
"weirdness_constraint": 0.2,
"duration": 120
}
Vocal gender (m=male, f=female). [Optional: all tasks]
m, f "m"
Audio URL for upload tasks. [Required: upload_extend, upload_cover]
"https://example.com/audio.mp3"
Two clip IDs for mashup [clip_a, clip_b]. [Required: mashup]
["clip_abc123", "clip_def456"]
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 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.
Show child attributes
Show child attributes
{
"description": "深沉的低音和温暖的模拟质感",
"type": "one_shot",
"key": "F#",
"bpm": 2
}
Stem control tags for add_stems. [Optional: add_stems] Default "add ".
"add "
响应
task id. Use this id to query task status.
"15c257ff-43f7-4678-bd41-202ad6b8488b"