Generate sound effects
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "generate-sounds",
"input": {
"prompt": "Rain and distant thunder",
"mv": "V5_5",
"sound_loop": true,
"sound_tempo": 90,
"sound_key": "Cm",
"grab_lyrics": false
}
}
'import requests
url = "https://api.poyo.ai/api/generate/submit"
payload = {
"model": "generate-sounds",
"input": {
"prompt": "Rain and distant thunder",
"mv": "V5_5",
"sound_loop": True,
"sound_tempo": 90,
"sound_key": "Cm",
"grab_lyrics": False
}
}
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-sounds',
input: {
prompt: 'Rain and distant thunder',
mv: 'V5_5',
sound_loop: true,
sound_tempo: 90,
sound_key: 'Cm',
grab_lyrics: false
}
})
};
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-sounds',
'input' => [
'prompt' => 'Rain and distant thunder',
'mv' => 'V5_5',
'sound_loop' => true,
'sound_tempo' => 90,
'sound_key' => 'Cm',
'grab_lyrics' => false
]
]),
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-sounds\",\n \"input\": {\n \"prompt\": \"Rain and distant thunder\",\n \"mv\": \"V5_5\",\n \"sound_loop\": true,\n \"sound_tempo\": 90,\n \"sound_key\": \"Cm\",\n \"grab_lyrics\": false\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-sounds\",\n \"input\": {\n \"prompt\": \"Rain and distant thunder\",\n \"mv\": \"V5_5\",\n \"sound_loop\": true,\n \"sound_tempo\": 90,\n \"sound_key\": \"Cm\",\n \"grab_lyrics\": false\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-sounds\",\n \"input\": {\n \"prompt\": \"Rain and distant thunder\",\n \"mv\": \"V5_5\",\n \"sound_loop\": true,\n \"sound_tempo\": 90,\n \"sound_key\": \"Cm\",\n \"grab_lyrics\": false\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 Sounds
Create sound effects and ambience with Suno
POST
/
api
/
generate
/
submit
Generate sound effects
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "generate-sounds",
"input": {
"prompt": "Rain and distant thunder",
"mv": "V5_5",
"sound_loop": true,
"sound_tempo": 90,
"sound_key": "Cm",
"grab_lyrics": false
}
}
'import requests
url = "https://api.poyo.ai/api/generate/submit"
payload = {
"model": "generate-sounds",
"input": {
"prompt": "Rain and distant thunder",
"mv": "V5_5",
"sound_loop": True,
"sound_tempo": 90,
"sound_key": "Cm",
"grab_lyrics": False
}
}
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-sounds',
input: {
prompt: 'Rain and distant thunder',
mv: 'V5_5',
sound_loop: true,
sound_tempo: 90,
sound_key: 'Cm',
grab_lyrics: false
}
})
};
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-sounds',
'input' => [
'prompt' => 'Rain and distant thunder',
'mv' => 'V5_5',
'sound_loop' => true,
'sound_tempo' => 90,
'sound_key' => 'Cm',
'grab_lyrics' => false
]
]),
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-sounds\",\n \"input\": {\n \"prompt\": \"Rain and distant thunder\",\n \"mv\": \"V5_5\",\n \"sound_loop\": true,\n \"sound_tempo\": 90,\n \"sound_key\": \"Cm\",\n \"grab_lyrics\": false\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-sounds\",\n \"input\": {\n \"prompt\": \"Rain and distant thunder\",\n \"mv\": \"V5_5\",\n \"sound_loop\": true,\n \"sound_tempo\": 90,\n \"sound_key\": \"Cm\",\n \"grab_lyrics\": false\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-sounds\",\n \"input\": {\n \"prompt\": \"Rain and distant thunder\",\n \"mv\": \"V5_5\",\n \"sound_loop\": true,\n \"sound_tempo\": 90,\n \"sound_key\": \"Cm\",\n \"grab_lyrics\": false\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"
}
}Use
mv V5 or V5_5. sound_tempo is an integer from 1–300 BPM; sound_key accepts major/minor keys such as C, F#, Am, or C#m. Set sound_loop for a loopable result and grab_lyrics when the prompt contains vocal material.
{"model":"generate-sounds","input":{"prompt":"Rain on a metal roof with distant thunder","mv":"V5_5","sound_loop":true,"sound_tempo":90,"sound_key":"Cm","grab_lyrics":false}}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
