Extend & Upload
curl --request POST \
--url https://toapis.com/v1/music/generations/extend \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"task_id": "<string>",
"continue_at": 123,
"audio_index": 123,
"prompt": "<string>",
"title": "<string>",
"style": "<string>",
"max_mode": true,
"audioFilePath": "<string>",
"audio_url": "<string>",
"custom": true,
"gpt_description": "<string>",
"persona_id": "<string>"
}
'import requests
url = "https://toapis.com/v1/music/generations/extend"
payload = {
"model": "<string>",
"task_id": "<string>",
"continue_at": 123,
"audio_index": 123,
"prompt": "<string>",
"title": "<string>",
"style": "<string>",
"max_mode": True,
"audioFilePath": "<string>",
"audio_url": "<string>",
"custom": True,
"gpt_description": "<string>",
"persona_id": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
task_id: '<string>',
continue_at: 123,
audio_index: 123,
prompt: '<string>',
title: '<string>',
style: '<string>',
max_mode: true,
audioFilePath: '<string>',
audio_url: '<string>',
custom: true,
gpt_description: '<string>',
persona_id: '<string>'
})
};
fetch('https://toapis.com/v1/music/generations/extend', 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://toapis.com/v1/music/generations/extend",
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>',
'task_id' => '<string>',
'continue_at' => 123,
'audio_index' => 123,
'prompt' => '<string>',
'title' => '<string>',
'style' => '<string>',
'max_mode' => true,
'audioFilePath' => '<string>',
'audio_url' => '<string>',
'custom' => true,
'gpt_description' => '<string>',
'persona_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://toapis.com/v1/music/generations/extend"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"continue_at\": 123,\n \"audio_index\": 123,\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"style\": \"<string>\",\n \"max_mode\": true,\n \"audioFilePath\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"custom\": true,\n \"gpt_description\": \"<string>\",\n \"persona_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://toapis.com/v1/music/generations/extend")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"continue_at\": 123,\n \"audio_index\": 123,\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"style\": \"<string>\",\n \"max_mode\": true,\n \"audioFilePath\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"custom\": true,\n \"gpt_description\": \"<string>\",\n \"persona_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/music/generations/extend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"continue_at\": 123,\n \"audio_index\": 123,\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"style\": \"<string>\",\n \"max_mode\": true,\n \"audioFilePath\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"custom\": true,\n \"gpt_description\": \"<string>\",\n \"persona_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"status": "<string>"
}Suno Music
Extend & Upload
extend an existing song; uploadTask/uploadCover/uploadExtend for uploaded audio
POST
/
v1
/
music
/
generations
/
extend
Extend & Upload
curl --request POST \
--url https://toapis.com/v1/music/generations/extend \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"task_id": "<string>",
"continue_at": 123,
"audio_index": 123,
"prompt": "<string>",
"title": "<string>",
"style": "<string>",
"max_mode": true,
"audioFilePath": "<string>",
"audio_url": "<string>",
"custom": true,
"gpt_description": "<string>",
"persona_id": "<string>"
}
'import requests
url = "https://toapis.com/v1/music/generations/extend"
payload = {
"model": "<string>",
"task_id": "<string>",
"continue_at": 123,
"audio_index": 123,
"prompt": "<string>",
"title": "<string>",
"style": "<string>",
"max_mode": True,
"audioFilePath": "<string>",
"audio_url": "<string>",
"custom": True,
"gpt_description": "<string>",
"persona_id": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
task_id: '<string>',
continue_at: 123,
audio_index: 123,
prompt: '<string>',
title: '<string>',
style: '<string>',
max_mode: true,
audioFilePath: '<string>',
audio_url: '<string>',
custom: true,
gpt_description: '<string>',
persona_id: '<string>'
})
};
fetch('https://toapis.com/v1/music/generations/extend', 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://toapis.com/v1/music/generations/extend",
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>',
'task_id' => '<string>',
'continue_at' => 123,
'audio_index' => 123,
'prompt' => '<string>',
'title' => '<string>',
'style' => '<string>',
'max_mode' => true,
'audioFilePath' => '<string>',
'audio_url' => '<string>',
'custom' => true,
'gpt_description' => '<string>',
'persona_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://toapis.com/v1/music/generations/extend"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"continue_at\": 123,\n \"audio_index\": 123,\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"style\": \"<string>\",\n \"max_mode\": true,\n \"audioFilePath\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"custom\": true,\n \"gpt_description\": \"<string>\",\n \"persona_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://toapis.com/v1/music/generations/extend")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"continue_at\": 123,\n \"audio_index\": 123,\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"style\": \"<string>\",\n \"max_mode\": true,\n \"audioFilePath\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"custom\": true,\n \"gpt_description\": \"<string>\",\n \"persona_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/music/generations/extend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"continue_at\": 123,\n \"audio_index\": 123,\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"style\": \"<string>\",\n \"max_mode\": true,\n \"audioFilePath\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"custom\": true,\n \"gpt_description\": \"<string>\",\n \"persona_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"status": "<string>"
}All four operations share one entry point; the
{operation} path segment selects the behavior:
POST https://toapis.com/v1/music/generations/{operation}
Authorizations
string
required
Bearer Token. Get your API Key: API Key management
extend — continue a song (0.05,Max0.10)
Continue generation from a timestamp of an existing task.custom defaults to true for extend.
string
required
Fixed
"suno"string
required
Source task ID
number
required
Resume point (seconds)
number
Track index when the task has multiple tracks
string
Continuation lyrics (custom mode)
string
Title
string
Style tags
boolean
Max tier $0.10
curl --request POST \
--url https://toapis.com/v1/music/generations/extend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{"model":"suno","task_id":"tsk_aud_xxx","continue_at":60,"prompt":"[Chorus] ..."}'
uploadTask — register an upload ($0.004)
Registers a public audio URL as a task. Its product is the required source forsample/addVocals/addInstrumental/addStem.
string
required
Fixed
"suno"string
required
Publicly accessible audio URL
Send only
model + audioFilePath; extra fields such as version are rejected upstream.curl --request POST \
--url https://toapis.com/v1/music/generations/uploadTask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{"model":"suno","audioFilePath":"https://example.com/my-vocals.mp3"}'
uploadCover — upload + cover (0.05,Max0.10)
string
required
Fixed
"suno"string
required
Source audio URL
boolean
Custom lyrics mode
string
Lyrics (custom=true) or description
string
Inspiration description (required when custom=false)
string
Target style
string
Vocal persona, mutually exclusive with
custom_model_idboolean
Max tier
uploadExtend — upload + extend (0.05,Max0.10)
Upload audio and continue it from a timestamp. Always treated as custom mode.string
required
Fixed
"suno"string
required
Source audio URL
number
required
Resume point (seconds)
string
Continuation lyrics
string
Style
boolean
Max tier
Response
string
Task ID for status polling
string
submitted