Skip to main content
POST
Python
Extend an existing audio file by generating new content after a specific timestamp.

Endpoint

This endpoint allows users to extend an existing audio file or stream by appending new audio content after a specific timestamp. The new content is generated using a prompt and optional lyrics.

Request Parameters

💡 Note: You must provide either audio_file or audio_url — at least one is required.
content-type: multipart/form-data

Sample Output

Listen to the extended audio. Prompt: loud drums sound - audio input : Rose and Bruno Mars - APT extend after: 6 Download Audio

Try it Yourself

Visit the Extend Endpoint Explorer to play around — set your payload, hit send, and listen to the generated results live.

Sample Request

cURL

Python

🔐 Replace {path_to_your_audio_file}, api_key, and webhook_url before executing.

Sample Response

Success (200 OK)


Webhook Response

When the extension process completes, the webhook receives:

Webhook Delivery

Once the generation is complete, webhooks will be triggered to deliver the following:

Standard Requests (non-instrumental):

  • 2 (webhooks) x Extend conversion details (one per version)
  • 2 (webhooks) x Lyrics with timestamp data
  • 1 Album Cover Image
Webhook responses include detailed metadata including task_id, conversion_id, audio files (conversion_path), lyrics etc.

Common Errors

  • 422 Unprocessable Entity: Missing required fields like extend_after, or neither audio_file nor audio_url provided.
  • 500 Internal Server Error: An unexpected error occurred during processing.

The response provides a downloadable or streamable extended audio file.

Authorizations

Authorization
string
header
required

Body

multipart/form-data
audio_url
string
required

Input audio URL (supported format: YouTube URL).

Example:

"https://mybucket.s3.amazonaws.com/song.mp3"

extend_after
number<float>
required

Time in seconds after which to start the extension.

Example:

35

audio_file
file

Uploaded audio file to be extended.

prompt
string

Describes how the extended section should sound.

Example:

"Add a calming piano outro"

lyrics
string

Original lyrics of song

Maximum string length: 2000
Example:

"Let the journey fade away"

lyrics_section_to_extend
string

Lyrics to be used for the extended portion(optional, max 3000 characters).

Maximum string length: 3000
gender
enum<string>

Voice style if vocal content is generated.

Available options:
male,
female,
neutral
Example:

"neutral"

title
string

Title of the generated music track

num_outputs
number<integer>

The number of outputs to generate (1 or 2 only):default is 2.

generate_album_cover
boolean
default:false

Whether to generate an album cover for the generated audio

webhook_url
string

Callback URL for async processing results.

Example:

"https://example.com/webhook"

Response

Successfully initiated extend task

success
boolean
message
string
task_id
string
conversion_id_1
string
conversion_id_2
string
eta
integer

Estimated processing time in seconds

credit_estimate
number<float>