Generate music
curl --request POST \
--url https://api.gately.ai/suno/submit/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A relaxing jazz piano piece with soft drums",
"title": "Relaxing Jazz",
"tags": "jazz, relaxing, piano"
}
'import requests
url = "https://api.gately.ai/suno/submit/music"
payload = {
"prompt": "A relaxing jazz piano piece with soft drums",
"title": "Relaxing Jazz",
"tags": "jazz, relaxing, piano"
}
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({
prompt: 'A relaxing jazz piano piece with soft drums',
title: 'Relaxing Jazz',
tags: 'jazz, relaxing, piano'
})
};
fetch('https://api.gately.ai/suno/submit/music', 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.gately.ai/suno/submit/music",
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([
'prompt' => 'A relaxing jazz piano piece with soft drums',
'title' => 'Relaxing Jazz',
'tags' => 'jazz, relaxing, piano'
]),
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.gately.ai/suno/submit/music"
payload := strings.NewReader("{\n \"prompt\": \"A relaxing jazz piano piece with soft drums\",\n \"title\": \"Relaxing Jazz\",\n \"tags\": \"jazz, relaxing, piano\"\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.gately.ai/suno/submit/music")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A relaxing jazz piano piece with soft drums\",\n \"title\": \"Relaxing Jazz\",\n \"tags\": \"jazz, relaxing, piano\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gately.ai/suno/submit/music")
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 \"prompt\": \"A relaxing jazz piano piece with soft drums\",\n \"title\": \"Relaxing Jazz\",\n \"tags\": \"jazz, relaxing, piano\"\n}"
response = http.request(request)
puts response.read_bodyMedia
Music Generation
Generate music from text prompts
POST
/
suno
/
submit
/
music
Generate music
curl --request POST \
--url https://api.gately.ai/suno/submit/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A relaxing jazz piano piece with soft drums",
"title": "Relaxing Jazz",
"tags": "jazz, relaxing, piano"
}
'import requests
url = "https://api.gately.ai/suno/submit/music"
payload = {
"prompt": "A relaxing jazz piano piece with soft drums",
"title": "Relaxing Jazz",
"tags": "jazz, relaxing, piano"
}
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({
prompt: 'A relaxing jazz piano piece with soft drums',
title: 'Relaxing Jazz',
tags: 'jazz, relaxing, piano'
})
};
fetch('https://api.gately.ai/suno/submit/music', 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.gately.ai/suno/submit/music",
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([
'prompt' => 'A relaxing jazz piano piece with soft drums',
'title' => 'Relaxing Jazz',
'tags' => 'jazz, relaxing, piano'
]),
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.gately.ai/suno/submit/music"
payload := strings.NewReader("{\n \"prompt\": \"A relaxing jazz piano piece with soft drums\",\n \"title\": \"Relaxing Jazz\",\n \"tags\": \"jazz, relaxing, piano\"\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.gately.ai/suno/submit/music")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A relaxing jazz piano piece with soft drums\",\n \"title\": \"Relaxing Jazz\",\n \"tags\": \"jazz, relaxing, piano\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gately.ai/suno/submit/music")
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 \"prompt\": \"A relaxing jazz piano piece with soft drums\",\n \"title\": \"Relaxing Jazz\",\n \"tags\": \"jazz, relaxing, piano\"\n}"
response = http.request(request)
puts response.read_bodyMusic Generation API
The Music Generation API allows you to create original music tracks from text prompts. Powered by advanced AI models, it can generate various musical styles, instrumentation, and moods.
Overview
Create AI-generated music by providing text prompts that describe the style, mood, and instrumentation you want. The API handles the request asynchronously:- Submit a generation request with your prompt
- Receive a task ID for tracking
- Check the status until completion
- Download the generated music file
The OpenAPI playground above allows you to test music generation. Provide a detailed prompt describing the music you want to create.
Base URL
https://api.gately.ai/suno/submit/music
Request Format
curl --location 'https://api.gately.ai/suno/submit/music' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "An upbeat electronic dance track with energetic synths and a catchy hook",
"tags": "electronic, dance, upbeat",
"title": "Dance Energy",
"mv": "v5"
}'
Parameters
string
required
Detailed description of the music you want to generate
string
Comma-separated list of genre tags
string
Title for the generated track
string
default:"v5"
Model version to use
Response Format
{
"status": "success",
"data": {
"task_id": "mus_bVDqJBrLStaPbCZXvLZrWqi4",
"estimated_completion_time": 120
}
}
string
Unique identifier for the generation task
integer
Estimated time in seconds until completion
Checking Generation Status
Once you have atask_id, you can check the status of the music generation:
curl --location 'https://api.gately.ai/suno/music/status/mus_bVDqJBrLStaPbCZXvLZrWqi4' \
--header 'Authorization: Bearer YOUR_API_KEY'
Status Response Format
{
"status": "completed",
"data": {
"task_id": "mus_bVDqJBrLStaPbCZXvLZrWqi4",
"audio_url": "https://storage.taam.cloud/music/mus_bVDqJBrLStaPbCZXvLZrWqi4.mp3",
"cover_image": "https://storage.taam.cloud/music/covers/mus_bVDqJBrLStaPbCZXvLZrWqi4.jpg"
}
}
queued: Task is in the queueprocessing: Music is being generatedcompleted: Generation is completefailed: Generation failed
Prompt Tips
Musical Style Guidance
Musical Style Guidance
Include specific genres, eras, or artists: “A jazz fusion track inspired by Weather Report with complex chord progressions”
Instrumentation
Instrumentation
Specify instruments: “An orchestral piece featuring prominent French horns, violins, and timpani”
Mood and Energy
Mood and Energy
Describe the feeling: “A melancholic piano ballad with emotional chord progressions”
Structure
Structure
Detail song structure: “A pop track with verse-chorus structure, building to an energetic bridge”
Example Prompts
{
"prompt": "A futuristic electronic track with glitchy beats, atmospheric pads, and a driving bassline that evolves throughout",
"tags": "electronic, ambient, glitch",
"title": "Digital Horizon"
}
{
"prompt": "An epic orchestral piece with soaring strings, powerful brass hits, and dramatic percussion building to a cinematic climax",
"tags": "orchestral, epic, cinematic",
"title": "Hero's Journey"
}
{
"prompt": "A folk acoustic guitar ballad with finger-picking patterns, warm vocals, and subtle background harmonies",
"tags": "folk, acoustic, vocal",
"title": "Mountain Path"
}
Limitations
- Generated tracks are typically 1-2 minutes in length
- Specific artist names should be used as inspiration only, not direct copying
- Vocals are generated in a fictional language
- Maximum of 50 active generations per account at once
Was this page helpful?

