延長とアップロード
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 音楽
延長とアップロード
extend 延長、uploadTask/uploadCover/uploadExtend アップロード素材
POST
/
v1
/
music
/
generations
/
extend
延長とアップロード
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>"
}4 つの操作が同一エンドポイントを共有し、
{operation} で動作が決まります:
POST https://toapis.com/v1/music/generations/{operation}
Authorizations
string
必須
Bearer Token。API Key:API Key 管理ページ
extend — 曲の延長(0.05,Max0.10)
既存タスクの指定時点から続きを生成。custom は既定で true。
string
必須
固定
"suno"string
必須
元タスク ID
number
必須
再開位置(秒)
number
トラック番号
string
続きの歌詞(custom モード)
string
タイトル
string
スタイルタグ
boolean
Max ティア $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 — アップロード登録($0.004)
公開音声 URL をタスクとして登録。生成物はsample/addVocals/addInstrumental/addStem の必須ソースです。
string
必須
固定
"suno"string
必須
公開アクセス可能な音声 URL
model と audioFilePath のみ送信。version 等の余計なフィールドは上流で拒否されます。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 — アップロード+カバー(0.05,Max0.10)
string
必須
固定
"suno"string
必須
元音声 URL
boolean
カスタム歌詞モード
string
歌詞(custom=true)/ 説明
string
インスピレーション説明(custom=false 時必須)
string
目標スタイル
string
ボーカルペルソナ。
custom_model_id と排他boolean
Max ティア
uploadExtend — アップロード+延長(0.05,Max0.10)
音声をアップロードし、指定時点から延長。常にカスタムモードとして処理。string
必須
固定
"suno"string
必須
元音声 URL
number
必須
再開位置(秒)
string
続きの歌詞
string
スタイル
boolean
Max ティア
Response
string
タスク ID
string
submitted