Remix
Generate a song from a completed Udio job again, a chosen distance from the original.
POST /v2/music/udio/action — action: "remix"
Equivalent to Udio's Remix button: generates one of the parent job's songs
again. remix_strength is the whole idea — it sets how far the result lands from
the original:
remix_strength | Result |
|---|---|
| 0.1–0.3 | Nearly the same song. Use it to clean up a take you already like |
| 0.5 (default) | Recognisably the same song, differently performed |
| 0.8–1.0 | The prompt and lyrics survive; almost nothing else does |
Unlike extend, remix works on any Udio song,
including ones generated with the udio130-* models.
Select the song with index (1 or 2) or with the trackId from the parent's
result.tracks[].id — exactly one of the two.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
parentJobId | string (uuid) | Yes | ID of the completed udio job to act on |
action | string | Yes | "remix" |
index | number | One of index/trackId | Which of the parent's songs to remix: 1 or 2 |
trackId | string | One of index/trackId | Song ID from the parent's result.tracks[].id |
remix_strength | number | No | How far from the original, 0.1–1.0. Defaults to 0.5 |
crop_range | number[] | No | [start, end] in seconds — remix only part of the track. Defaults to the whole song |
prompt | string | No | New description (max 5,000 characters). Defaults to the source song's |
lyrics | string | No | Your own words (max 5,000 characters) |
lyrics_prompt | string | No | What the lyrics should be about — Udio writes them from it (max 2,000 characters) |
lyrics_type | string | No | "generate", "user" or "instrumental" |
negative_tags | string | No | Styles to avoid (max 500 characters) |
model | string | No | Model version. Defaults to the source song's |
voice | object | No | A reference voice |
style_ref | object | No | A reference style |
bpm | number | No | Target tempo, 60–200 |
seed | integer | No | Seed for reproducibility |
prompt_strength | number | No | 0–1 |
lyrics_strength | number | No | 0–1 |
clarity_strength | number | No | 0–1 |
generation_quality | number | No | 0–1 |
webhookUrl | string | No | HTTPS URL that receives a JSON POST when the job reaches a subscribed event — see Webhooks for payload formats |
webhookEvents | string[] | No | Events to be notified about: "progress", "completed", "failed". Defaults to ["completed", "failed"] when webhookUrl is set |
Everything you leave out is inherited from the source song. Combining a high
remix_strength with a new prompt is how you keep a song's structure while
changing its genre.
Credits
A remix re-renders the song, so it costs the same as generating one of that
length: 3 credits for a 32-second song, 6 for 65s, 9 for 97s and
12 for 130s. With crop_range set, only the cropped length is charged.
Example result
Once the job is COMPLETED, the result object on
GET /v2/jobs/:id contains a fresh pair of songs:
{
"tracks": [
{
"id": "5f1c8a37-6d2e-4b90-a4c1-8e7b2f0d6a93",
"audioUrl": "https://cdn2.apiframe.ai/audio/e5f6a7b8-c9d0-1234-ef56-678901234567-0.mp3",
"imageUrl": "https://cdn2.apiframe.ai/audio/e5f6a7b8-c9d0-1234-ef56-678901234567-0.jpeg",
"title": "Midnight Frequencies",
"tags": "lo-fi, hip hop, chill",
"duration": 65.4
},
{
"id": "b0d4e691-7a3f-4c58-9e21-3d5a8c1f7b06",
"audioUrl": "https://cdn2.apiframe.ai/audio/e5f6a7b8-c9d0-1234-ef56-678901234567-1.mp3",
"imageUrl": "https://cdn2.apiframe.ai/audio/e5f6a7b8-c9d0-1234-ef56-678901234567-1.jpeg",
"title": "Midnight Frequencies",
"tags": "lo-fi, hip hop, chill",
"duration": 65.1
}
]
}Each of these songs can be remixed or extended in turn.
Code examples
curl -X POST https://api.apiframe.ai/v2/music/udio/action \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"parentJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"action": "remix",
"index": 1,
"remix_strength": 0.5
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/music/udio/action",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"parentJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"action": "remix",
"index": 1,
"remix_strength": 0.5,
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/music/udio/action", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
parentJobId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
action: "remix",
index: 1,
remix_strength: 0.5,
}),
});
console.log(await response.json());body := `{
"parentJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"action": "remix",
"index": 1,
"remix_strength": 0.5
}`
req, _ := http.NewRequest("POST", "https://api.apiframe.ai/v2/music/udio/action",
strings.NewReader(body))
req.Header.Set("X-API-Key", "afk_your_api_key_here")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)Change the genre but keep the song
curl -X POST https://api.apiframe.ai/v2/music/udio/action \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"parentJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"action": "remix",
"trackId": "8b2f64d1-3c5e-4a7f-9d2b-6e1a0c4f8b3d",
"remix_strength": 0.9,
"prompt": "the same song as a slow acoustic ballad, fingerpicked guitar"
}'Remix only the chorus
curl -X POST https://api.apiframe.ai/v2/music/udio/action \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"parentJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"action": "remix",
"index": 1,
"crop_range": [24, 56],
"remix_strength": 0.3
}'Try it
/v2/music/udio/actionTry it