POST
/v2/extendExtend Music API
Extend existing music tracks by adding new content to the end.
POST
https://udioapi.pro/api/v2/extendtips
Two modes: inherit original parameters or use custom parameters.
Use Feed API with returned workId to check progress.
requestHeaders
| name | required | description |
|---|---|---|
Authorization | yes | Bearer token for authentication |
Content-Type | yes | application/json |
requestBody
Request body supports Inherit Mode or Custom Mode
Inherit Mode
Extend using original track parameters
noAdditionalParams
Custom Mode
Extend with custom parameters
| paramName | paramType | required | description | example |
|---|---|---|---|---|
prompt | string | yes | New lyrics or description | Change the music style to be calm and lyrical. |
style | string | no | Music style | lyrical |
title | string | no | Track title | lyrical song |
extensionStartTime | number | no | Start time in seconds for extension | 150 |
tags | string | no | Additional tags | war |
commonParams
| paramName | paramType | required | description | example |
|---|---|---|---|---|
origin_task_id | string | yes | Task ID from original music generation | gen20e094aeaadfe494ea33a5c80ee596083bksv |
extend_audio_index | number | yes | 0 for first audio, 1 for second audio | 0 |
custom_mode | boolean | no | false for inherit mode, true for custom mode | false |
callback_url | string | no | Optional webhook URL for real-time results | https://your-domain.com/webhook |
responses
json
{
"code": 200,
"message": "success",
"workId": "ext2e31202d4f629447fa75f603ae2470565bksv"
}codeExamples
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": false
}'