Extend Music
Extend an existing Suno-generated song by continuing it from a specific timestamp. Add additional verses, choruses, bridges, or outros to lengthen the track while maintaining musical coherence, tempo, and style consistency.
Usage Guide & Overview
- Source Audio Continuation: Provide
audio_idof the track to extend. - Continuation Timestamp: Use
continue_at(in seconds) to specify where the extension begins. - Lyrics Precedence: If
lyricsis supplied, it takes priority overpromptas lyrics for the new section. - Instrumental Constraint: When
instrumental: trueis passed, do not includelyrics,prompt, orvocal_gender. - File Retention: Generated extended audio files are retained on CDN for 14 days. Save them to permanent storage promptly.
Supported AI Models
3 Active ModelsRefined, natural vocal expression and richer acoustic details.
Lightweight and fast, optimized balance between speed and quality.
Pushes creative boundaries for bolder, more distinctive expression.
Validation Rules & Constraints
Source Audio & Model Match
- The
audio_idmust exist and belong to a valid previously generated track. - The extension
modelversion must match the source audio's version. continue_atmust be within (0, source_audio_duration). Defaults to 60s if omitted.
Character Limits & Parameter Conflict
- Lyrics / Prompt: Maximum 5,000 characters for V6, V6_MINI, and V6_WILD.
- Style: Maximum 1,000 characters. Should generally align with original audio for coherence.
- Title: Maximum 100 characters.
- Instrumental Tracks: If
instrumental: true, passinglyrics,prompt, orvocal_genderis strictly prohibited.
Variety & Creative Tuning
variety: 0- Off (strictly preserves the exact current style).variety: 1- Normal (default, balanced musical continuity and nuance).variety: 2 ~ 4- Higher variation and creative exploration for distinct sections.audio_weight,style_weight,weirdness_constraintaccept values from 0.0 to 1.0.
Authentication & Headers
| Header | Requirement | Description |
|---|---|---|
| Authorization | required | Bearer YOUR_API_KEY Secret Key generated from dashboard |
| Content-Type | required | application/json Request payload format |
Request Body Schema
18 fieldsaudio_idstringrequiredUnique identifier (UUID) of the specific source audio track from a previous music generation task to extend.
taskTypestringoptionalTask routing identifier. Explicitly set to "extend_music" (or "extend-music").
modelstringoptionalAI generation model. Supported: "V6" (Default, highest vocal clarity & depth), "V6_MINI" (Fast & lightweight), "V6_WILD" (Experimental). Must match source audio model.
continue_atnumberoptionalTimestamp in seconds from which to begin continuing the track. Must be greater than 0 and less than original audio total duration.
lyricsstringoptionalCustom lyrics for the newly extended section (verses, chorus, outro). Takes priority over "prompt" as lyrics. Max 5,000 characters.
promptstringoptionalDescription of the extended musical mood, genre nuances, or lyrics. Used as lyrics only if "lyrics" is omitted. Max 5,000 characters.
stylestringoptionalMusical genre, style tags, or instrumentation keywords for the extension (e.g. "Classical, Piano, Emotional Strings"). Max 1,000 characters.
titlestringoptionalTitle for the extended music track. Max 100 characters.
instrumentalbooleanoptionalWhether the extended section is purely instrumental. If true, passing "lyrics", "prompt", or "vocal_gender" is prohibited.
callBackUrlstringoptionalPublic Webhook URL to receive asynchronous completion notifications when extended audio generation finishes.
negative_tagsstringoptionalGenres, instruments, or styles to exclude from the extended section (e.g. "Heavy Metal, Upbeat Drums").
vocal_genderstringoptionalVocal gender preference: "m" (male) or "f" (female). Probabilistic guide when instrumental is false.
"m""f"style_weightnumberoptionalStrength of adherence to specified style tags (range 0.0 to 1.0, up to 2 decimal places).
weirdness_constraintnumberoptionalControls experimental or creative deviation (range 0.0 to 1.0, up to 2 decimal places).
audio_weightnumberoptionalRelative weight of source audio features vs new text instructions (range 0.0 to 1.0).
varietynumberoptionalDiversity and stylistic variation: 0 (exact style match), 1 (normal / balanced, default), 2 (high variation), 3 (bold exploration), 4 (max divergence).
persona_idstringoptionalPersona ID or Voice ID to apply consistent vocal character across the extended segment.
persona_modelstringoptionalPersona model version applied to generation (compatible with V6, V6_MINI, V6_WILD).
curl -X POST "https://api.sunoapi.top/api/v1/createTask" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"taskType": "extend_music",
"audio_id": "8ca376e7-1234-4567-89ab-08aaf2c6dd27",
"model": "V6",
"continue_at": 60,
"lyrics": "[Verse 2]\nWalking through the gentle rain,\nfinding peace along the way\n[Chorus]\nLet the melody guide our souls",
"style": "Classical, Acoustic Piano, Calming",
"title": "Peaceful Piano Extended",
"callBackUrl": "https://api.yourdomain.com/webhook/suno"
}'{
"code": 200,
"msg": "success",
"data": {
"taskId": "5c79be8e9f72"
}
}When Callbacks Are Sent
The SongMesh API automatically triggers an HTTP POST request to your designated callBackUrl under these events:
- Text/Lyrics generation completed (callbackType: "text")
- First audio track variation completed (callbackType: "first")
- All extended audio tracks generation completed (callbackType: "complete")
- Extension task failed or timed out (code: 400, 408, 500, 501)
Webhook Payload Format
{
"code": 200,
"msg": "All generated successfully.",
"data": {
"callbackType": "complete",
"task_id": "5c79be8e9f72",
"data": [
{
"id": "e2318cad-c7dc-4321-8899-aabbccddeeff",
"audio_url": "https://cdn.example.com/audio/extended_track_1.mp3",
"stream_audio_url": "https://cdn.example.com/audio/extended_stream_1.m3u8",
"image_url": "https://cdn.example.com/cover/extended_cover_1.jpeg",
"prompt": "[Verse 2] Walking through the gentle rain...",
"model_name": "chirp-v4-5",
"title": "Peaceful Piano Extended",
"createTime": 1786343609818,
"duration": 198.44,
"tags": "classical, acoustic piano, calming",
"source_audio_url": "https://cdn.example.com/audio/source_orig.mp3",
"source_image_url": "https://cdn.example.com/cover/source_orig.jpeg",
"source_stream_audio_url": "https://cdn.example.com/audio/source_orig_stream"
},
{
"id": "f3429dbe-d8ed-5432-9900-bbccddeeff00",
"audio_url": "https://cdn.example.com/audio/extended_track_2.mp3",
"stream_audio_url": "https://cdn.example.com/audio/extended_stream_2.m3u8",
"image_url": "https://cdn.example.com/cover/extended_cover_2.jpeg",
"prompt": "[Verse 2] Walking through the gentle rain...",
"model_name": "chirp-v4-5",
"title": "Peaceful Piano Extended",
"createTime": 1786343609818,
"duration": 204.12,
"tags": "classical, acoustic piano, calming",
"source_audio_url": "https://cdn.example.com/audio/source_orig.mp3",
"source_image_url": "https://cdn.example.com/cover/source_orig.jpeg",
"source_stream_audio_url": "https://cdn.example.com/audio/source_orig_stream"
}
]
}
}Callback Payload Fields
| Field | Type | Description |
|---|---|---|
code | integer | Callback status code (200: Success, 400: Invalid params, 408: Timeout, 500: Server error, 501: Extension failed) |
msg | string | Execution status message or error cause details |
data.task_id | string | Task ID, matches the taskId returned when submitting the extension task |
data.callbackType | string | Progress stage: "text" (lyrics generation), "first" (first track ready), or "complete" (all variations generated) |
data.data[] | array | Array of completed audio variations containing extended audio_url, stream_audio_url, duration, and original source references |
data.data[].source_audio_url | string | URL of the original source audio from which this extension continued |
Receiver Implementation Example
// Next.js App Router Webhook Receiver (/api/webhook/suno/route.ts)
import { NextRequest, NextResponse } from 'next/server';
export async function POST(req: NextRequest) {
const payload = await req.json();
const { code, msg, data } = payload;
if (code === 200 && data) {
const { callbackType, task_id, data: tracks } = data;
console.log(`Received ${callbackType} callback for extension task ${task_id}`);
if (callbackType === 'complete' && Array.isArray(tracks)) {
tracks.forEach((track) => {
console.log(`Extended Audio URL: ${track.audio_url}`);
console.log(`Duration: ${track.duration}s, Source: ${track.source_audio_url}`);
// Save extended audio track to your database...
});
}
} else {
console.error(`Extension task failed (${code}): ${msg}`);
}
return NextResponse.json({ received: true });
}Webhook Security Recommendation
Always verify incoming webhook payloads on your server. Respond with a 200 OK immediately after parsing the payload to prevent redundant delivery retries from the webhook dispatcher.
Ready to integrate Extend Music?
Create your free account, obtain your Secret Key, and get 100 free generation credits.