SEP 5, 2026
Table of contents
Rewriting one section of a finished song
Mureka API v1 can now rewrite one section of a song you have already generated. Pick a range in milliseconds, give it new words, and the rest of the track comes back untouched: POST /music/edit.
Until now the only way to change a finished song was POST /music/regenerate, which rewrites everything from a start point to the end. Editing is surgical, and it can hold the melody while the words underneath it change.
The demo
A 1920s vaudeville patter song about a man with an extensive list of places he is no longer welcome. Generated once with V9.5, then edited once. The chorus at 0:32 is the original. The chorus at 1:19 is the one we rewrote — same tune, same voice, an entirely different alphabet.
Original — the B’s
curl — POST /music/create-advanced
curl --location 'https://api.useapi.net/v1/mureka/music/create-advanced' \
--header 'Authorization: Bearer user:1234-…' \
--form 'model="V9.5"' \
--form 'title="Barred"' \
--form 'vocal_gender="male"' \
--form 'desc="1920s hot jazz, vaudeville patter song, banjo, muted trumpet, stride piano, upright bass, brushed snare, brisk and comic, crisp theatrical diction, upbeat"' \
--form 'lyrics="[Verse]
I have been asked to leave a number of establishments
Usually politely, occasionally not
I keep a little notebook of my accomplishments
And frankly it'\''s a rather impressive lot
[Chorus]
I'\''m barred from the bakery, barred from the bank
Barred from the ballroom, and I'\''ve only got myself to thank
Barred from the bandstand, barred from the bar
And that'\''s just the ones beginning with B so far
[Verse]
The magistrate has memorised my overcoat
The barman keeps my photograph behind the till
[Chorus]
I'\''m barred from the bakery, barred from the bank
Barred from the ballroom, and I'\''ve only got myself to thank
Barred from the bandstand, barred from the bar
And that'\''s just the ones beginning with B so far
[Outro]
There are twenty-six letters and I'\''m working through them all
Do let me know if you hear of anywhere still open"'
Edited — the C’s, from 1:19
curl — POST /music/edit
curl --location 'https://api.useapi.net/v1/mureka/music/edit' \
--header 'Authorization: Bearer user:1234-…' \
--form 'song_id="user:1234-mureka:12345678901234-song:159302587383810"' \
--form 'start_milliseconds="79000"' \
--form 'end_milliseconds="95160"' \
--form 'keep_melody="true"' \
--form 'lyrics="I'\''m barred from the chemist, barred from the choir
Barred from the cinema for setting it on fire
Barred from the casino, barred from the cafe
And that'\''s just the C'\''s, I'\''ll get to the D'\''s on Thursday"'
The first chorus still lists the B’s. Only the range we asked for moved, and it moved without disturbing the melody, the arrangement or the timing — the track is 174,710 ms before and 174,766 ms after.
Finding the range
The bounds come from GET /music/song_id, where every sung line carries its own start and end:
{
"user_input_tag": "[Chorus]",
"start": 79000,
"end": 95160,
"rows": [
{ "start": 79000, "end": 82760, "text": "I'm barred from the bakery, barred from the bank" },
{ "start": 83760, "end": 87400, "text": "Barred from the ballroom, and I've only got myself to thank" },
{ "start": 88320, "end": 92600, "text": "Barred from the bandstand, barred from the bar" },
{ "start": 92600, "end": 95160, "text": "And that's just the ones beginning with B so far" }
]
}
Take the section’s start and end and that is your range. Mureka treats it as a hint and may widen it to a musical boundary — here it went 56 ms past, in other runs a few seconds — so read regenerate_from and regenerate_to on the returned song to see what it actually re-sang.
You can also leave lyrics out entirely. The API then reuses the lines the song already sings inside the range, which re-rolls the performance of a section without changing a word.
Keeping the melody, or not
keep_melody defaults to true, which is what makes the demo above a like-for-like swap. Set it to false and Mureka writes a new tune for the section instead:
curl — POST /music/edit with keep_melody: false
curl --location 'https://api.useapi.net/v1/mureka/music/edit' \
--header 'Authorization: Bearer user:1234-…' \
--form 'song_id="user:1234-mureka:12345678901234-song:159302587383810"' \
--form 'start_milliseconds="79000"' \
--form 'end_milliseconds="95160"' \
--form 'keep_melody="false"' \
--form 'lyrics="I'\''m barred from the chemist, barred from the choir
Barred from the cinema for setting it on fire
Barred from the casino, barred from the cafe
And that'\''s just the C'\''s, I'\''ll get to the D'\''s on Thursday"'
Worth knowing before you reach for it: a new melody has its own timing. The same four lines came back six seconds shorter, everything after them shifted earlier, and the track went from 2:55 to 2:49. With keep_melody: true the duration barely moves. If anything downstream depends on the length, re-read duration_milliseconds rather than assuming it survived.
What it costs
An edit costs 20 credits and returns one song.
Credits come off when Mureka accepts the request, not when the song finishes.
Editing needs an active paid Mureka plan. Without one the call returns 403 low vip level (6335), the same gate POST /music/regenerate sits behind.
Full parameters, responses and a live Try It console: POST /music/edit.