Extend a song without rebuilding it
The Extend Song API continues a track you already generated. Point it at the finished generation with origin_task_id, choose which of the two returned audios to continue with extend_audio_index, and the platform composes a new segment that picks up where the source ends.
Two modes cover the common workflows. Inherit Mode (custom_mode: false) reuses the original parameters — the fastest way to lengthen a take you already like. Custom Mode (custom_mode: true) accepts a new prompt, style, title and extensionStartTime so you can redirect the arrangement — for example turning a high-energy chorus into a calm outro.
Quickstart: extend and poll
POST /v2/extend with the source task, then poll /v2/feed?workId=... or set callback_url for a webhook.
curl -X POST "https://udioapi.pro/api/v2/extend" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"origin_task_id": "gen20e094aeaadfe494ea33a5c80ee596083bksv",
"extend_audio_index": 0,
"custom_mode": true,
"prompt": "Change the music style to be calm and lyrical.",
"style": "lyrical"
}'
curl -X GET "https://udioapi.pro/api/v2/feed?workId=YOUR_WORK_ID"extensionStartTime is optional; values are clamped to 1 … (source duration − 1) seconds, defaulting to the end of the source track.
Extend request parameters
Extensions are billed at the original track's model price. Tracks created with chirp-v5 or chirp-v5-5 are extended with chirp-v6; tracks from older legacy models are extended with chirp-v6-mini.
| Parameter | Type | Required | Notes |
|---|---|---|---|
| origin_task_id | string | required | task_id from your original generation request |
| extend_audio_index | number | required | Which returned audio to extend: 0 or 1 |
| custom_mode | boolean | optional | false inherits the source parameters (default); true enables custom fields |
| prompt | string | custom mode | New lyrics or description, ≤ 5000 characters — longer input is truncated |
| style | string | optional | Style for the continuation, ≤ 1000 characters — truncated |
| title | string | optional | Title for the extended track, ≤ 80 characters — truncated |
| extensionStartTime | number | optional | Start point in seconds; clamped to 1 … (source duration − 1) |
| callback_url | string | optional | Public HTTPS webhook for the final result |
A rejected or failed extension is refunded automatically — 422 responses explain the parameter to fix, and post-acceptance failures appear as FAILED in the feed with refunded credits.
What you can build
Extensions compose with the rest of the audio API.
Longer arrangements
Chain extensions to build intros, verses and outros past the original duration.
Read the docsRedirect the ending
Custom Mode lets a new prompt and style steer where the continuation goes.
Read the docsGenerate the source first
Use /v2/generate to create the track you want to extend — the chirp-v6 family works on both endpoints.
Read the docsCover your own audio
Prefer starting from an upload? The upload-cover endpoint handles that flow.
Read the docsTimestamped lyrics
Fetch line-level lyric timings for the extended result.
Read the docsCallbacks and polling
Pick up completion via /v2/feed polling or a callback_url webhook.
Read the docsHow it works
From a finished generation to a longer track in four steps.
- 1
Generate a source track
Create a song with /v2/generate and wait for SUCCESS. Save the task_id and pick an audio index.
- 2
Submit the extension
POST /v2/extend with origin_task_id, extend_audio_index and optional custom fields.
- 3
Poll or receive a callback
GET /v2/feed?workId=... every 5–10 seconds, or set callback_url for a webhook.
- 4
Download the audio
On SUCCESS the feed contains the extended audio URLs — persist them to your own storage.
Limits and notes
- You need a completed source task and must pick extend_audio_index 0 or 1 — most generations return two audios.
- Extensions inherit the source model's price; chirp-v5/chirp-v5-5 tracks are extended by chirp-v6, older legacy tracks by chirp-v6-mini.
- Over-long prompt, style and title values are truncated, not rejected.
- extensionStartTime is clamped into the valid range rather than failing the request.
- Audio URLs are temporary — download results to your own storage.
udioapi.pro is an independent third-party service. It is not affiliated with, endorsed by, or operated by Suno, Udio, or MiniMax.
Extend Song API FAQ
Answers about modes, billing and the asynchronous workflow.
What does the Extend Song API do?
It continues a completed generation past its ending. Inherit Mode reuses the source parameters; Custom Mode accepts a new prompt, style, title and extensionStartTime.
How is an extension billed?
At the original track's model price per request. A chirp-v6-served track costs the same 12 credits to extend; chirp-v6-mini costs 10. Rejected and failed extensions are refunded automatically.
Which audio do I extend?
Set extend_audio_index to 0 for the first returned audio or 1 for the second — most generation requests produce two variations.
Inherit Mode or Custom Mode?
Inherit Mode (custom_mode: false) continues with the original parameters. Custom Mode (custom_mode: true) lets a new prompt, style and title steer the continuation.
What if my extensionStartTime is out of range?
The value is clamped to 1 … (source duration − 1) seconds instead of failing; a missing or invalid value extends from the end of the source track.
Do failed extensions cost credits?
No. Requests rejected during validation return 422, and tasks that fail after acceptance appear as FAILED in the feed — credits are refunded in both cases.