Generate a Suno mashup
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "generate-mashup",
"callback_url": "https://example.com/webhook",
"input": {
"upload_url_list": [
"https://example.com/a.mp3",
"https://example.com/b.mp3"
],
"custom_mode": true,
"instrumental": true,
"mv": "V5_5",
"style": "cinematic",
"title": "Mashup",
"duration": 120
}
}
'import requests
url = "https://api.poyo.ai/api/generate/submit"
payload = {
"model": "generate-mashup",
"callback_url": "https://example.com/webhook",
"input": {
"upload_url_list": ["https://example.com/a.mp3", "https://example.com/b.mp3"],
"custom_mode": True,
"instrumental": True,
"mv": "V5_5",
"style": "cinematic",
"title": "Mashup",
"duration": 120
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'generate-mashup',
callback_url: 'https://example.com/webhook',
input: {
upload_url_list: ['https://example.com/a.mp3', 'https://example.com/b.mp3'],
custom_mode: true,
instrumental: true,
mv: 'V5_5',
style: 'cinematic',
title: 'Mashup',
duration: 120
}
})
};
fetch('https://api.poyo.ai/api/generate/submit', 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://api.poyo.ai/api/generate/submit",
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' => 'generate-mashup',
'callback_url' => 'https://example.com/webhook',
'input' => [
'upload_url_list' => [
'https://example.com/a.mp3',
'https://example.com/b.mp3'
],
'custom_mode' => true,
'instrumental' => true,
'mv' => 'V5_5',
'style' => 'cinematic',
'title' => 'Mashup',
'duration' => 120
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.poyo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"generate-mashup\",\n \"callback_url\": \"https://example.com/webhook\",\n \"input\": {\n \"upload_url_list\": [\n \"https://example.com/a.mp3\",\n \"https://example.com/b.mp3\"\n ],\n \"custom_mode\": true,\n \"instrumental\": true,\n \"mv\": \"V5_5\",\n \"style\": \"cinematic\",\n \"title\": \"Mashup\",\n \"duration\": 120\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.poyo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"generate-mashup\",\n \"callback_url\": \"https://example.com/webhook\",\n \"input\": {\n \"upload_url_list\": [\n \"https://example.com/a.mp3\",\n \"https://example.com/b.mp3\"\n ],\n \"custom_mode\": true,\n \"instrumental\": true,\n \"mv\": \"V5_5\",\n \"style\": \"cinematic\",\n \"title\": \"Mashup\",\n \"duration\": 120\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.poyo.ai/api/generate/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"generate-mashup\",\n \"callback_url\": \"https://example.com/webhook\",\n \"input\": {\n \"upload_url_list\": [\n \"https://example.com/a.mp3\",\n \"https://example.com/b.mp3\"\n ],\n \"custom_mode\": true,\n \"instrumental\": true,\n \"mv\": \"V5_5\",\n \"style\": \"cinematic\",\n \"title\": \"Mashup\",\n \"duration\": 120\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "<string>",
"status": "not_started",
"created_time": "2023-11-07T05:31:56Z"
}
}Suno AI
Generate Mashup
Blend exactly two audio tracks with Suno
POST
/
api
/
generate
/
submit
Generate a Suno mashup
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "generate-mashup",
"callback_url": "https://example.com/webhook",
"input": {
"upload_url_list": [
"https://example.com/a.mp3",
"https://example.com/b.mp3"
],
"custom_mode": true,
"instrumental": true,
"mv": "V5_5",
"style": "cinematic",
"title": "Mashup",
"duration": 120
}
}
'import requests
url = "https://api.poyo.ai/api/generate/submit"
payload = {
"model": "generate-mashup",
"callback_url": "https://example.com/webhook",
"input": {
"upload_url_list": ["https://example.com/a.mp3", "https://example.com/b.mp3"],
"custom_mode": True,
"instrumental": True,
"mv": "V5_5",
"style": "cinematic",
"title": "Mashup",
"duration": 120
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'generate-mashup',
callback_url: 'https://example.com/webhook',
input: {
upload_url_list: ['https://example.com/a.mp3', 'https://example.com/b.mp3'],
custom_mode: true,
instrumental: true,
mv: 'V5_5',
style: 'cinematic',
title: 'Mashup',
duration: 120
}
})
};
fetch('https://api.poyo.ai/api/generate/submit', 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://api.poyo.ai/api/generate/submit",
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' => 'generate-mashup',
'callback_url' => 'https://example.com/webhook',
'input' => [
'upload_url_list' => [
'https://example.com/a.mp3',
'https://example.com/b.mp3'
],
'custom_mode' => true,
'instrumental' => true,
'mv' => 'V5_5',
'style' => 'cinematic',
'title' => 'Mashup',
'duration' => 120
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.poyo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"generate-mashup\",\n \"callback_url\": \"https://example.com/webhook\",\n \"input\": {\n \"upload_url_list\": [\n \"https://example.com/a.mp3\",\n \"https://example.com/b.mp3\"\n ],\n \"custom_mode\": true,\n \"instrumental\": true,\n \"mv\": \"V5_5\",\n \"style\": \"cinematic\",\n \"title\": \"Mashup\",\n \"duration\": 120\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.poyo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"generate-mashup\",\n \"callback_url\": \"https://example.com/webhook\",\n \"input\": {\n \"upload_url_list\": [\n \"https://example.com/a.mp3\",\n \"https://example.com/b.mp3\"\n ],\n \"custom_mode\": true,\n \"instrumental\": true,\n \"mv\": \"V5_5\",\n \"style\": \"cinematic\",\n \"title\": \"Mashup\",\n \"duration\": 120\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.poyo.ai/api/generate/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"generate-mashup\",\n \"callback_url\": \"https://example.com/webhook\",\n \"input\": {\n \"upload_url_list\": [\n \"https://example.com/a.mp3\",\n \"https://example.com/b.mp3\"\n ],\n \"custom_mode\": true,\n \"instrumental\": true,\n \"mv\": \"V5_5\",\n \"style\": \"cinematic\",\n \"title\": \"Mashup\",\n \"duration\": 120\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "<string>",
"status": "not_started",
"created_time": "2023-11-07T05:31:56Z"
}
}upload_url_list must contain exactly two accessible audio URLs. mv supports V4, V4_5, V4_5ALL, V4_5PLUS, V5, and V5_5. Custom mode follows Generate Music rules: style and title are required, and prompt is additionally required for vocal output. duration is an integer from 10–360 and is only accepted with custom_mode: true and mv: V5_5.
{"model":"generate-mashup","callback_url":"https://example.com/webhook","input":{"upload_url_list":["https://example.com/a.mp3","https://example.com/b.mp3"],"custom_mode":true,"instrumental":true,"mv":"V5_5","style":"cinematic electronic","title":"Night Drive","duration":120}}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
