ApiframeDocs
Follow-up ActionsUdio

Remix

Generate a song from a completed Udio job again, a chosen distance from the original.

POST /v2/music/udio/actionaction: "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_strengthResult
0.1–0.3Nearly 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.0The 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

ParameterTypeRequiredDescription
parentJobIdstring (uuid)YesID of the completed udio job to act on
actionstringYes"remix"
indexnumberOne of index/trackIdWhich of the parent's songs to remix: 1 or 2
trackIdstringOne of index/trackIdSong ID from the parent's result.tracks[].id
remix_strengthnumberNoHow far from the original, 0.1–1.0. Defaults to 0.5
crop_rangenumber[]No[start, end] in seconds — remix only part of the track. Defaults to the whole song
promptstringNoNew description (max 5,000 characters). Defaults to the source song's
lyricsstringNoYour own words (max 5,000 characters)
lyrics_promptstringNoWhat the lyrics should be about — Udio writes them from it (max 2,000 characters)
lyrics_typestringNo"generate", "user" or "instrumental"
negative_tagsstringNoStyles to avoid (max 500 characters)
modelstringNoModel version. Defaults to the source song's
voiceobjectNoA reference voice
style_refobjectNoA reference style
bpmnumberNoTarget tempo, 60–200
seedintegerNoSeed for reproducibility
prompt_strengthnumberNo0–1
lyrics_strengthnumberNo0–1
clarity_strengthnumberNo0–1
generation_qualitynumberNo0–1
webhookUrlstringNoHTTPS URL that receives a JSON POST when the job reaches a subscribed event — see Webhooks for payload formats
webhookEventsstring[]NoEvents 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

POST/v2/music/udio/actionTry it

On this page