Music GenerationtaskType: extend_music30 Credits / Task

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.

POST/api/v1/createTask

Usage Guide & Overview

  • Source Audio Continuation: Provide audio_id of the track to extend.
  • Continuation Timestamp: Use continue_at (in seconds) to specify where the extension begins.
  • Lyrics Precedence: If lyrics is supplied, it takes priority over prompt as lyrics for the new section.
  • Instrumental Constraint: When instrumental: true is passed, do not include lyrics, prompt, or vocal_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 Models
V6DEFAULT

Refined, natural vocal expression and richer acoustic details.

V6_MINI

Lightweight and fast, optimized balance between speed and quality.

V6_WILD

Pushes creative boundaries for bolder, more distinctive expression.

Validation Rules & Constraints

Source Audio & Model Match

  • The audio_id must exist and belong to a valid previously generated track.
  • The extension model version must match the source audio's version.
  • continue_at must 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, passing lyrics, prompt, or vocal_gender is 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_constraint accept values from 0.0 to 1.0.

Authentication & Headers

HeaderRequirementDescription
Authorizationrequired

Bearer YOUR_API_KEY

Secret Key generated from dashboard

Content-Typerequired

application/json

Request payload format

Request Body Schema

18 fields
audio_idstringrequired

Unique identifier (UUID) of the specific source audio track from a previous music generation task to extend.

taskTypestringoptional
default:extend_music

Task routing identifier. Explicitly set to "extend_music" (or "extend-music").

modelstringoptional
default:V6

AI generation model. Supported: "V6" (Default, highest vocal clarity & depth), "V6_MINI" (Fast & lightweight), "V6_WILD" (Experimental). Must match source audio model.

continue_atnumberoptional
default:60

Timestamp in seconds from which to begin continuing the track. Must be greater than 0 and less than original audio total duration.

lyricsstringoptional

Custom lyrics for the newly extended section (verses, chorus, outro). Takes priority over "prompt" as lyrics. Max 5,000 characters.

promptstringoptional

Description of the extended musical mood, genre nuances, or lyrics. Used as lyrics only if "lyrics" is omitted. Max 5,000 characters.

stylestringoptional

Musical genre, style tags, or instrumentation keywords for the extension (e.g. "Classical, Piano, Emotional Strings"). Max 1,000 characters.

titlestringoptional

Title for the extended music track. Max 100 characters.

instrumentalbooleanoptional
default:false

Whether the extended section is purely instrumental. If true, passing "lyrics", "prompt", or "vocal_gender" is prohibited.

callBackUrlstringoptional

Public Webhook URL to receive asynchronous completion notifications when extended audio generation finishes.

negative_tagsstringoptional

Genres, instruments, or styles to exclude from the extended section (e.g. "Heavy Metal, Upbeat Drums").

vocal_genderstringoptional

Vocal gender preference: "m" (male) or "f" (female). Probabilistic guide when instrumental is false.

Allowed options:
"m""f"
style_weightnumberoptional
default:0.65

Strength of adherence to specified style tags (range 0.0 to 1.0, up to 2 decimal places).

weirdness_constraintnumberoptional
default:0.65

Controls experimental or creative deviation (range 0.0 to 1.0, up to 2 decimal places).

audio_weightnumberoptional
default:0.65

Relative weight of source audio features vs new text instructions (range 0.0 to 1.0).

varietynumberoptional
default:1

Diversity and stylistic variation: 0 (exact style match), 1 (normal / balanced, default), 2 (high variation), 3 (bold exploration), 4 (max divergence).

persona_idstringoptional

Persona ID or Voice ID to apply consistent vocal character across the extended segment.

persona_modelstringoptional
default:style_persona

Persona model version applied to generation (compatible with V6, V6_MINI, V6_WILD).

Request Sample
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"
  }'
Response Body(200 status)
{
  "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

Response Body(200 status)
{
  "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

FieldTypeDescription
codeintegerCallback status code (200: Success, 400: Invalid params, 408: Timeout, 500: Server error, 501: Extension failed)
msgstringExecution status message or error cause details
data.task_idstringTask ID, matches the taskId returned when submitting the extension task
data.callbackTypestringProgress stage: "text" (lyrics generation), "first" (first track ready), or "complete" (all variations generated)
data.data[]arrayArray of completed audio variations containing extended audio_url, stream_audio_url, duration, and original source references
data.data[].source_audio_urlstringURL of the original source audio from which this extension continued

Receiver Implementation Example

Webhook Receiver
// 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.

Generate Secret Key