Model endpoint · POST /v2/extend

Extend Song API

Continue a completed generation beyond its original ending. Inherit the source track's settings or steer the continuation with your own prompt, style and title — all through one asynchronous REST endpoint.

Billed at the original track's model price

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

ParameterTypeRequiredNotes
origin_task_idstringrequiredtask_id from your original generation request
extend_audio_indexnumberrequiredWhich returned audio to extend: 0 or 1
custom_modebooleanoptionalfalse inherits the source parameters (default); true enables custom fields
promptstringcustom modeNew lyrics or description, ≤ 5000 characters — longer input is truncated
stylestringoptionalStyle for the continuation, ≤ 1000 characters — truncated
titlestringoptionalTitle for the extended track, ≤ 80 characters — truncated
extensionStartTimenumberoptionalStart point in seconds; clamped to 1 … (source duration − 1)
callback_urlstringoptionalPublic 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.

How it works

From a finished generation to a longer track in four steps.

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

    Submit the extension

    POST /v2/extend with origin_task_id, extend_audio_index and optional custom fields.

  3. 3

    Poll or receive a callback

    GET /v2/feed?workId=... every 5–10 seconds, or set callback_url for a webhook.

  4. 4

    Download the audio

    On SUCCESS the feed contains the extended audio URLs — persist them to your own storage.

Pay the original model price

Extensions are billed per request at the original track's model price — about $0.12 for a chirp-v6-served track and $0.10 for chirp-v6-mini, at 1 USD = 100 credits.

Rejected (422) and failed extensions are refunded automatically. Pay-as-you-go credits never expire.

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.