Suno Extend
curl --request POST \
--url https://api.snapgen.org/v1/music/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"source_task_id": "<string>",
"source_index": 123,
"continue_at": 123,
"version": "<string>",
"custom_model_task_id": "<string>",
"custom": true,
"prompt": "<string>",
"gpt_description": "<string>",
"title": "<string>",
"tags": "<string>",
"negative_tags": "<string>",
"style_weight": 123,
"weirdness": 123,
"audio_weight": 123,
"vocal_gender": "<string>",
"variety": "<string>",
"max_mode": true,
"audio_format": "<string>",
"auto_lyrics": true,
"persona_task_id": "<string>",
"duration": 123,
"webhook": "<string>",
"webhook_secret": "<string>"
}
'import requests
url = "https://api.snapgen.org/v1/music/generations"
payload = {
"model": "<string>",
"source_task_id": "<string>",
"source_index": 123,
"continue_at": 123,
"version": "<string>",
"custom_model_task_id": "<string>",
"custom": True,
"prompt": "<string>",
"gpt_description": "<string>",
"title": "<string>",
"tags": "<string>",
"negative_tags": "<string>",
"style_weight": 123,
"weirdness": 123,
"audio_weight": 123,
"vocal_gender": "<string>",
"variety": "<string>",
"max_mode": True,
"audio_format": "<string>",
"auto_lyrics": True,
"persona_task_id": "<string>",
"duration": 123,
"webhook": "<string>",
"webhook_secret": "<string>"
}
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({
model: '<string>',
source_task_id: '<string>',
source_index: 123,
continue_at: 123,
version: '<string>',
custom_model_task_id: '<string>',
custom: true,
prompt: '<string>',
gpt_description: '<string>',
title: '<string>',
tags: '<string>',
negative_tags: '<string>',
style_weight: 123,
weirdness: 123,
audio_weight: 123,
vocal_gender: '<string>',
variety: '<string>',
max_mode: true,
audio_format: '<string>',
auto_lyrics: true,
persona_task_id: '<string>',
duration: 123,
webhook: '<string>',
webhook_secret: '<string>'
})
};
fetch('https://api.snapgen.org/v1/music/generations', 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.snapgen.org/v1/music/generations",
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([
'model' => '<string>',
'source_task_id' => '<string>',
'source_index' => 123,
'continue_at' => 123,
'version' => '<string>',
'custom_model_task_id' => '<string>',
'custom' => true,
'prompt' => '<string>',
'gpt_description' => '<string>',
'title' => '<string>',
'tags' => '<string>',
'negative_tags' => '<string>',
'style_weight' => 123,
'weirdness' => 123,
'audio_weight' => 123,
'vocal_gender' => '<string>',
'variety' => '<string>',
'max_mode' => true,
'audio_format' => '<string>',
'auto_lyrics' => true,
'persona_task_id' => '<string>',
'duration' => 123,
'webhook' => '<string>',
'webhook_secret' => '<string>'
]),
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.snapgen.org/v1/music/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"source_task_id\": \"<string>\",\n \"source_index\": 123,\n \"continue_at\": 123,\n \"version\": \"<string>\",\n \"custom_model_task_id\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"gpt_description\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"<string>\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 123,\n \"weirdness\": 123,\n \"audio_weight\": 123,\n \"vocal_gender\": \"<string>\",\n \"variety\": \"<string>\",\n \"max_mode\": true,\n \"audio_format\": \"<string>\",\n \"auto_lyrics\": true,\n \"persona_task_id\": \"<string>\",\n \"duration\": 123,\n \"webhook\": \"<string>\",\n \"webhook_secret\": \"<string>\"\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.snapgen.org/v1/music/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"source_task_id\": \"<string>\",\n \"source_index\": 123,\n \"continue_at\": 123,\n \"version\": \"<string>\",\n \"custom_model_task_id\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"gpt_description\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"<string>\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 123,\n \"weirdness\": 123,\n \"audio_weight\": 123,\n \"vocal_gender\": \"<string>\",\n \"variety\": \"<string>\",\n \"max_mode\": true,\n \"audio_format\": \"<string>\",\n \"auto_lyrics\": true,\n \"persona_task_id\": \"<string>\",\n \"duration\": 123,\n \"webhook\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snapgen.org/v1/music/generations")
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 \"model\": \"<string>\",\n \"source_task_id\": \"<string>\",\n \"source_index\": 123,\n \"continue_at\": 123,\n \"version\": \"<string>\",\n \"custom_model_task_id\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"gpt_description\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"<string>\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 123,\n \"weirdness\": 123,\n \"audio_weight\": 123,\n \"vocal_gender\": \"<string>\",\n \"variety\": \"<string>\",\n \"max_mode\": true,\n \"audio_format\": \"<string>\",\n \"auto_lyrics\": true,\n \"persona_task_id\": \"<string>\",\n \"duration\": 123,\n \"webhook\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyEdit
Suno Extend
Continue one of your Suno tracks from a chosen second. 0.075perrequest,0.15 in Max mode.
POST
/
v1
/
music
/
generations
Suno Extend
curl --request POST \
--url https://api.snapgen.org/v1/music/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"source_task_id": "<string>",
"source_index": 123,
"continue_at": 123,
"version": "<string>",
"custom_model_task_id": "<string>",
"custom": true,
"prompt": "<string>",
"gpt_description": "<string>",
"title": "<string>",
"tags": "<string>",
"negative_tags": "<string>",
"style_weight": 123,
"weirdness": 123,
"audio_weight": 123,
"vocal_gender": "<string>",
"variety": "<string>",
"max_mode": true,
"audio_format": "<string>",
"auto_lyrics": true,
"persona_task_id": "<string>",
"duration": 123,
"webhook": "<string>",
"webhook_secret": "<string>"
}
'import requests
url = "https://api.snapgen.org/v1/music/generations"
payload = {
"model": "<string>",
"source_task_id": "<string>",
"source_index": 123,
"continue_at": 123,
"version": "<string>",
"custom_model_task_id": "<string>",
"custom": True,
"prompt": "<string>",
"gpt_description": "<string>",
"title": "<string>",
"tags": "<string>",
"negative_tags": "<string>",
"style_weight": 123,
"weirdness": 123,
"audio_weight": 123,
"vocal_gender": "<string>",
"variety": "<string>",
"max_mode": True,
"audio_format": "<string>",
"auto_lyrics": True,
"persona_task_id": "<string>",
"duration": 123,
"webhook": "<string>",
"webhook_secret": "<string>"
}
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({
model: '<string>',
source_task_id: '<string>',
source_index: 123,
continue_at: 123,
version: '<string>',
custom_model_task_id: '<string>',
custom: true,
prompt: '<string>',
gpt_description: '<string>',
title: '<string>',
tags: '<string>',
negative_tags: '<string>',
style_weight: 123,
weirdness: 123,
audio_weight: 123,
vocal_gender: '<string>',
variety: '<string>',
max_mode: true,
audio_format: '<string>',
auto_lyrics: true,
persona_task_id: '<string>',
duration: 123,
webhook: '<string>',
webhook_secret: '<string>'
})
};
fetch('https://api.snapgen.org/v1/music/generations', 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.snapgen.org/v1/music/generations",
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([
'model' => '<string>',
'source_task_id' => '<string>',
'source_index' => 123,
'continue_at' => 123,
'version' => '<string>',
'custom_model_task_id' => '<string>',
'custom' => true,
'prompt' => '<string>',
'gpt_description' => '<string>',
'title' => '<string>',
'tags' => '<string>',
'negative_tags' => '<string>',
'style_weight' => 123,
'weirdness' => 123,
'audio_weight' => 123,
'vocal_gender' => '<string>',
'variety' => '<string>',
'max_mode' => true,
'audio_format' => '<string>',
'auto_lyrics' => true,
'persona_task_id' => '<string>',
'duration' => 123,
'webhook' => '<string>',
'webhook_secret' => '<string>'
]),
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.snapgen.org/v1/music/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"source_task_id\": \"<string>\",\n \"source_index\": 123,\n \"continue_at\": 123,\n \"version\": \"<string>\",\n \"custom_model_task_id\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"gpt_description\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"<string>\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 123,\n \"weirdness\": 123,\n \"audio_weight\": 123,\n \"vocal_gender\": \"<string>\",\n \"variety\": \"<string>\",\n \"max_mode\": true,\n \"audio_format\": \"<string>\",\n \"auto_lyrics\": true,\n \"persona_task_id\": \"<string>\",\n \"duration\": 123,\n \"webhook\": \"<string>\",\n \"webhook_secret\": \"<string>\"\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.snapgen.org/v1/music/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"source_task_id\": \"<string>\",\n \"source_index\": 123,\n \"continue_at\": 123,\n \"version\": \"<string>\",\n \"custom_model_task_id\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"gpt_description\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"<string>\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 123,\n \"weirdness\": 123,\n \"audio_weight\": 123,\n \"vocal_gender\": \"<string>\",\n \"variety\": \"<string>\",\n \"max_mode\": true,\n \"audio_format\": \"<string>\",\n \"auto_lyrics\": true,\n \"persona_task_id\": \"<string>\",\n \"duration\": 123,\n \"webhook\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snapgen.org/v1/music/generations")
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 \"model\": \"<string>\",\n \"source_task_id\": \"<string>\",\n \"source_index\": 123,\n \"continue_at\": 123,\n \"version\": \"<string>\",\n \"custom_model_task_id\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"gpt_description\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"<string>\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 123,\n \"weirdness\": 123,\n \"audio_weight\": 123,\n \"vocal_gender\": \"<string>\",\n \"variety\": \"<string>\",\n \"max_mode\": true,\n \"audio_format\": \"<string>\",\n \"auto_lyrics\": true,\n \"persona_task_id\": \"<string>\",\n \"duration\": 123,\n \"webhook\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodysuno-extend continues one of your Suno tracks from a chosen second. It keeps the song’s sound and adds a new part from your lyrics or a description. The extension is a new track that starts at continue_at; join it with the original into one full-length song with suno-concat.
| Property | Value |
|---|---|
| Model ID | suno-extend |
| Endpoint | POST /v1/music/generations (asynchronous task) |
| Group | Suno > Edit |
| Input | A track from one of your earlier tasks, a start second, and lyrics or a description |
| Result | Tracks in result.tracks with audio_url |
| Price | $0.075 per request (7.5 credits); $0.15 with max_mode: true |
The
id of your earlier task that holds the source track. It must be your own task, must have succeeded, and must come from a model listed in Source tracks.Position of the source track in that task’s
result.tracks, counting from 1 (up to 8).Second in the source track where the new part starts, from 1 to 3,600. Keep it below the track’s length.
Suno model version:
v6, v6-wild, or v6-mini. Omit it when you send custom_model_task_id.The
id of a succeeded suno-custom-model task. Generates with that custom model instead of a public version, so don’t send version or persona_task_id.true is custom mode: prompt holds the lyrics and the style fields apply. false is description mode: gpt_description guides the result and is required, and max_mode and duration aren’t allowed. The provider treats an omitted value as true.Style variation:
off, normal, high, extra, or max. It doesn’t turn on Max mode or change the price.true turns on Suno Max mode and bills twice the request price. Not allowed with custom: false.The
id of a succeeded suno-persona task. The song is sung with that Persona. Applies in custom mode. Can’t be combined with custom_model_task_id.Target length in seconds, from 10 to 360. The finished track can be shorter or longer. Not allowed with
custom: false.Optional public
https URL that receives one signed event when the task finishes. See Task webhooks.Request rules
The gateway checks these before it reserves any balance:custom: falserequiresgpt_description.max_modeanddurationaren’t allowed withcustom: false.- Send either
versionorcustom_model_task_id, not both. persona_task_idcan’t be combined withcustom_model_task_id.
Source tracks
The source task must be your own succeeded task from one of these models:suno-music, suno-inspo, suno-sounds, suno-upload, suno-upload-cover, suno-upload-extend, suno-extend, suno-cover, suno-remaster, suno-add-vocals, suno-add-instrumental, suno-add-stem, suno-replace-section, suno-remove-section, suno-crop, suno-fade-in, suno-fade-out, suno-speed, suno-concat, suno-mashup, suno-sample.
Send the task id as source_task_id and pick the track with source_index. Never send provider track or clip IDs. See Reference earlier tasks.
Request
curl https://api.snapgen.org/v1/music/generations \
-H "Authorization: Bearer $SNAPGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-extend",
"source_task_id": "task_2f8KcX1mQpR7vT0yZa9Lb3",
"source_index": 1,
"continue_at": 60,
"prompt": "[Chorus]\nWe keep on driving through the night"
}'
202 with a task object and a Location: /v1/tasks/{id} header. Poll GET /v1/tasks/{id} every 10 to 20 seconds until status is succeeded or failed.
Extend and join a song
1
Generate or import the source
Run
suno-music, or import your own audio
with suno-upload, and wait until the
task succeeds. Note its id and the index of the track you want to
continue.2
Extend the track
Send
suno-extend with that task as source_task_id, the track as
source_index, and the second to continue from as continue_at. Pick a
second inside the track, such as the end of a chorus. In custom mode,
prompt holds the lyrics of the new part.3
Join the parts
Send
suno-concat with the extension
task as source_task_id. Its result is the full song, from the start of
the source to the end of the extension.curl https://api.snapgen.org/v1/music/generations \
-H "Authorization: Bearer $SNAPGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-concat",
"source_task_id": "task_7hQmN2pX5rT8vW1yZc4Kd6",
"source_index": 1
}'
Result
result.tracks[] lists every track in its original order, each with its index and audio_url, plus title, image_url, duration_seconds, lyrics, and tags when the provider returns them. result.urls lists the audio URLs.
{
"urls": [
"https://cdn.example.com/music/night-drive.mp3"
],
"tracks": [
{
"index": 1,
"id": "clip_8f3a2c",
"title": "Night Drive",
"audio_url": "https://cdn.example.com/music/night-drive.mp3",
"image_url": "https://cdn.example.com/music/night-drive.jpg",
"duration_seconds": 184.6,
"tags": "lo-fi, soft piano, rain"
}
]
}
Result URLs are kept for about 72 hours. Download the files you want to keep.
See Music generation tasks for the task lifecycle, result fields, webhooks, and errors.