Edit & Transform
curl --request POST \
--url https://toapis.com/v1/music/generations/crop \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"task_id": "<string>",
"audio_index": 123,
"speed": 123,
"keep_pitch": true,
"start_s": 123,
"end_s": 123,
"infill_lyrics": "<string>",
"max_mode": true,
"gpt_description": "<string>",
"custom": true,
"prompt": "<string>",
"style": "<string>",
"variation_category": "<string>",
"task_ids": [
{}
],
"audio_indexes": [
{}
]
}
'import requests
url = "https://toapis.com/v1/music/generations/crop"
payload = {
"model": "<string>",
"task_id": "<string>",
"audio_index": 123,
"speed": 123,
"keep_pitch": True,
"start_s": 123,
"end_s": 123,
"infill_lyrics": "<string>",
"max_mode": True,
"gpt_description": "<string>",
"custom": True,
"prompt": "<string>",
"style": "<string>",
"variation_category": "<string>",
"task_ids": [{}],
"audio_indexes": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
task_id: '<string>',
audio_index: 123,
speed: 123,
keep_pitch: true,
start_s: 123,
end_s: 123,
infill_lyrics: '<string>',
max_mode: true,
gpt_description: '<string>',
custom: true,
prompt: '<string>',
style: '<string>',
variation_category: '<string>',
task_ids: [{}],
audio_indexes: [{}]
})
};
fetch('https://toapis.com/v1/music/generations/crop', 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/crop",
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>',
'audio_index' => 123,
'speed' => 123,
'keep_pitch' => true,
'start_s' => 123,
'end_s' => 123,
'infill_lyrics' => '<string>',
'max_mode' => true,
'gpt_description' => '<string>',
'custom' => true,
'prompt' => '<string>',
'style' => '<string>',
'variation_category' => '<string>',
'task_ids' => [
[
]
],
'audio_indexes' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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/crop"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"audio_index\": 123,\n \"speed\": 123,\n \"keep_pitch\": true,\n \"start_s\": 123,\n \"end_s\": 123,\n \"infill_lyrics\": \"<string>\",\n \"max_mode\": true,\n \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"variation_category\": \"<string>\",\n \"task_ids\": [\n {}\n ],\n \"audio_indexes\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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/crop")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"audio_index\": 123,\n \"speed\": 123,\n \"keep_pitch\": true,\n \"start_s\": 123,\n \"end_s\": 123,\n \"infill_lyrics\": \"<string>\",\n \"max_mode\": true,\n \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"variation_category\": \"<string>\",\n \"task_ids\": [\n {}\n ],\n \"audio_indexes\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/music/generations/crop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"audio_index\": 123,\n \"speed\": 123,\n \"keep_pitch\": true,\n \"start_s\": 123,\n \"end_s\": 123,\n \"infill_lyrics\": \"<string>\",\n \"max_mode\": true,\n \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"variation_category\": \"<string>\",\n \"task_ids\": [\n {}\n ],\n \"audio_indexes\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"status": "<string>"
}Suno Music
Edit & Transform
crop/removeSection/fadeIn/fadeOut/adjustSpeed/replaceMusic/sample/mashup/concat/coverSong/remaster
POST
/
v1
/
music
/
generations
/
crop
Edit & Transform
curl --request POST \
--url https://toapis.com/v1/music/generations/crop \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"task_id": "<string>",
"audio_index": 123,
"speed": 123,
"keep_pitch": true,
"start_s": 123,
"end_s": 123,
"infill_lyrics": "<string>",
"max_mode": true,
"gpt_description": "<string>",
"custom": true,
"prompt": "<string>",
"style": "<string>",
"variation_category": "<string>",
"task_ids": [
{}
],
"audio_indexes": [
{}
]
}
'import requests
url = "https://toapis.com/v1/music/generations/crop"
payload = {
"model": "<string>",
"task_id": "<string>",
"audio_index": 123,
"speed": 123,
"keep_pitch": True,
"start_s": 123,
"end_s": 123,
"infill_lyrics": "<string>",
"max_mode": True,
"gpt_description": "<string>",
"custom": True,
"prompt": "<string>",
"style": "<string>",
"variation_category": "<string>",
"task_ids": [{}],
"audio_indexes": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
task_id: '<string>',
audio_index: 123,
speed: 123,
keep_pitch: true,
start_s: 123,
end_s: 123,
infill_lyrics: '<string>',
max_mode: true,
gpt_description: '<string>',
custom: true,
prompt: '<string>',
style: '<string>',
variation_category: '<string>',
task_ids: [{}],
audio_indexes: [{}]
})
};
fetch('https://toapis.com/v1/music/generations/crop', 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/crop",
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>',
'audio_index' => 123,
'speed' => 123,
'keep_pitch' => true,
'start_s' => 123,
'end_s' => 123,
'infill_lyrics' => '<string>',
'max_mode' => true,
'gpt_description' => '<string>',
'custom' => true,
'prompt' => '<string>',
'style' => '<string>',
'variation_category' => '<string>',
'task_ids' => [
[
]
],
'audio_indexes' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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/crop"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"audio_index\": 123,\n \"speed\": 123,\n \"keep_pitch\": true,\n \"start_s\": 123,\n \"end_s\": 123,\n \"infill_lyrics\": \"<string>\",\n \"max_mode\": true,\n \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"variation_category\": \"<string>\",\n \"task_ids\": [\n {}\n ],\n \"audio_indexes\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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/crop")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"audio_index\": 123,\n \"speed\": 123,\n \"keep_pitch\": true,\n \"start_s\": 123,\n \"end_s\": 123,\n \"infill_lyrics\": \"<string>\",\n \"max_mode\": true,\n \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"variation_category\": \"<string>\",\n \"task_ids\": [\n {}\n ],\n \"audio_indexes\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/music/generations/crop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"audio_index\": 123,\n \"speed\": 123,\n \"keep_pitch\": true,\n \"start_s\": 123,\n \"end_s\": 123,\n \"infill_lyrics\": \"<string>\",\n \"max_mode\": true,\n \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"variation_category\": \"<string>\",\n \"task_ids\": [\n {}\n ],\n \"audio_indexes\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"status": "<string>"
}Editing operations all take an existing task as source:
POST https://toapis.com/v1/music/generations/{operation}
string
required
Fixed
"suno"string
required
Source task ID (local
tsk_aud_ ID)number
Source track index
Section editing ($0.008 each)
| operation | Description | Extra required |
|---|---|---|
crop | Keep a time range | start_s, end_s |
removeSection | Remove a time range | start_s, end_s |
curl --request POST \
--url https://toapis.com/v1/music/generations/crop \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{"model":"suno","task_id":"tsk_aud_xxx","audio_index":1,"start_s":10,"end_s":40}'
Fades ($0.008 each)
| operation | Description | Extra required |
|---|---|---|
fadeIn | Intro fade-in | duration_s |
fadeOut | Outro fade-out | duration_s |
adjustSpeed — tempo ($0.024)
number
required
Speed factor, e.g.
0.8 / 1.25boolean
Preserve pitch while changing speed
Rewrite & remaster
replaceMusic — section rewrite (0.05,Max0.10)
number
required
Start (seconds)
number
required
End (seconds)
string
New lyrics for the section
boolean
Max tier (no
custom field; applies directly)sample — resample (0.05,Max0.10)
task_id must be an uploadTask product; other sources are rejected.number
required
Sample start (seconds)
number
required
Sample end (seconds)
string
Remix description (required when custom=false)
coverSong — cover (0.05,Max0.10)
string
Target style description (required when custom=false)
boolean
string
Lyrics when custom=true
string
Target style
remaster — remaster ($0.05)
string
Remaster bias (optional)
mashup — blend (0.05,Max0.10)
array
required
Exactly 2 source task IDs
array
Track index per source task
string
Blend description (required when custom=false)
curl --request POST \
--url https://toapis.com/v1/music/generations/mashup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{"model":"suno","task_ids":["tsk_aud_aaa","tsk_aud_bbb"],"gpt_description":"blend into seamless lo-fi"}'
concat — join ($0.004)
Joins segments produced byextend into a full track.
string
required
extend source task IDResponse
string
New task ID
string
submitted