{
"taskId": "2fac****9f72",
"audioId": "e231****-****-****-****-****8cadc7dc",
"prompt": "A calm and relaxing piano track.",
"lyrics": "[Chorus]\nModified lyrics for this section",
"tags": "Jazz",
"title": "Relaxing Piano",
"negativeTags": "Rock",
"infillStartS": 10.5,
"infillEndS": 20.75,
"fullLyrics": "[Verse 1]\nOriginal lyrics here\n[Chorus]\nModified lyrics for this section\n[Verse 2]\nMore original lyrics",
"vocalGender": "m",
"styleWeight": 0.61,
"weirdnessConstraint": 0.72,
"audioWeight": 0.65,
"variety": 1,
"callBackUrl": "https://example.com/callback"
}
{
"uploadUrl": "https://example.com/audio.mp3",
"model": "V6",
"prompt": "A calm and relaxing piano track.",
"lyrics": "[Chorus]\nModified lyrics for this section",
"tags": "Jazz",
"title": "Relaxing Piano",
"negativeTags": "Rock",
"infillStartS": 10.5,
"infillEndS": 20.75,
"fullLyrics": "[Verse 1]\nOriginal lyrics here\n[Chorus]\nModified lyrics for this section\n[Verse 2]\nMore original lyrics",
"vocalGender": "m",
"styleWeight": 0.61,
"weirdnessConstraint": 0.72,
"audioWeight": 0.65,
"variety": 1,
"callBackUrl": "https://example.com/callback"
}
{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79****be8e"
}
}Replace Music Section
Replace a specific time segment within existing music.
{
"taskId": "2fac****9f72",
"audioId": "e231****-****-****-****-****8cadc7dc",
"prompt": "A calm and relaxing piano track.",
"lyrics": "[Chorus]\nModified lyrics for this section",
"tags": "Jazz",
"title": "Relaxing Piano",
"negativeTags": "Rock",
"infillStartS": 10.5,
"infillEndS": 20.75,
"fullLyrics": "[Verse 1]\nOriginal lyrics here\n[Chorus]\nModified lyrics for this section\n[Verse 2]\nMore original lyrics",
"vocalGender": "m",
"styleWeight": 0.61,
"weirdnessConstraint": 0.72,
"audioWeight": 0.65,
"variety": 1,
"callBackUrl": "https://example.com/callback"
}
{
"uploadUrl": "https://example.com/audio.mp3",
"model": "V6",
"prompt": "A calm and relaxing piano track.",
"lyrics": "[Chorus]\nModified lyrics for this section",
"tags": "Jazz",
"title": "Relaxing Piano",
"negativeTags": "Rock",
"infillStartS": 10.5,
"infillEndS": 20.75,
"fullLyrics": "[Verse 1]\nOriginal lyrics here\n[Chorus]\nModified lyrics for this section\n[Verse 2]\nMore original lyrics",
"vocalGender": "m",
"styleWeight": 0.61,
"weirdnessConstraint": 0.72,
"audioWeight": 0.65,
"variety": 1,
"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.
Parameter Usage Guide
This endpoint always uses custom parameters. Simple mode is not available. This endpoint supports two modes for specifying the source audio: Mode 1: Replace section using existing audiotaskIdandaudioIdare requireduploadUrlandmodelmust NOT be provided
uploadUrlandmodelare requiredtaskIdandaudioIdmust NOT be provided
Common Required Parameters
- prompt (string, required): Replaced lyrics
- tags (string, required): Music style tags, such as jazz, electronic, etc.
- title (string, required): Music title
- infillStartS (number, required): Start time point for replacement (seconds), 2 decimal places. Must be less than infillEndS. The time interval (infillEndS - infillStartS) must be at least 10 seconds.
- infillEndS (number, required): End time point for replacement (seconds), 2 decimal places. Must be greater than infillStartS. The time interval (infillEndS - infillStartS) must be at least 10 seconds.
- fullLyrics (string, required): Complete lyrics after modification, combining both modified and unmodified lyrics
Lyrics Fields
Three fields carry lyrics, each with a different scope:- fullLyrics (required): the complete lyrics of the whole song after the replacement, combining modified and unmodified parts. The upstream service uses it to re-align the prompt for the infill segment.
- lyrics (optional): lyrics for the replaced segment only.
- prompt (required): the replaced lyrics, kept for backward compatibility.
Optional Parameters
- lyrics (string): Lyrics for the replaced section. For V6, V6_WILD, and V6_MINI: maximum 5000 characters.
- negativeTags (string): Excluded music styles, used to avoid specific style elements in the replacement segment
- 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)
- variety (integer): Diversity of generated results. Integer from 0–4, default 1.
0off,1normal (default),2high,3extra,4max. - personaId (string): Persona ID or Suno Voice
voiceIdto apply to the generated music. If you use a Voice-generated ID, setpersonaModeltovoice_persona. - personaModel (string): Persona type, default
style_persona. Usestyle_personafor Generate Persona IDs, orvoice_personafor Suno Voice IDs. - callBackUrl (string): Callback URL for task completion notification. For detailed callback format, see Replace Music Section Callbacks.
Time Range Instructions
infillStartSmust be less thaninfillEndS- Time values are precise to 2 decimal places, e.g.,
10.50seconds - The replacement time must be at least 10 seconds.
- Replacement duration should not exceed 50% of the original music’s total duration
{
"taskId": "2fac****9f72",
"audioId": "e231****-****-****-****-****8cadc7dc",
"prompt": "A calm and relaxing piano track.",
"lyrics": "[Chorus]\nModified lyrics for this section",
"tags": "Jazz",
"title": "Relaxing Piano",
"negativeTags": "Rock",
"infillStartS": 10.5,
"infillEndS": 20.75,
"fullLyrics": "[Verse 1]\nOriginal lyrics here\n[Chorus]\nModified lyrics for this section\n[Verse 2]\nMore original lyrics",
"vocalGender": "m",
"styleWeight": 0.61,
"weirdnessConstraint": 0.72,
"audioWeight": 0.65,
"variety": 1,
"callBackUrl": "https://example.com/callback"
}
{
"uploadUrl": "https://example.com/audio.mp3",
"model": "V6",
"prompt": "A calm and relaxing piano track.",
"lyrics": "[Chorus]\nModified lyrics for this section",
"tags": "Jazz",
"title": "Relaxing Piano",
"negativeTags": "Rock",
"infillStartS": 10.5,
"infillEndS": 20.75,
"fullLyrics": "[Verse 1]\nOriginal lyrics here\n[Chorus]\nModified lyrics for this section\n[Verse 2]\nMore original lyrics",
"vocalGender": "m",
"styleWeight": 0.61,
"weirdnessConstraint": 0.72,
"audioWeight": 0.65,
"variety": 1,
"callBackUrl": "https://example.com/callback"
}
Developer Notes
- Replacement segments will be regenerated based on the provided
promptandtags - Generated replacement segments will automatically blend with the original music’s preceding and following parts
- Generated files will be retained for 14 days
- Query task status using the same interface as generating music: Get Music Details
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
- Replace section using existing audio
- Replace section using uploaded custom audio
Original task ID (parent task), used to identify the source music for section replacement.
"2fac****9f72"
Unique identifier of the audio track to replace. This ID is returned in the callback data after music generation completes.
"e231****-****-****-****-****8cadc7dc"
Replaced lyrics
"A calm and relaxing piano track."
Music style tags, such as jazz, electronic, etc.
"Jazz"
Music title
"Relaxing Piano"
Start time point for replacement (seconds), 2 decimal places. Must be less than infillEndS. The time interval (infillEndS - infillStartS) must be at least 10 seconds.
x >= 010.5
End time point for replacement (seconds), 2 decimal places. Must be greater than infillStartS. The time interval (infillEndS - infillStartS) must be at least 10 seconds.
x >= 020.75
Complete lyrics after modification, combining both modified and unmodified lyrics. This parameter contains the full lyrics text that will be used for the entire song after the section replacement.
"[Verse 1]\nOriginal lyrics here\n[Chorus]\nModified lyrics for this section\n[Verse 2]\nMore original lyrics"
Excluded music styles, used to avoid specific style elements in the replacement segment
"Rock"
Lyrics for the replaced section. Optional. fullLyrics carries the complete lyrics of the whole song, while lyrics covers only the segment being replaced.
- V6, V6_WILD & V6_MINI: Maximum 5000 characters
"[Chorus] Brighter lights, we keep going on"
Callback URL for task completion. The system will send a POST request to this URL when replacement is complete, containing task status and results.
- Your callback endpoint should be able to accept POST requests containing JSON payloads with replacement results
- For detailed callback format and implementation guide, see Replace Music Section Callbacks
- Alternatively, you can use the get music details interface to poll task status
"https://example.com/callback"
Preferred vocal gender. Optional. 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.61
Creativity/novelty constraint. Optional. Range: 0-1. Two decimal places recommended.
0 <= x <= 1Must be a multiple of 0.010.72
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
Diversity of generated results. Optional. Integer from 0 to 4. Default: 1.
0: off — variety off, strictly the same style1: normal — default, balances stability and diversity2: high — results with clearly different styles3: extra — higher variation, bolder exploration4: max — maximum variation
0 <= x <= 4Must be a multiple of 11
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: Required whenpersonaIdis avoiceIdgenerated by Suno Voice. This option is only available with V5 (Deprecated), V5_5 (Deprecated), V6, V6_WILD, and V6_MINI models.
style_persona, voice_persona "style_persona"
Callbacks
POST{request.body#/callBackUrl}audioGenerated
Body
Response
Callback received successfully
Response status code
- 200: Success - Request processed successfully
- 400: Validation error - Lyrics contain copyrighted content.
- 408: Rate limit exceeded - Timeout.
- 413: Conflict - Uploaded audio matches existing artwork.
- 500: Server error - Unexpected error occurred while processing request
- 501: Audio generation failed.
- 531: Server error - Sorry, generation failed due to issues. Your credits have been refunded. Please try again.
200, 400, 408, 413, 500, 501, 531 Error message when code != 200
"success"
Response
Request successful
Response status code
- 200: Success - Request processed successfully
- 401: Unauthorized - Authentication credentials missing or invalid
- 402: Insufficient credits - Account does not have enough credits to perform this operation
- 404: Not found - Requested resource or endpoint does not exist
- 409: Conflict - WAV record already exists
- 422: Validation error - Request parameters failed validation checks
- 429: Rate limit exceeded - Exceeded request limit for this resource
- 451: Unauthorized - Failed to retrieve image. Please verify any access restrictions set by you or your service provider.
- 455: Service unavailable - System is currently undergoing maintenance
- 500: Server error - Unexpected error occurred while processing request
200, 401, 402, 404, 409, 422, 429, 451, 455, 500 Error message when code != 200
"success"
Show child attributes
Show child attributes
