편집과 변환
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 음악
편집과 변환
crop/removeSection/fadeIn/fadeOut/adjustSpeed/replaceMusic/sample/mashup/concat/coverSong/remaster
POST
/
v1
/
music
/
generations
/
crop
편집과 변환
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>"
}편집·변환 계열 작업은 모두 기존 태스크를 소스로 사용합니다:
POST https://toapis.com/v1/music/generations/{operation}
string
필수
고정
"suno"string
필수
원본 태스크 ID(
tsk_aud_)number
트랙 번호
구간 편집(각 $0.008)
| operation | 설명 | 추가 필수 |
|---|---|---|
crop | 구간을 잘라 보존 | start_s, end_s |
removeSection | 구간 삭제 | 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}'
페이드(각 $0.008)
| operation | 설명 | 추가 필수 |
|---|---|---|
fadeIn | 인트로 페이드인 | duration_s |
fadeOut | 아웃트로 페이드아웃 | duration_s |
adjustSpeed — 속도($0.024)
number
필수
속도 배율. 예:
0.8 / 1.25boolean
속도 변경 시 피치 유지
재작성·리마스터
replaceMusic — 구간 재작성(0.05,Max0.10)
number
필수
시작(초)
number
필수
종료(초)
string
구간의 새 가사
boolean
Max 티어(본 작업에
custom 없음. 바로 적용)sample — 리샘플(0.05,Max0.10)
task_id는 uploadTask 산출물만 가능. 다른 소스는 거부됩니다.number
필수
샘플 시작(초)
number
필수
샘플 종료(초)
string
리믹스 설명(custom=false일 때 필수)
coverSong — 커버(0.05,Max0.10)
string
목표 스타일 설명(custom=false일 때 필수)
boolean
string
custom=true일 때 가사
string
목표 스타일
remaster — 리마스터($0.05)
string
리마스터 성향(선택)
mashup — 매시업(0.05,Max0.10)
array
필수
정확히 2개의 원본 태스크 ID
array
각 소스의 트랙 번호
string
블렌드 설명(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 — 결합($0.004)
extend 산출 세그먼트를 한 곡으로 결합.
string
필수
extend 원본 태스크 IDResponse
string
새 태스크 ID
string
submitted