Upload And Extend Audio
This API extends audio tracks while preserving the original style of the audio track. It includes Suno’s upload functionality, allowing users to upload audio files for processing. The expected result is a longer track that seamlessly continues the input style.
Parameter Usage Guide
- instrumental (boolean, optional) determines whether to generate instrumental music and defaults to false.
- prompt is optional in all modes and for all instrumental values.
- When defaultParamFlag is true (Custom Parameters):
- If instrumental is true: only style, title, and uploadUrl are required; prompt and vocalGender are optional.
- If instrumental is false: only style, title, and uploadUrl are required. prompt is optional and is used as the prompt when provided; vocalGender is optional.
- Character limits (based on model):
- V4_5, V4_5PLUS, V5, V5_5 models: prompt max 5000 characters, style max 1000 characters, title max 100 characters
- V4 model: prompt max 3000 characters, style max 200 characters, title max 80 characters
- V4_5ALL model: prompt max 5000 characters, style max 1000 characters, title max 80 characters
- model (string, required):
V4_5ALL,V4,V4_5,V4_5PLUS,V5,V5_5.V5_5: Unleash Your Voice: Custom Models Tailored to Your Unique Taste — same limits asV5where applicable. - continueAt: the time point in seconds from which to start extending (must be greater than 0 and less than the uploaded audio duration)
- uploadUrl: specifies the upload location for audio files; ensure uploaded audio does not exceed 8 minutes.
- When defaultParamFlag is false (Default Parameters):
- Only uploadUrl is required
- prompt is optional
- If instrumental is false, lyrics will be generated automatically
- Other parameters will use the original audio’s parameters
Optional parameters
- vocalGender (string): Optional and not required whether instrumental is true or false. Allowed values:
m(male),f(female). - styleWeight (number): Style adherence weight in range 0–1 (recommended two decimals)
- weirdnessConstraint (number): Creativity/novelty constraint in range 0–1 (recommended two decimals)
- audioWeight (number): Relative weight of audio consistency in range 0–1 (recommended two decimals)
- personaId (string): Persona ID or Suno Voice
voiceIdto apply when using custom parameters. If you use a Voice-generated ID, setpersonaModeltovoice_persona. - personaModel (string): Persona type. Use
style_personafor Generate Persona IDs, orvoice_personafor Suno Voice IDs.
Developer Notes
- Generated files will be retained for 14 days
- Model version must be consistent with the source music
- This feature is ideal for creating longer works by extending existing music
- Pay attention to character limits for prompt, style, and title to ensure successful processing
- uploadUrl parameter specifies the upload location for audio files; provide a valid URL.
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:
⚠️ 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
The URL for uploading audio files, required regardless of whether defaultParamFlag is true or false. Ensure the uploaded audio does not exceed 8 minutes in length.
"https://storage.example.com/upload"
Enables custom mode for advanced audio generation settings.
- Set to
trueto use custom parameter mode (requiresstyle,title, anduploadUrl).promptis optional in all cases and, when provided, is used as a prompt. - Set to
falseto use non-custom mode (onlyuploadUrlis required).promptremains optional. Wheninstrumentalisfalse, lyrics are generated automatically.
true
The AI model version to use for generation.
- Required for all requests.
- Available options:
V5: Superior musical expression, faster generation.V5_5: Unleash Your Voice: Custom Models Tailored to Your Unique Taste. Same custom-modepromptandstylecharacter limits as V5 (5000 / 1000).V4_5PLUS: V4.5+ is richer sound, new waysto create, max 8 min.V4_5: V4.5 is smarter prompts, fastergenerations, max 8 min.V4: V4 is improved vocal quality,max 4 min.V4_5ALL: V4.5-all is better song structure,max 8 min.
V4_5ALL, V4, V4_5, V4_5PLUS, V5, V5_5 "V4_5ALL"
The URL to receive task completion notifications when upload and extend audio 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 Upload and Extend Audio Callbacks
- Alternatively, you can use the Get Music Generation Details interface to poll task status
"https://api.example.com/callback"
Determines whether the audio should be instrumental (without lyrics).
- In custom parameter mode (
defaultParamFlag: true):- If
true: onlystyle,title, anduploadUrlare required;promptandvocalGenderdo not need to be provided. - If
false:style,title, anduploadUrlare required;promptis optional and, when provided, is used as a prompt;vocalGenderdoes not need to be provided.
- If
- In non-custom parameter mode (
defaultParamFlag: false): required fields are unaffected (onlyuploadUrlis required), andpromptremains optional. Iffalse, lyrics are generated automatically.
Optional. Defaults tofalse.
false
Describes how the music should be extended. Optional in all cases. When provided, it is used as a prompt. Character limits by model:
- V4: Maximum 3000 characters
- V4_5, V4_5PLUS, V4_5ALL, V5 & V5_5: Maximum 5000 characters
"Extend the music with more relaxing notes"
Music style, e.g., Jazz, Classical, Electronic. Character limits by model:
- V4: Maximum 200 characters
- V4_5, V4_5PLUS, V5, V5_5 & V4_5ALL: Maximum 1000 characters
"Classical"
Music title. Character limits by model:
- V4 & V4_5ALL: Maximum 80 characters
- V4_5, V4_5PLUS, V5 & V5_5: Maximum 100 characters
"Peaceful Piano Extended"
The time point (in seconds) from which to start extending the music.
- Required when
defaultParamFlagistrue. - Value range: greater than 0 and less than the total duration of the uploaded audio.
- Specifies the position in the original track where the extension should begin.
60
Only available when custom parameters are enabled. Persona ID to apply to the generated music. Optional. You can use either:
- A Persona ID generated by the Generate Persona endpoint. Use
personaModel: style_personaor omitpersonaModelto use the default. - A
voiceIdgenerated by the Suno Voice workflow. When using a voice-generated ID, you must setpersonaModel: voice_persona.
"persona_123"
Persona model type to apply when using personaId. Optional.
style_persona(default): Use this for Persona IDs generated by the Generate Persona endpoint.voice_persona: Use this whenpersonaIdis avoiceIdgenerated by Suno Voice. This option is only available with V5 and V5_5 models.
style_persona, voice_persona "style_persona"
Music styles to exclude from generation
"Relaxing Piano"
Preferred vocal gender. Optional; not required if instrumental is set to true. Allowed values: 'm' (male), 'f' (female).
m, f "m"
Style adherence weight. Optional. Range: 0-1. Two decimal places recommended.
0 <= x <= 1Must be a multiple of 0.010.65
Creativity/novelty constraint. Optional. Range: 0-1. Two decimal places recommended.
0 <= x <= 1Must be a multiple of 0.010.65
Relative weight of audio consistency versus other controls. Optional. Range: 0-1. Two decimal places recommended.
0 <= x <= 1Must be a multiple of 0.010.65
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"
