Music tools
Generate full music tracks. All music jobs are asynchronous: call generate_music, then poll get_status until status is completed (or failed).
For sound effects, an instrumental bed of an exact length, or a soundtrack written against a video you already have, use generate_sound below.
#How to choose: simple vs advanced
The generate_music tool supports two mutually exclusive modes. The agent should pick one based on what the user needs.
Default to SIMPLE mode. Use ADVANCED only when the user explicitly provides or asks for lyrics, a title, style tags, or vocal gender.
| Mode | When to use it | How the API decides |
|---|---|---|
| Simple | Quick idea in one text: genre, mood, vibe, instruments. No fixed title, style tags, lyrics, or vocal gender. | Do not set title or style (leave them empty). Provide a non-empty prompt (max 400 characters). |
| Advanced (custom) | User explicitly provides or asks for lyrics, a specific title, style tags, or vocal gender (or random). Needs either a song description or lyrics (not both), optional negative_tags (what to avoid). | Set both title and style to non-empty strings. vocal_gender is required (m, f, or random). Supply exactly one of song_description or lyrics when not instrumental (see below). |
Rules:
- If the user only describes a song idea (vibe, mood, genre, instruments) with no mention of lyrics/title/style → use simple mode.
- If both
titleandstyleare non-empty → advanced mode (custom).promptis ignored for content; usesong_description/lyricsinstead. - If either
titleorstyleis set alone → invalid; supply both or neither. - If neither title nor style is set → simple mode;
promptis required.
Advanced mode — description vs lyrics (non-instrumental):
- Choose one: set
song_descriptionorlyrics, never both. Sending both is rejected (they are not appended or merged). - Description path: theme/mood/instructions for the model to write the song; leave
lyricsempty. - Lyrics path: user-supplied full lyrics; leave
song_descriptionempty.
Advanced mode — instrumental: set instrumental: true and provide song_description only; do not pass lyrics.
Use get_models with model_type=music for current model IDs and credit costs.
#Models
Music generation is powered by Suno. Supported model values (simple and advanced): V6, V6_WILD, V6_MINI (displayed in the app as V6, V6 Wild and V6 Mini). All three cost the same, so the choice is character, not price: V6 has the richest detail and the most natural vocals, V6_WILD pushes further for a bolder result, V6_MINI is the fast, light lane.
If model is omitted, the platform default V6 applies. Every earlier version (V4, V4_5, V4_5PLUS, V4_5ALL, V5, V5_5) was discontinued by the provider. A request naming one is served by V6 at the same price rather than rejected, so an existing integration keeps working, but those ids are no longer part of the supported set.
#generate_music
#Simple mode parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Single description of the music; max 400 characters. |
instrumental | boolean | No | If true, instrumental only (no vocals). Default: false. |
model | string | No | V6 (default), V6_WILD, or V6_MINI. |
Do not pass title, style, or vocal_gender for simple mode (leave empty).
Example — simple, with vocals:
{
"prompt": "Upbeat pop song about summer",
"instrumental": false,
"model": "V6"
}
Example — simple, instrumental:
{
"prompt": "Epic orchestral background music",
"instrumental": true
}
#Advanced mode parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Song title; max 80 characters. |
style | string | Yes | Style / genre / tags; max 1000 characters. |
vocal_gender | string | Yes | m, f, or random (aliases: male/female; random lets the provider choose). For instrumental, still required by the API but vocal gender is not applied to vocals. |
song_description | string | XOR with lyrics | What the song is about (theme, mood, instructions). Max 5000 chars. Omit if using lyrics. |
lyrics | string | XOR with song_description | Full lyrics if the user supplied them. Max 5000 chars. Omit if using song_description. |
instrumental | boolean | No | Default false. If true, require song_description only. |
negative_tags | string | No | Styles or elements to avoid; max 200 characters. |
style_weight | number | No | Default 0.65 (same as web app). |
weirdness_constraint | number | No | Default 0.65. |
audio_weight | number | No | Default 0.65. |
model | string | No | Same set as simple mode. |
Content requirement (advanced, not instrumental): exactly one of song_description or lyrics must be non-empty (the other omitted or empty).
Example — advanced with description only:
{
"title": "Neon Midnight",
"style": "synthwave, 80s, driving bass, nostalgic",
"vocal_gender": "random",
"song_description": "A song about driving through the city at night with neon reflections",
"model": "V6"
}
Example — advanced with lyrics only:
{
"title": "Morning Light",
"style": "acoustic folk, gentle guitar, warm",
"vocal_gender": "f",
"lyrics": "[Verse 1] ... [Chorus] ..."
}
Response: Includes generation_id, status (e.g. pending), and often estimated_time_seconds. Poll with get_status.
<a id="generate_sound"></a>
#generate_sound
Sound effects and music, either from a sentence or written against a clip you already have. Not for songs with vocals: that is generate_music. Every model here bills per second and generations cannot be refunded, so quote with estimate before you run it.
Pick the model by what you have:
| Model | Input | Output |
|---|---|---|
sonilo-text-to-sfx | A sentence | One described sound effect. 1 to 180 seconds, default 5. |
sonilo-text-to-music | A sentence | An instrumental track at the length you choose, never vocals. 5 to 360 seconds, default 60. Use it over Suno when the track has to fit a slot you already know. |
sonilo-video-to-sfx | A video | Effects matched to the picture, as a bare audio track. |
sonilo-video-to-music | A video | A score written to the cut, as a bare audio track. |
sonilo-video-to-sound | A video | Effects and a score mixed together, as a bare audio track. |
sonilo-video-to-video-sfx | A video | Same as sonilo-video-to-sfx, but returns the clip with the sound in it. |
sonilo-video-to-video-music | A video | Same as sonilo-video-to-music, returned as the clip. |
sonilo-video-to-video-sound | A video | Same as sonilo-video-to-sound, returned as the clip. |
Prefer a -video-to-video-* id when the user wants a finished clip back, and the bare audio ids when they will mix the sound themselves in an editor.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | One of the ids above. |
prompt | string | No | Folded into the field the model reads. The two *-sound models refuse a lone prompt; use music_prompt and sfx_prompt there. Max 2,000 characters. |
music_prompt | string | No | Mood and instrumentation for the music part. |
sfx_prompt | string | No | What the effects should focus on. |
video_url | string | Video models | HTTPS URL of the clip, up to 360 seconds. For a local file, call get_upload_url(model_id="<the model id>"), let the user upload, then get_upload_session(token). |
duration_seconds | number | No | Text models: the output length. Video models: the clip length, needed only when it is not already known from an upload or one of your own generations. |
preserve_speech | boolean | No | Video models. Keeps the speech already in the clip in the result. Default false. |
ducking | boolean | No | Video models, with preserve_speech on. Lowers the new sound while someone speaks. Default true. |
A video run with no prompt at all is valid, and often better: the model writes to what it sees.
Billing: per second of the clip for video models (not of the output), and per second of output for the text models. Each product has a minimum billable length: 10 seconds on anything that writes music (both *-sound ids included) and 3 seconds on the effects-only ids, so a 6-second score bills 10 seconds. estimate(model=..., reference_video_seconds=<clip seconds>) applies the minimum for you.
Response: {generation_id, status: "pending"}. Poll get_status until completed or failed. There is no provider callback, so the poll is also what settles the run; stop early and the credits stay reserved.
#get_status
Check the status of a music generation and get song URLs when done.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
generation_id | string | Yes | ID returned from generate_music. |
Response: Includes status, progress, and when completed a songs array. Each song typically has id, title, audio_url, stream_url, cover_image_url, duration, lyrics, and style.
See Limitations for rate limits and credits.

