docs / endpoints / extend
POST/v1/extend
Lengthen an existing track: generation continues from continue_at seconds into the source audio, so you get a longer song without regenerating what you already have. Works like /v1/generate — returns 202 Accepted with a generation object of type: "extend", then completes asynchronously.
$Billing: 11 credits per extension — two variations included. Free with a sandbox key.
## Request body
audio_urlrequiredstringPublic URL of the track to extend — e.g. a clip
audio_url from a previous generation.continue_atrequirednumberTimestamp in seconds to continue from. Must be greater than 0.
promptstringDirection for the extension, up to 5,000 characters.
stylestringMusical style tags, up to 1,000 characters.
titlestringTrack title, up to 100 characters.
negative_tagsstringStyles to avoid, up to 500 characters.
instrumentalbooleanExtend without vocals. Default:
false.vocal_gender"m" | "f"Preferred vocal gender.
## Example request
curl https://api.songapi.dev/v1/extend \ -H "Authorization: Bearer $SONGAPI_KEY" \ -H "Content-Type: application/json" \ -d '{ "audio_url": "https://cdn.songapi.dev/gen_h2vJk8…/clip_1.mp3", "continue_at": 167, "prompt": "bring in a bridge, then a bigger final chorus" }'
Poll GET /v1/generations/:id or use a webhook, exactly as with generate.