ステム分離とトラック追加
curl --request POST \
--url https://toapis.com/v1/music/generations/stems \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"task_id": "<string>",
"audio_index": 123,
"gpt_description": "<string>",
"custom": true,
"prompt": "<string>",
"max_mode": true
}
'import requests
url = "https://toapis.com/v1/music/generations/stems"
payload = {
"model": "<string>",
"task_id": "<string>",
"audio_index": 123,
"gpt_description": "<string>",
"custom": True,
"prompt": "<string>",
"max_mode": True
}
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,
gpt_description: '<string>',
custom: true,
prompt: '<string>',
max_mode: true
})
};
fetch('https://toapis.com/v1/music/generations/stems', 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/stems",
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,
'gpt_description' => '<string>',
'custom' => true,
'prompt' => '<string>',
'max_mode' => true
]),
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/stems"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"audio_index\": 123,\n \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"max_mode\": true\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/stems")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"audio_index\": 123,\n \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"max_mode\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/music/generations/stems")
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 \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"max_mode\": true\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"status": "<string>"
}Suno 音楽
ステム分離とトラック追加
stems/stemsAll 分離、addStem/addVocals/addInstrumental トラック生成
POST
/
v1
/
music
/
generations
/
stems
ステム分離とトラック追加
curl --request POST \
--url https://toapis.com/v1/music/generations/stems \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"task_id": "<string>",
"audio_index": 123,
"gpt_description": "<string>",
"custom": true,
"prompt": "<string>",
"max_mode": true
}
'import requests
url = "https://toapis.com/v1/music/generations/stems"
payload = {
"model": "<string>",
"task_id": "<string>",
"audio_index": 123,
"gpt_description": "<string>",
"custom": True,
"prompt": "<string>",
"max_mode": True
}
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,
gpt_description: '<string>',
custom: true,
prompt: '<string>',
max_mode: true
})
};
fetch('https://toapis.com/v1/music/generations/stems', 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/stems",
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,
'gpt_description' => '<string>',
'custom' => true,
'prompt' => '<string>',
'max_mode' => true
]),
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/stems"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"audio_index\": 123,\n \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"max_mode\": true\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/stems")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"task_id\": \"<string>\",\n \"audio_index\": 123,\n \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"max_mode\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/music/generations/stems")
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 \"gpt_description\": \"<string>\",\n \"custom\": true,\n \"prompt\": \"<string>\",\n \"max_mode\": true\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
number
トラック番号
ステム分離
| operation | 説明 | 料金 |
|---|---|---|
stems | ボーカル/伴奏の2分割 | $0.10 |
stemsAll | 全楽器を個別分離 | $0.24 |
result.music[] の audio_url として返り、CDN にミラー済みです。
curl --request POST \
--url https://toapis.com/v1/music/generations/stemsAll \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{"model":"suno","task_id":"tsk_aud_xxx"}'
トラック追加(各 0.05,Max0.10)
addVocals/addInstrumental/addStem の task_id は uploadTask 生成物のみ。| operation | 説明 |
|---|---|
addVocals | アップロード素材にボーカル生成 |
addInstrumental | アップロード素材に伴奏生成 |
addStem | 楽器トラックを 1 本追加 |
string
目標説明(custom=false 時必須)
boolean
string
custom=true 時の歌詞
boolean
Max ティア
curl --request POST \
--url https://toapis.com/v1/music/generations/addVocals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{"model":"suno","task_id":"tsk_aud_upload_task","gpt_description":"add dreamy female vocals"}'
Response
string
新タスク ID
string
submitted