curl --request POST \
--url https://toapis.com/v1/music/generations/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "suno",
"gpt_description": "lo-fi jazz for a rainy café",
"instrumental": false,
"version": "v6"
}'
import requests
resp = requests.post(
"https://toapis.com/v1/music/generations/generation",
headers={"Authorization": "Bearer <token>"},
json={
"model": "suno",
"custom": True,
"prompt": "[Verse]\nNeon lights are glowing\n[Chorus]\nWe ride until the morning",
"title": "Neon Ride",
"style": "synthwave",
"max_mode": True
}
)
print(resp.json())
const resp = await fetch("https://toapis.com/v1/music/generations/generation", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "suno",
gpt_description: "dreamy synthwave with female vocals",
version: "v6-wild"
})
});
console.log(await resp.json());
{
"task_id": "<string>",
"status": "<string>"
}Suno Music
Music Generation
Suno music generation with inspiration and custom-lyrics modes, optional Max tier
POST
/
v1
/
music
/
generations
/
generation
curl --request POST \
--url https://toapis.com/v1/music/generations/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "suno",
"gpt_description": "lo-fi jazz for a rainy café",
"instrumental": false,
"version": "v6"
}'
import requests
resp = requests.post(
"https://toapis.com/v1/music/generations/generation",
headers={"Authorization": "Bearer <token>"},
json={
"model": "suno",
"custom": True,
"prompt": "[Verse]\nNeon lights are glowing\n[Chorus]\nWe ride until the morning",
"title": "Neon Ride",
"style": "synthwave",
"max_mode": True
}
)
print(resp.json())
const resp = await fetch("https://toapis.com/v1/music/generations/generation", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "suno",
gpt_description: "dreamy synthwave with female vocals",
version: "v6-wild"
})
});
console.log(await resp.json());
{
"task_id": "<string>",
"status": "<string>"
}- Generate full songs from a text description or custom lyrics (2 candidates per request)
- Asynchronous task; poll by task ID
customdetermines the meaning ofprompt: custom lyrics vs inspiration description
Authorizations
string
required
Bearer Token. Get your API Key: API Key management
Body
string
required
Fixed value
"suno"boolean
Mode switch, default
falsefalse: inspiration mode —gpt_description(orprompt) describes the musictrue: custom lyrics mode —promptis the lyrics text;title/style/negative_tagsapply
string
Music description in inspiration mode, e.g.
"lo-fi jazz for a rainy café". Not used in custom mode.string
Lyrics text in custom mode (supports
[Verse]/[Chorus] structure tags)string
Song title (custom mode)
string
Style tags (custom mode), e.g.
"dreamy synthwave, female vocal"string
Elements to avoid (custom mode)
boolean
Generate instrumental-only music
string
Engine version:
v6 / v6-wild / v6-miniboolean
Max quality tier, billed at 2× ($0.10). Requires
custom=truestring
Reuse a created vocal persona. Mutually exclusive with
custom_model_idstring
Use a custom-trained model. Mutually exclusive with
version and persona_idOptional tuning parameters
style_weight, weirdness, audio_weight, vocal_gender, auto_lyrics, variety are all optional; upstream defaults apply when omitted.
Response
string
Task ID (
tsk_aud_ prefix); poll via music task statusstring
Initial status:
submitted / queued / in_progressresult.music[] returns 2 candidates, each with audio_url, image_url, title, tags, lyrics, duration. Media URLs are mirrored to our CDN.
curl --request POST \
--url https://toapis.com/v1/music/generations/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "suno",
"gpt_description": "lo-fi jazz for a rainy café",
"instrumental": false,
"version": "v6"
}'
import requests
resp = requests.post(
"https://toapis.com/v1/music/generations/generation",
headers={"Authorization": "Bearer <token>"},
json={
"model": "suno",
"custom": True,
"prompt": "[Verse]\nNeon lights are glowing\n[Chorus]\nWe ride until the morning",
"title": "Neon Ride",
"style": "synthwave",
"max_mode": True
}
)
print(resp.json())
const resp = await fetch("https://toapis.com/v1/music/generations/generation", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "suno",
gpt_description: "dreamy synthwave with female vocals",
version: "v6-wild"
})
});
console.log(await resp.json());