{
"customMode": false,
"instrumental": false,
"prompt": "A chill lo-fi beat with soft vocals",
"lyrics": "[Verse] Night city lights shining bright",
"style": "lo-fi, chill",
"imageUrls": [
"https://example.com/reference-image.png"
],
"videoUrls": [
"https://example.com/reference-video.mp4"
],
"audioUrls": [
"https://example.com/reference-audio.mp3"
],
"model": "V6",
"callBackUrl": "https://example.com/callback"
}
{
"customMode": true,
"instrumental": false,
"title": "Peaceful Piano Meditation",
"style": "Classical",
"lyrics": "[Verse] Night city lights shining bright",
"prompt": "A calm and relaxing piano track with soft melodies",
"negativeTags": "Heavy Metal, Upbeat Drums",
"vocalGender": "m",
"styleWeight": 0.65,
"weirdnessConstraint": 0.65,
"audioWeight": 0.65,
"variety": 1,
"duration": 20,
"model": "V6",
"callBackUrl": "https://example.com/callback"
}
{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79****be8e"
}
}Generate Music
Generate music with or without lyrics using AI models.
{
"customMode": false,
"instrumental": false,
"prompt": "A chill lo-fi beat with soft vocals",
"lyrics": "[Verse] Night city lights shining bright",
"style": "lo-fi, chill",
"imageUrls": [
"https://example.com/reference-image.png"
],
"videoUrls": [
"https://example.com/reference-video.mp4"
],
"audioUrls": [
"https://example.com/reference-audio.mp3"
],
"model": "V6",
"callBackUrl": "https://example.com/callback"
}
{
"customMode": true,
"instrumental": false,
"title": "Peaceful Piano Meditation",
"style": "Classical",
"lyrics": "[Verse] Night city lights shining bright",
"prompt": "A calm and relaxing piano track with soft melodies",
"negativeTags": "Heavy Metal, Upbeat Drums",
"vocalGender": "m",
"styleWeight": 0.65,
"weirdnessConstraint": 0.65,
"audioWeight": 0.65,
"variety": 1,
"duration": 20,
"model": "V6",
"callBackUrl": "https://example.com/callback"
}
{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79****be8e"
}
}Model Versions
- Current models:
V6(default),V6_WILD,V6_MINI - Deprecated models:
V5_5,V5,V4_5PLUS,V4_5ALL,V4_5,V4 - Deprecated values remain available only for backward compatibility. New integrations should use a V6-series model.
Usage Guide
- This endpoint creates music based on your text prompt
- Multiple variations will be generated for each request
- You can control detail level with custom mode and instrumental settings
Parameter Details
-
Always required:
customMode,instrumental,model -
In Custom Mode (
customMode: true):titleis optional, maximum 80 characters. Only available in this modepromptis optional; when provided, it is used strictly as lyrics and sung in the generated track. Iflyricsis also provided,lyricstakes priority- At least one of
style,lyrics, ornegativeTagsmust be provided; generation is rejected if all are empty - If
instrumental: true: generate instrumental music (no vocals) - If
instrumental: false: uselyricsas lyrics (fall back topromptiflyricsis not provided) - Optional:
duration,negativeTags,vocalGender,styleWeight,weirdnessConstraint,audioWeight,variety,personaId,personaModel - Character limits by model:
- V4 (Deprecated):
prompt3000 characters,style200 characters - V4_5, V4_5PLUS, V4_5ALL, V5, V5_5 (Deprecated):
prompt5000 characters,style1000 characters - V6, V6_MINI, V6_WILD:
style1000 characters;lyrics5000 characters;negativeTags1000 characters
- V4 (Deprecated):
titlelength limit: 80 characters (all models)
-
In Non-custom Mode (
customMode: false):promptis optional; it serves as the core idea, and lyrics are generated automatically (not a strict match), maximum 3000 characterslyricscan be used as a lyrics attachment together withprompt- At least one of
imageUrls,videoUrls,audioUrls,style, orlyricsmust be provided; generation is rejected if all are empty imageUrls,videoUrls, andaudioUrlsare only valid in this mode- Do not pass parameters that are only available in custom mode:
title,negativeTags,duration,vocalGender,styleWeight,weirdnessConstraint,audioWeight,variety,personaId,personaModel - Total attachments must not exceed 10:
style+lyrics+imageUrls+videoUrls+audioUrls
Optional Parameters
- prompt (string): Description of the desired audio content. Optional. Used as lyrics in custom mode; used as the core idea in non-custom mode (maximum 3000 characters).
- lyrics (string): Lyrics content. Optional. V6 series maximum 5000 characters. In custom mode, takes priority over
promptas lyrics; in non-custom mode, can be used as a lyrics attachment together withprompt. - imageUrls (array): Image references. Only effective when
customModeisfalse. Up to 5 images, each no more than 10 MB. Supported formats: jpeg, png, webp, bmp. - videoUrls (array): Video references. Only effective when
customModeisfalse. Up to 1 file, each no more than 100 MB, duration no more than 241 seconds. Supported formats: mp4, mov, webm. - audioUrls (array): Audio references. Only effective when
customModeisfalse. Duration must be between 6 seconds and 30 minutes; each file no more than 500 MB. - style (string): Music style specification. See character limits in Parameter Details above.
- title (string): Track title. Optional. Only available when
customModeistrue. Maximum 80 characters. Displayed in player interfaces and filenames. - negativeTags (string): Music styles or traits to exclude from the generated audio. Only available when
customModeistrue. For V6, V6_MINI, and V6_WILD: maximum 1000 characters. - vocalGender (string): Vocal gender preference.
mfor male,ffor female. Only available whencustomModeistrue. In practice, this only increases probability and cannot guarantee the instruction is followed. - styleWeight (number): Strength of adherence to the specified style. Range 0–1, up to 2 decimal places. Only effective when
customModeistrue. - weirdnessConstraint (number): Creative/experimental deviation. Range 0–1, up to 2 decimal places. Only effective when
customModeistrue. - audioWeight (number): Relative weight of audio features. Range 0–1, up to 2 decimal places. Only effective when
customModeistrue. Not supported when there are no vocals. - variety (integer): Diversity of generated results. Integer from 0–4, default 1. Only effective when
customModeistrue.0off (exact style),1normal (default, balanced),2high (distinct styles),3extra (bold exploration),4max (maximum variation). - personaId (string): Persona ID or Voice ID. Optional. Only available when
customModeistrue. To generate a Persona ID, see Generate Persona. - personaModel (string): Persona model,
style_personaorvoice_persona. Only available whencustomModeistrue. Only available forV5(Discontinued),V5_5(Discontinued),V6,V6_MINI, andV6_WILD. - duration (number): Audio duration in seconds. Range 10–360, default 20. Only available when
customModeistrue, and only valid when the model isV5_5,V6,V6_MINI, orV6_WILD.
{
"customMode": false,
"instrumental": false,
"prompt": "A chill lo-fi beat with soft vocals",
"lyrics": "[Verse] Night city lights shining bright",
"style": "lo-fi, chill",
"imageUrls": [
"https://example.com/reference-image.png"
],
"videoUrls": [
"https://example.com/reference-video.mp4"
],
"audioUrls": [
"https://example.com/reference-audio.mp3"
],
"model": "V6",
"callBackUrl": "https://example.com/callback"
}
{
"customMode": true,
"instrumental": false,
"title": "Peaceful Piano Meditation",
"style": "Classical",
"lyrics": "[Verse] Night city lights shining bright",
"prompt": "A calm and relaxing piano track with soft melodies",
"negativeTags": "Heavy Metal, Upbeat Drums",
"vocalGender": "m",
"styleWeight": 0.65,
"weirdnessConstraint": 0.65,
"audioWeight": 0.65,
"variety": 1,
"duration": 20,
"model": "V6",
"callBackUrl": "https://example.com/callback"
}
Developer Notes
- Recommendation for new users: Start with
customMode: falsefor simpler usage - Generated files are retained for 14 days
- Callback process has three stages:
text(text generation),first(first track complete),complete(all tracks complete)
Authorizations
🔑 API Authentication
All endpoints require authentication using Bearer Token.
Get API Key
- Visit the API Key Management Page to obtain your API Key
Usage
Add to request headers:
Authorization: Bearer YOUR_API_KEY
⚠️ Note:
- Keep your API Key secure and do not share it with others
- If you suspect your API Key has been compromised, reset it immediately from the management page
Body
Determines whether advanced parameter customization is enabled.
- If
true: Allows detailed control - If
false: Simplified mode
true
Determines whether the audio should be instrumental (no lyrics).
- In Custom Mode (
customMode: true):- If
true: generate instrumental music (no vocals) - If
false: uselyricsas lyrics (fall back topromptiflyricsis not provided)
- If
- In Non-custom Mode (
customMode: false):- If
true: generate instrumental music (no vocals) - If
false:lyricscan be used as a lyrics attachment together with the audio description inprompt
- If
true
The AI model version to use for generation. Required for all requests. Default: V6. Available options:
V6_WILD: Pushes creative boundaries for bolder, more distinctive musical expression.V6_MINI: Lightweight and fast, balancing quality and speed for effortless creation.V6: Greater musical expression with more natural vocals and richer details. Recommended default.V5_5(Discontinued): Custom models tailored to your unique taste.V5(Discontinued): Superior musical expression, faster generation.V4_5PLUS(Discontinued): V4.5+ delivers richer sound, new ways to create, max 8 min.V4_5(Discontinued): V4.5 enables smarter prompts, faster generations, max 8 min.V4_5ALL(Discontinued): V4.5ALL enables smarter prompts, faster generations, max 8 min.V4(Discontinued): V4 improves vocal quality, max 4 min. Discontinued values remain listed only for backward compatibility; use a V6-series model for new integrations.
V6, V6_WILD, V6_MINI, V5_5, V5, V4_5PLUS, V4_5ALL, V4_5, V4 "V6"
The URL to receive task completion notifications when music generation is complete. The callback process has three stages: text (text generation), first (first track complete), complete (all tracks complete). Note: In some cases, text and first stages may be skipped, directly returning complete.
- For detailed callback format and implementation guide, see Music Generation Callbacks
- Alternatively, you can use the Get Music Generation Details interface to poll task status
"https://api.example.com/callback"
A description of the desired audio content. Optional.
- Custom mode (
customMode=true): When provided, the prompt is used strictly as lyrics and sung in the generated track. Iflyricsis also provided,lyricstakes priority. Character limits by model:- V4 (Discontinued): Maximum 3000 characters
- V4_5, V4_5PLUS, V4_5ALL, V5_5, V5 (Discontinued): Maximum 5000 characters
- Non-custom mode (
customMode=false): When provided, the prompt serves as the core idea. Lyrics are generated automatically based on it and do not strictly match the input. Maximum 3000 characters.promptis not required. In non-custom mode, provide at least one ofimageUrls,videoUrls,audioUrls,style, orlyrics. In custom mode, provide at least one ofstyle,lyrics, ornegativeTags. Generation is rejected if all related inputs are empty.
"A calm and relaxing piano track with soft melodies"
Lyrics for the generated audio. Optional.
- V6, V6_MINI, V6_WILD: Maximum 5000 characters.
- When
customMode=true,lyricsis used as lyrics first; iflyricsis not provided,promptis used as lyrics. - When
customMode=false,lyricsis used as a lyrics attachment and can be used together with the audio description inprompt.
"[Verse] Night city lights shining bright"
Image references. Only effective when customMode=false.
- Optional
- Up to 5 images; each image must not exceed 10 MB
- Supported formats:
jpeg,png,webp, andbmp - In non-custom mode, total attachments must not exceed 10:
style+lyrics+imageUrls+videoUrls+audioUrls
5["https://example.com/reference-image.png"]
Video references. Only effective when customMode=false.
- Optional
- Up to 1 video file; each file must not exceed 100 MB, duration must not exceed 241 seconds, with no minimum duration
- Supported formats: mp4, mov, and webm
1["https://example.com/reference-video.mp4"]
Audio references. Only effective when customMode=false.
- Optional
- Audio duration must be between 6 seconds and 30 minutes; each audio file must not exceed 500 MB
["https://example.com/reference-audio.mp3"]
Music style specification for the generated audio.
- Character limits by model:
- V4 (Discontinued): Maximum 200 characters
- V4_5 and V4_5PLUS (Discontinued): Maximum 1000 characters
- V4_5ALL (Discontinued): Maximum 1000 characters
- V5_5 and V5 (Discontinued): Maximum 1000 characters
- V6, V6_MINI, and V6_WILD: Maximum 1000 characters
- Common examples: Jazz, Classical, Electronic, Pop, Rock, Hip-hop, etc.
- In custom mode, provide at least one of
style,lyrics, ornegativeTags. In non-custom mode, provide at least one ofimageUrls,videoUrls,audioUrls,style, orlyrics.
"Classical"
Title for the generated music track. Optional.
- Only available when
customModeistrue. - Maximum 80 characters.
- Displayed in player interfaces and filenames.
80"Peaceful Piano Meditation"
Music styles or traits to exclude from the generated audio. Optional.
- Only available when
customModeistrue. - For V6, V6_MINI, and V6_WILD: maximum 1000 characters.
- In custom mode, provide at least one of
style,lyrics, ornegativeTags.
1000"Heavy Metal, Upbeat Drums"
Vocal gender preference. Optional.
- Only available when
customModeistrue. - Use
mfor male andffor female. - In practice, this only increases probability and cannot guarantee male/female voice instructions are followed.
m, f "m"
Only available when Custom Mode (customMode: true) is enabled. Strength of adherence to the specified style. Optional. Range 0–1, up to 2 decimal places.
0 <= x <= 1Must be a multiple of 0.010.65
Only available when Custom Mode (customMode: true) is enabled. Controls experimental/creative deviation. Optional. Range 0–1, up to 2 decimal places.
0 <= x <= 1Must be a multiple of 0.010.65
Only available when Custom Mode (customMode: true) is enabled. Relative weight of audio features. Optional. Range 0–1, up to 2 decimal places.
audioWeightis not supported when there are no vocals
0 <= x <= 1Must be a multiple of 0.010.65
Only available when Custom Mode (customMode: true) is enabled. Controls the diversity and stylistic variation of generated results. Optional. Range 0–4, integer, default 1.
0: off (exact style) — fully off, strictly the same style1: normal (balanced variety) — default, balances stability and diversity2: high (distinct styles) — produces results with clearly different styles3: extra (bold exploration) — higher variation, encourages bold exploration of different styles4: max (unreasonably varied) — maximum diversity; results may differ in style very significantly
0 <= x <= 4Must be a multiple of 11
Persona ID or Voice ID to apply to the generated music. Optional. Only available when customMode is true. Use this to apply a specific persona style to your music generation.
To generate a Persona ID, use the Generate Persona endpoint to create a personalized music Persona based on generated music.
To generate a Voice ID, use the Generate Voice endpoint. When using a Voice-generated ID, you must set personaModel: voice_persona.
"persona_123"
Persona model. Optional style_persona or voice_persona. Only available when customMode is true. Only available for V5 (Discontinued), V5_5 (Discontinued), V6, V6_MINI, and V6_WILD.
style_persona(default): Use this for Persona IDs generated by the Generate Persona endpoint.voice_persona: Required whenpersonaIdis avoiceIdgenerated by Suno Voice.
style_persona, voice_persona "style_persona"
Audio duration in seconds. Optional.
- Only available when
customModeistrue. - Range: 10–360 seconds. Default: 20.
- Only valid when the model is
V5_5(Discontinued),V6,V6_MINI, orV6_WILD.
10 <= x <= 36020
Callbacks
Response
Request successful
Status Codes
- ✅ 200 - Request successful
- ⚠️ 400 - Invalid parameters
- ⚠️ 401 - Unauthorized access
- ⚠️ 404 - Invalid request method or path
- ⚠️ 405 - Rate limit exceeded
- ⚠️ 413 - Theme or prompt too long
- ⚠️ 429 - Insufficient credits
- ⚠️ 430 - Your call frequency is too high. Please try again later.
- ⚠️ 455 - System maintenance
- ❌ 500 - Server error
200, 400, 401, 404, 405, 413, 429, 430, 455, 500 200
Error message when code != 200
"success"
Show child attributes
Show child attributes
