Skip to main content
POST
/
api
/
v1
/
generate
/
extend
{
  "defaultParamFlag": true,
  "audioId": "e231****-****-****-****-****8cadc7dc",
  "prompt": "Extend with a mellow bridge and outro",
  "style": "Indie Pop",
  "title": "Evening Sky (Extended)",
  "continueAt": 60,
  "model": "V4_5ALL",
  "callBackUrl": "https://example.com/callback",
  "vocalGender": "m",
  "styleWeight": 0.61,
  "weirdnessConstraint": 0.72,
  "audioWeight": 0.65
}
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "5c79****be8e"
  }
}

Parameter Usage Guide

  • 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 custom-parameter character limits as V5.
  • When defaultParamFlag is true (Custom Parameters):
    • prompt, style, title, and continueAt are required
    • Character limits by model:
      • V4: prompt max 3000, style max 200, title max 80
      • V4_5ALL: prompt max 5000, style max 1000, title max 80
      • V4_5, V4_5PLUS, V5, V5_5: prompt max 5000, style max 1000, title max 100
  • When defaultParamFlag is false (Use Default Parameters):
    • Only audioId is required for the parameter set; model and callBackUrl remain required by the API
    • Other creative parameters use the original audio’s values

Optional parameters

The following fields are optional controls available for this endpoint:
  • vocalGender (string): Preferred vocal gender. 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 voiceId to apply when using custom parameters. If you use a Voice-generated ID, set personaModel to voice_persona.
  • personaModel (string): Persona type. Use style_persona for Generate Persona IDs, or voice_persona for Suno Voice IDs.
{
  "defaultParamFlag": true,
  "audioId": "e231****-****-****-****-****8cadc7dc",
  "prompt": "Extend with a mellow bridge and outro",
  "style": "Indie Pop",
  "title": "Evening Sky (Extended)",
  "continueAt": 60,
  "model": "V4_5ALL",
  "callBackUrl": "https://example.com/callback",
  "vocalGender": "m",
  "styleWeight": 0.61,
  "weirdnessConstraint": 0.72,
  "audioWeight": 0.65
}

Developer Notes

  1. Generated files are retained for 15 days
  2. Model version must be consistent with the source music
  3. This feature is ideal for creating longer compositions by extending existing tracks

Authorizations

Authorization
string
header
required

🔑 API Authentication

All endpoints require authentication using Bearer Token.

Get API Key

  1. 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

application/json
defaultParamFlag
boolean
required

Controls parameter usage mode.

  • true: Use custom parameters (requires continueAt, prompt, style, and title).
  • false: Use original audio parameters (only audioId is required).
Example:

true

audioId
string
required

Audio ID of the track to extend. This is the source track that will be continued.

Example:

"e231****-****-****-****-****8cadc7dc"

model
enum<string>
required

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-mode prompt and style character 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.
Available options:
V4_5ALL,
V4,
V4_5,
V4_5PLUS,
V5,
V5_5
Example:

"V4_5ALL"

callBackUrl
string<uri>
required

The URL to receive task completion notifications when music extension is complete.

  • For detailed callback format and implementation guide, see Music Extension Callbacks
  • Alternatively, you can use the Get Music Generation Details interface to poll task status
Example:

"https://api.example.com/callback"

prompt
string

Description of how the music should be extended. Required when defaultParamFlag is true.

Example:

"Extend the music with more relaxing notes"

style
string

Music style, e.g., Jazz, Classical, Electronic

Example:

"Classical"

title
string

Music title

Example:

"Peaceful Piano Extended"

continueAt
number

The time point (in seconds) from which to start extending the music.

  • Required when defaultParamFlag is true.
  • Value range: greater than 0 and less than the total duration of the generated audio.
  • Specifies the position in the original track where the extension should begin.
Example:

60

personaId
string

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_persona or omit personaModel to use the default.
  • A voiceId generated by the Suno Voice workflow. When using a voice-generated ID, you must set personaModel: voice_persona.
Example:

"persona_123"

personaModel
enum<string>
default:style_persona

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 when personaId is a voiceId generated by Suno Voice. This option is only available with V5 and V5_5 models.
Available options:
style_persona,
voice_persona
Example:

"style_persona"

negativeTags
string

Music styles to exclude from generation

Example:

"Relaxing Piano"

vocalGender
enum<string>

Preferred vocal gender. Optional. Allowed values: 'm' (male), 'f' (female).

Available options:
m,
f
Example:

"m"

styleWeight
number

Style adherence weight. Optional. Range: 0-1. Two decimal places recommended.

Required range: 0 <= x <= 1Must be a multiple of 0.01
Example:

0.65

weirdnessConstraint
number

Creativity/novelty constraint. Optional. Range: 0-1. Two decimal places recommended.

Required range: 0 <= x <= 1Must be a multiple of 0.01
Example:

0.65

audioWeight
number

Relative weight of audio consistency versus other controls. Optional. Range: 0-1. Two decimal places recommended.

Required range: 0 <= x <= 1Must be a multiple of 0.01
Example:

0.65

Callbacks

POST
{$request.body#/callBackUrl}audioExtend

Body

application/json
code
integer

Status code

Example:

200

msg
string

Response message

Example:

"All generated successfully"

data
object

Response

200

Callback received successfully

Response

Request successful

code
enum<integer>

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
Available options:
200,
400,
401,
404,
405,
413,
429,
430,
455,
500
Example:

200

msg
string

Error message when code != 200

Example:

"success"

data
object