Edit a song
June 3, 2026 (November 16, 2026)
Table of contents
Edit an existing clip. The operation field picks the kind of edit. Every edit takes a clip, the encoded clip asset ID from an earlier song or from GET /music.
operation is required. It is one of these:
operation | What it does | Required params | Optional params |
|---|---|---|---|
effect | Apply one audio effect | effect and that effect’s own settings | none |
extend | Add new music to the end, or from a point | instruction | extend_s, extend_from_s |
replace | Regenerate a time section | instruction, mask_start_s, mask_end_s | none |
cover | Restyle the whole song (a Lyria cover) | none | instruction, strength, model |
remix | Re-sing with edited lyrics | lyrics | prompt |
stems | Split into stem clips: drums, bass, vocals and other | none | none |
https://api.useapi.net/v1/flowmusic/music/edit
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Or send the same fields as multipart/form-data:
# Content-Type: multipart/form-data
API tokenis required. Setup useapi.net shows where to get it.
Request Body
There is no email. The clip already belongs to one account, and the edit runs there. Each operation reads the common fields and its own fields, listed below by operation.
operationis required. The edit: effect, extend, replace, cover (restyle), remix (new lyrics) or stems (four stem clips).
Supported values:effect,extend,replace,cover,remix,stems.clipis required. The encoded clip id to edit. The edit runs on the account that made the clip.effectis required with operationeffect. With operation effect: the effect. Each effect reads only its own fields.
Supported values:Trim,Fade,Gain,Reverb,Pan,Equalizer.gain_dbis required with operationeffectand effectGain. Gain: the volume change in dB.
Range:-30to30.mixis required with operationeffectand effectReverb. Reverb: the wet / dry mix.
Range:0to1.room_sizeis required with operationeffectand effectReverb. Reverb: the room size.
Range:0to1.panis required with operationeffectand effectPan. Pan: -1 full left to 1 full right.
Range:-1to1.bass_dbis required with operationeffectand effectEqualizer. Equalizer: the low band in dB.
Range:-12to12.mid_dbis required with operationeffectand effectEqualizer. Equalizer: the mid band in dB.
Range:-12to12.treble_dbis required with operationeffectand effectEqualizer. Equalizer: the high band in dB.
Range:-12to12.fade_in_sis optional. Fade: the fade-in in seconds.
Minimum:0.fade_out_sis optional. Fade: the fade-out in seconds.
Minimum:0.start_sis required with operationeffectand effectTrim. Trim: the second to keep from.
Minimum:0.end_sis required with operationeffectand effectTrim. Trim: the second to keep until, afterstart_sand within the clip.
Minimum:0.instructionis required with operationextendorreplace. What to make. Withcover, a style direction you can leave out.
Maximum length:2000characters.titleis optional. A title for the result clip.
Maximum length:200characters.seedis optional. Pins the result for reproducibility.
Minimum:0.extend_from_sis optional. extend: the second to extend from. Left out, the end of the clip.
Minimum:0.extend_sis optional. extend: the seconds to add.
Default:150.
Range:1to300.mask_start_sis required with operationreplace. The start of the section to replace, in seconds.
Minimum:0.mask_end_sis required with operationreplace. The end of the section to replace, in seconds, aftermask_start_sand within the clip.
Minimum:0.strengthis optional. cover: how strongly to restyle.
Default:1.
Range:0to1.lyricsis required with operationremix. The edited lyrics, with section tags such as [Verse] and [Chorus].
Maximum length:10000characters.promptis optional. remix: the sound prompt. Left out, the source clip’s own sound prompt.
Maximum length:10000characters.modelis optional. The model that re-renders cover, extend, replace and remix. The effect and stems operations accept it, and it does not change their output.
Supported values:lyria-3.5,lyria-3-pro(default).modeis optional. sync waits for the result. async answers 201 with the jobid at once. stems is always sync.
Supported values:sync(default),async.replyUrlis optional. An http or https URL, up to 2048 characters, that receives one POST of the job record when the edit completes or fails. Not used by stems.replyRefis optional. Your own reference, echoed back in the webhook.
Maximum length:1024characters.
model matters only for the edits that render new audio: cover, extend, replace and remix. effect and stems take it, but their output does not change, because no music model runs for them. Leave model out to keep the result the same as before the field existed.
The tabs below show an example body for each operation.
-
{ "operation": "cover", "clip": "user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c", "instruction": "lo-fi chillhop reinterpretation", "strength": 0.7 } -
{ "operation": "effect", "clip": "user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c", "effect": "Reverb", "mix": 0.4, "room_size": 0.7 } -
{ "operation": "extend", "clip": "user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c", "instruction": "add an instrumental outro", "extend_s": 30 } -
{ "operation": "replace", "clip": "user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c", "instruction": "softer piano in this section", "mask_start_s": 0, "mask_end_s": 8 } -
{ "operation": "remix", "clip": "user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c", "lyrics": "[Verse 1]\nNeon rain on the avenue\n[Chorus]\nWe rise again", "prompt": "dreamy synthwave, 100 bpm" } -
{ "operation": "stems", "clip": "user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c" }
operation: effect
effect is one of Trim, Fade, Gain, Reverb, Pan, Equalizer. Each effect reads only its own fields. A field of another effect is ignored.
- With
effect: Gain, sendgain_db. - With
effect: Reverb, sendmixandroom_size. - With
effect: Pan, sendpan, from full left to full right. - With
effect: Equalizer, sendbass_db,mid_dbandtreble_db. - With
effect: Fade, sendfade_in_sandfade_out_s. At least one of them must be above zero. - With
effect: Trim, sendstart_sandend_s.end_smust come afterstart_sand within the clip.
operation: extend
Add new music to the song. instruction says what to add, for example an instrumental outro. extend_s sets how many seconds to add, from 1 to 300, and 150 when you leave it out. extend_from_s is the second where the new music starts. Left out, it starts at the end of the clip.
operation: replace
Make one section of the song again. mask_start_s and mask_end_s mark the section in seconds, and instruction says what it should become. mask_end_s must come after mask_start_s and stay within the clip.
operation: cover
Restyle the whole song. instruction is optional and gives the style in your own words. strength sets how strongly the song is restyled.
operation: remix
Re-sing the song with edited lyrics. It keeps the source song’s sound prompt unless you send prompt. The result clip’s lyrics holds your edited lyrics.
operation: stems
Split the song into its tracks. Google Flow Music runs the split and makes a new clip for each track: drums, bass, vocals and other. Each one is a normal clip with its own id, audio_url and wav_url. Only clip is needed.
stems answers in the same request, usually after about 15 to 60 seconds, with every stem at once. If the split takes too long, it answers 504 (the Responses below say after how long). The split keeps running at Flow Music, so send the same request again a little later. A clip that is already split answers at once.
Download a stem as mp3 with GET /music/download, or use its audio_url or wav_url.
Its answer is not a job record like the other edits. It is a flat list of the stem clips, one for each stem. The Responses below show it.
Sync and async
A request takes about 10 to 35 seconds, and about 15 to 60 seconds with operation stems.
With operation effect, extend, replace or cover, the call answers with the result when it is ready. It waits up to 120 seconds. If the result isn’t ready by then, it answers 202 with a job to poll. With operation remix, the call answers with the result when it is ready. It waits up to 420 seconds. If the result isn’t ready by then, it answers 202 with a job to poll. With mode async, the call answers at once with a job to poll. With operation stems, the call answers when the result is ready. It waits up to 120 seconds for the result. If there is none by then, it answers 504. Poll GET /v1/flowmusic/jobs/{jobid} about every 10 seconds.
stems ignores mode. A job still pending 20 minutes after it started fails with error.code timeout when you read it.
The edit keeps rendering on our side even if your connection drops. It still lands in the job record and the webhook.
Responses
-
The edit is finished. You get the job record with the new clips. For
stemsyou get the four stem clips (drums, bass, vocals and other) andsource_clip, with no job.A
cover, finished{ "jobid": "job:4b385005-64a1-4b25-b1d2-e380eaa24266-user:[email protected]:flowmusic", "email": "[email protected]", "status": "completed", "operation": "cover", "created_at": "2026-11-28T22:59:12.968Z", "completed_at": "2026-11-28T22:59:43.086Z", "duration_ms": 30118, "clips": [ { "clip": "user:[email protected]:fdfadf5f-f367-4cfc-b82e-0e74fa5e36c6", "title": "Home Again (Classic Take) (Cover)", "duration_s": 177.856, "lyrics": "[Verse 1]\nRain on the window,\nTea's in the cup,\nWatching the gray sky,\nJust waking up.\nOld photographs in a box on the floor,\nTaking me back to the places I've known before.\n\n[Chorus]\nHome again,\nWhere my heart wants to be,\nSafe in the memories,\nHolding onto me.\nHome again,\nLight in the hall,\nFinding my peace here,\nAfter it all.\n\n[Verse 2]\nDust on the bookshelf,\nBooks that I've read,\nStories and dreams that still live in my head.\nClock on the mantle is ticking so slow,\nSinging a song of the long, long ago.\nThe fire's just an ember, the shadows are tall,\nBut I feel so safe here, inside of these walls.\n\n[Chorus]\nHome again,\nWhere my heart wants to be,\nSafe in the memories,\nHolding onto me.\nHome again,\nLight in the hall,\nFinding my peace here,\nAfter it all.\n\n[Chorus]\nHome again,\nWhere my heart wants to be,\nSafe in the memories,\nHolding onto me.\nHome again,\nLight in the hall,\nFinding my peace here,\nAfter it all.\n\n[Outro]\nHome again,\n(Home again),\n(Ooh, ooh).", "seed": null, "lyrics_timing": null, "created_at": "2026-11-28T22:59:42.612262Z", "audio_url": "https://storage.googleapis.com/producer-app-public/clips/fdfadf5f-f367-4cfc-b82e-0e74fa5e36c6.m4a", "wav_url": "https://storage.googleapis.com/producer-app-public/clips/fdfadf5f-f367-4cfc-b82e-0e74fa5e36c6.wav", "image_url": "https://storage.googleapis.com/producer-app-public/assets/fdfadf5f-f367-4cfc-b82e-0e74fa5e36c6.jpg" } ], "request": { "operation": "cover", "clip": "user:[email protected]:6e6d7abd-2a7f-4f4a-8390-b2a158ac10ec", "instruction": "lofi" } }A
stemssplit: four stem clips, no job{ "email": "[email protected]", "operation": "stems", "source_clip": "user:[email protected]:6e6d7abd-2a7f-4f4a-8390-b2a158ac10ec", "status": "completed", "clips": [ { "stem_type": "vocals", "clip": "user:[email protected]:c7b79af4-3017-4873-bb7c-5d25048e7a10", "title": "Home Again (Classic Take) - vocals", "duration_s": 181.90933333333334, "lyrics": "[Verse 1]\nRain on the window,\nTea's in the cup,\nWatching the gray sky,\nJust waking up.\nOld photographs in a box on the floor,\nTaking me back to the places I've known before.\n\n[Chorus]\nHome again,\nWhere my heart wants to be,\nSafe in the memories,\nHolding onto me.\nHome again,\nLight in the hall,\nFinding my peace here,\nAfter it all.\n\n[Verse 2]\nDust on the bookshelf,\nBooks that I've read,\nStories and dreams that still live in my head.\nClock on the mantle is ticking so slow,\nSinging a song of the long, long ago.\nThe fire's just an ember, the shadows are tall,\nBut I feel so safe here, inside of these walls.\n\n[Chorus]\nHome again,\nWhere my heart wants to be,\nSafe in the memories,\nHolding onto me.\nHome again,\nLight in the hall,\nFinding my peace here,\nAfter it all.\n\n[Chorus]\nHome again,\nWhere my heart wants to be,\nSafe in the memories,\nHolding onto me.\nHome again,\nLight in the hall,\nFinding my peace here,\nAfter it all.\n\n[Outro]\nHome again,\n(Home again),\n(Ooh, ooh).", "seed": null, "lyrics_timing": null, "created_at": "2026-11-28T23:00:58.638421Z", "audio_url": "https://storage.googleapis.com/producer-app-public/clips/c7b79af4-3017-4873-bb7c-5d25048e7a10.m4a", "wav_url": "https://storage.googleapis.com/producer-app-public/clips/c7b79af4-3017-4873-bb7c-5d25048e7a10.wav", "image_url": null }, { "stem_type": "drums", "clip": "user:[email protected]:7dc0d29d-689a-438e-9a15-ea8fce965cf6", "title": "Home Again (Classic Take) - drums", "duration_s": 181.90933333333334, "lyrics": "[Instrumental]", "seed": null, "lyrics_timing": null, "created_at": "2026-11-28T23:00:58.370587Z", "audio_url": "https://storage.googleapis.com/producer-app-public/clips/7dc0d29d-689a-438e-9a15-ea8fce965cf6.m4a", "wav_url": "https://storage.googleapis.com/producer-app-public/clips/7dc0d29d-689a-438e-9a15-ea8fce965cf6.wav", "image_url": null }, { "stem_type": "bass", "clip": "user:[email protected]:f4d1c6c5-8ce5-42dc-a266-cf973ed8951f", "title": "Home Again (Classic Take) - bass", "duration_s": 181.90933333333334, "lyrics": "[Instrumental]", "seed": null, "lyrics_timing": null, "created_at": "2026-11-28T23:00:58.633950Z", "audio_url": "https://storage.googleapis.com/producer-app-public/clips/f4d1c6c5-8ce5-42dc-a266-cf973ed8951f.m4a", "wav_url": "https://storage.googleapis.com/producer-app-public/clips/f4d1c6c5-8ce5-42dc-a266-cf973ed8951f.wav", "image_url": null }, { "stem_type": "other", "clip": "user:[email protected]:ef2bb087-c92c-48d4-bc49-05ed716bdd2f", "title": "Home Again (Classic Take) - other", "duration_s": 181.90933333333334, "lyrics": "[Instrumental]", "seed": null, "lyrics_timing": null, "created_at": "2026-11-28T23:00:58.654782Z", "audio_url": "https://storage.googleapis.com/producer-app-public/clips/ef2bb087-c92c-48d4-bc49-05ed716bdd2f.m4a", "wav_url": "https://storage.googleapis.com/producer-app-public/clips/ef2bb087-c92c-48d4-bc49-05ed716bdd2f.wav", "image_url": null } ], "request": { "operation": "stems", "clip": "user:[email protected]:6e6d7abd-2a7f-4f4a-8390-b2a158ac10ec" } } -
You sent
modeasync, so you get the job record at once, withstatuspending. Poll GET /jobs/jobiduntilstatusiscompletedorfailed, or wait for thereplyUrlwebhook.{ "jobid": "job:f634cbba-2b8c-4050-bb49-59d854edb7bf-user:[email protected]:flowmusic", "email": "[email protected]", "operation": "effect", "sub_operation": "Fade", "status": "pending", "created_at": "2026-11-28T22:55:52.067Z", "request": { "operation": "effect", "effect": "Fade", "clip": "user:[email protected]:6e6d7abd-2a7f-4f4a-8390-b2a158ac10ec", "fade_out_s": 2, "mode": "async" } } -
The edit was not finished after 2 minutes (7 minutes for
remix). You get the job record withstatuspending, and the job keeps running. Poll GET /jobs/jobiduntilstatusiscompletedorfailed, or wait for thereplyUrlwebhook.{ "jobid": "job:aaaabbbb-cccc-4ddd-8eee-ffff99990000-user:[email protected]:flowmusic", "email": "[email protected]", "operation": "cover", "status": "pending", "created_at": "2026-06-01T18:40:42.412Z", "request": { "operation": "cover", "clip": "user:[email protected]:6e6d7abd-2a7f-4f4a-8390-b2a158ac10ec", "strength": 0.7 } } -
The request itself is wrong, or no usable Google Flow Music account is added. The error text says what to change.
{ "error": "Please configure at least one account at https://useapi.net/docs/api-flowmusic-v1/post-flowmusic-accounts", "code": 400 }{ "error": "clip must be a clip-type asset ID", "code": 400 }{ "error": "replace requires numeric mask_start_s and mask_end_s", "code": 400 }{ "error": "prompt required for operation=remix (source clip has no reusable sound_prompt)", "code": 400 }{ "error": "end_s must be > start_s", "code": 400 }{ "error": "Invalid JSON: Unexpected token 'o', \"not json\" is not valid JSON", "code": 400 } -
The useapi.net API token is missing or wrong.
A step at Google Flow Music failed with 401: it refused the account’s sign-in. The error text names the step.
{ "error": "recipes/create failed (401): {\"detail\":\"Unauthorized\"}", "code": 401 }{ "error": "producer/tool-call failed (401): {\"detail\":\"Unauthorized\"}", "code": 401 }{ "error": "producer/tool-call (create_song remix) failed (401): {\"detail\":\"Unauthorized\"}", "code": 401 }{ "error": "conversation failed (401): {\"detail\":\"Unauthorized\"}", "code": 401 }{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
The useapi.net subscription is not active.
The Google Flow Music account has too few credits. Top it up, or send the request to an account with credits.
{ "error": "recipes/create failed (402): {\"detail\":\"User has insufficient credits\"}", "code": 402 }{ "error": "producer/tool-call failed (402): {\"detail\":\"User has insufficient credits\"}", "code": 402 }{ "error": "producer/tool-call (create_song remix) failed (402): {\"detail\":\"User has insufficient credits\"}", "code": 402 }{ "error": "conversation failed (402): {\"detail\":\"User has insufficient credits\"}", "code": 402 }{ "error": "useapi.net ⁝ Your account has no subscription, please subscribe to our services before submitting requests", "code": 402 } -
The id belongs to another API token.
{ "error": "asset ID does not belong to authenticated operator (parsed user:12346, calling user:12345)", "code": 403 } -
The account, job or clip does not exist, or is no longer there.
{ "error": "Account [email protected] not in operator's config map", "code": 404 }{ "error": "source clip not found on Google Flow Music", "code": 404 } -
The failed job
The edit was cancelled with DELETE /jobs/
jobidwhile the request waited. You get the job record withstatusfailed anderror.codeuser_cancelled.{ "jobid": "job:6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f-user:[email protected]:flowmusic", "email": "[email protected]", "operation": "cover", "status": "failed", "created_at": "2026-11-28T23:40:12.006Z", "request": { "operation": "cover", "clip": "user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c", "instruction": "lo-fi chillhop reinterpretation", "strength": 0.7 }, "error": { "code": "user_cancelled", "message": "Cancelled by user, slot freed" }, "cancelled_at": "2026-11-28T23:40:20.884Z" } -
The failed job
Google Flow Music made no audio for the edit, so the job failed. You get the job record with
statusfailed and the reason inerror.code:edit_failed,effect_failedormoderation_reject.If the clip is one you uploaded,
extend,replaceandcovercannot change it.{ "jobid": "job:9f8e7d6c-5b4a-4f3e-9d2c-1b0a9f8e7d6c-user:[email protected]:flowmusic", "email": "[email protected]", "status": "failed", "operation": "cover", "created_at": "2026-11-28T23:44:30.250Z", "completed_at": "2026-11-28T23:45:02.913Z", "error": { "code": "edit_failed", "message": "Agent did not emit audio__create_song — likely a moderation refusal", "raw": "" }, "request": { "operation": "cover", "clip": "user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c", "instruction": "lo-fi chillhop reinterpretation", "strength": 0.7 } }{ "error": "source clip has no conversation_id — uploaded clips cannot be edited via recipe", "code": 422 } -
Google Flow Music refused the request because this account sent too many at once. Retry once a running generation finishes, or a little later.
{ "error": "recipes/create failed (429): {\"detail\":\"Too Many Requests\"}", "code": 429 }{ "error": "producer/tool-call failed (429): {\"detail\":\"Too Many Requests\"}", "code": 429 }{ "error": "producer/tool-call (create_song remix) failed (429): {\"detail\":\"Too Many Requests\"}", "code": 429 }{ "error": "conversation failed (429): {\"detail\":\"Too Many Requests\"}", "code": 429 } -
Something failed on our side.
A step at Google Flow Music failed with 500. The error text names the step.
{ "error": "Cannot read properties of undefined (reading 'email')", "code": 500 }{ "error": "Async mode unavailable — no system proxy configured. Contact [email protected]", "code": 500 }{ "error": "recipes/create failed (500): \"Internal Server Error\"", "code": 500 }{ "error": "producer/tool-call failed (500): \"Internal Server Error\"", "code": 500 }{ "error": "producer/tool-call (create_song remix) failed (500): \"Internal Server Error\"", "code": 500 }{ "error": "conversation failed (500): \"Internal Server Error\"", "code": 500 } -
Google Flow Music answered with an error, or did not answer. The error text says what happened.
{ "error": "Upstream network failure after 4 attempts: Network connection lost.", "code": 502 }{ "error": "Upstream fetch produced no response", "code": 502 }{ "error": "Google Flow Music returned no job_id", "code": 502 }{ "error": "source clip lookup failed: 500", "code": 502 }{ "error": "recipes/create returned no recipe_id", "code": 502 } -
The Google Flow Music sign-in service did not answer, or another request is renewing the account’s sign-in right now. The account is unchanged. Retry in a minute, or after Retry-After when it is sent. On any call, it can also mean our service was busy for a moment.
{ "error": "Another request is refreshing the Google Flow Music sign-in of [email protected] right now. Retry in a few seconds.", "code": 503 }{ "error": "Google Flow Music's sign-in service did not answer (500). Retry in a minute.", "code": 503 } -
The failed job
An edit that does not finish in time fails, and you get its job record with
statusfailed anderror.codetimeout. Check GET /music before you send it again.The stem split did not finish in 2 minutes. It keeps running at Google Flow Music, so send the same request again a little later.
{ "jobid": "job:2e4f6a8b-0c1d-4e3f-a5b7-c9d1e3f5a7b9-user:[email protected]:flowmusic", "email": "[email protected]", "status": "failed", "operation": "extend", "created_at": "2026-11-28T23:50:05.640Z", "completed_at": "2026-11-28T23:52:05.902Z", "error": { "code": "timeout", "message": "No audio produced before the SSE budget elapsed", "raw": "" }, "request": { "operation": "extend", "clip": "user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c", "instruction": "add a slow piano outro" } }{ "error": "stem separation did not complete in time — retry shortly", "code": 504 } -
596 Account Error
The account is in an error state. Add it again with POST /accounts.
{ "error": "Account [email protected] in error state: Google Flow Music signed out [email protected]: its sign-in can no longer be refreshed (refresh_token_already_used), usually because it was refreshed somewhere else. Add the account again: https://useapi.net/docs/start-here/setup-flowmusic", "code": 596 }{ "error": "Google Flow Music signed out [email protected]: its sign-in can no longer be refreshed (refresh_token_already_used), usually because it was refreshed somewhere else. Add the account again: https://useapi.net/docs/start-here/setup-flowmusic", "code": 596 }
Model
The same job record as POST /music, plus a top-level operation. The request echoes the edit body you sent. A stems split answers a flat list of its stem clips instead, with no job.
The edit job, or the stem split and the types it uses (EditJob, Clip, EditRequest, StemClip) (200)
// TypeScript, fields marked ? may be absent
EditJob | {
email: string // the Google Flow Music account that holds the clip
operation: "stems" // always stems
source_clip: string // the clip that was split
status: "completed" // always completed: the stems are ready
clips: StemClip[] // the four stem clips, one per stem type
request: EditRequest // the request body you sent, echoed back
}
EditJob:
{ // TypeScript, fields marked ? may be absent
jobid: string // the job's id, `job:<uuid>-user:[email protected]:flowmusic`. Read the job with GET /jobs/{jobid}
email: string // the Google Flow Music account the job runs on
operation: "effect" | "extend" | "replace" | "cover" | "remix" // the edit
sub_operation?: "Trim" | "Fade" | "Gain" | "Reverb" | "Pan" | "Equalizer" // with operation effect: the effect
status: "pending" | "completed" | "failed" // pending: Google Flow Music is still making it. completed: the clips are ready. failed: error says why
created_at: string // when the job started, ISO 8601
completed_at?: string // when the job ended, ISO 8601. Present once the job has completed or failed. A cancelled job has none
duration_ms?: number // how long the job took, in milliseconds. Present once it is completed
cancelled_at?: string // when DELETE /jobs/{jobid} cancelled the job, ISO 8601
clips?: Clip[] // the result clips. Present once the job is completed
error?: {
code: string // why the job failed, such as `user_cancelled` or `timeout`
message: string // the failure in words
detail?: string // more on the failure, when there is more
raw?: string // the start of Google Flow Music's own reply, when it made no audio
} // why the job failed. Present when status is failed
request: EditRequest // the request body you sent, echoed back
}
Clip:
{ // TypeScript, fields marked ? may be absent
clip: string // the encoded clip id, `user:[email protected]:<uuid>`: use it with GET /music/download and POST /music/edit
title: string | null // the song title Google Flow Music gave the clip
duration_s: number | null // the clip length in seconds, or null while Google Flow Music has not finished measuring it
lyrics: string | null // the lyrics, [Verse] / [Chorus] tagged, or "[Instrumental]" for an instrumental
seed: number | null // the seed the clip was made with, when Google Flow Music states one
lyrics_timing: number[][] | null // the timing markers of the sung lyrics, each [start, end] in seconds, or null when Google Flow Music sends none, which also happens for sung songs
created_at: string // when Google Flow Music made the clip, ISO 8601
audio_url: string // the m4a file, a public link (no token needed)
wav_url: string // the wav file, a public link (no token needed)
image_url: string | null // the artwork Google Flow Music made for the clip, when there is one
}
EditRequest:
{ // TypeScript, fields marked ? may be absent
operation: "effect" | "extend" | "replace" | "cover" | "remix" | "stems" // the edit, as sent
clip: string // the clip edited, as sent
effect?: "Trim" | "Fade" | "Gain" | "Reverb" | "Pan" | "Equalizer" // with operation effect: the effect, as sent
gain_db?: number // `gain_db`, as sent
mix?: number // `mix`, as sent
room_size?: number // `room_size`, as sent
pan?: number // `pan`, as sent
bass_db?: number // `bass_db`, as sent
mid_db?: number // `mid_db`, as sent
treble_db?: number // `treble_db`, as sent
fade_in_s?: number // `fade_in_s`, as sent
fade_out_s?: number // `fade_out_s`, as sent
start_s?: number // `start_s`, as sent
end_s?: number // `end_s`, as sent
extend_s?: number // `extend_s`, as sent
extend_from_s?: number // `extend_from_s`, as sent
mask_start_s?: number // `mask_start_s`, as sent
mask_end_s?: number // `mask_end_s`, as sent
strength?: number // `strength`, as sent
instruction?: string // what to make (extend, replace) or the style direction (cover), as sent
title?: string // the title asked for, as sent
seed?: number // the seed asked for, as sent
lyrics?: string // remix: the new lyrics, as sent
prompt?: string // remix: the sound prompt, as sent
model?: "lyria-3.5" | "lyria-3-pro" // the model the request named
mode?: "sync" | "async" // sync or async, as sent
replyUrl?: string // the webhook URL, as sent
replyRef?: string // the webhook reference, as sent
}
StemClip:
{ // TypeScript, fields marked ? may be absent
stem_type: "vocals" | "drums" | "bass" | "other" // the part of the song this stem holds
clip: string // the encoded clip id, `user:[email protected]:<uuid>`: use it with GET /music/download and POST /music/edit
title: string | null // the song title Google Flow Music gave the clip
duration_s: number | null // the clip length in seconds, or null while Google Flow Music has not finished measuring it
lyrics: string | null // the lyrics, [Verse] / [Chorus] tagged, or "[Instrumental]" for an instrumental
seed: number | null // the seed the clip was made with, when Google Flow Music states one
lyrics_timing: number[][] | null // the timing markers of the sung lyrics, each [start, end] in seconds, or null when Google Flow Music sends none, which also happens for sung songs
created_at: string // when Google Flow Music made the clip, ISO 8601
audio_url: string // the m4a file, a public link (no token needed)
wav_url: string // the wav file, a public link (no token needed)
image_url: string | null // the artwork Google Flow Music made for the clip, when there is one
}
The edit job record and the types it uses (Clip, EditRequest) (201, 202)
{ // TypeScript, fields marked ? may be absent
jobid: string // the job's id, `job:<uuid>-user:[email protected]:flowmusic`. Read the job with GET /jobs/{jobid}
email: string // the Google Flow Music account the job runs on
operation: "effect" | "extend" | "replace" | "cover" | "remix" // the edit
sub_operation?: "Trim" | "Fade" | "Gain" | "Reverb" | "Pan" | "Equalizer" // with operation effect: the effect
status: "pending" | "completed" | "failed" // pending: Google Flow Music is still making it. completed: the clips are ready. failed: error says why
created_at: string // when the job started, ISO 8601
completed_at?: string // when the job ended, ISO 8601. Present once the job has completed or failed. A cancelled job has none
duration_ms?: number // how long the job took, in milliseconds. Present once it is completed
cancelled_at?: string // when DELETE /jobs/{jobid} cancelled the job, ISO 8601
clips?: Clip[] // the result clips. Present once the job is completed
error?: {
code: string // why the job failed, such as `user_cancelled` or `timeout`
message: string // the failure in words
detail?: string // more on the failure, when there is more
raw?: string // the start of Google Flow Music's own reply, when it made no audio
} // why the job failed. Present when status is failed
request: EditRequest // the request body you sent, echoed back
}
Clip:
{ // TypeScript, fields marked ? may be absent
clip: string // the encoded clip id, `user:[email protected]:<uuid>`: use it with GET /music/download and POST /music/edit
title: string | null // the song title Google Flow Music gave the clip
duration_s: number | null // the clip length in seconds, or null while Google Flow Music has not finished measuring it
lyrics: string | null // the lyrics, [Verse] / [Chorus] tagged, or "[Instrumental]" for an instrumental
seed: number | null // the seed the clip was made with, when Google Flow Music states one
lyrics_timing: number[][] | null // the timing markers of the sung lyrics, each [start, end] in seconds, or null when Google Flow Music sends none, which also happens for sung songs
created_at: string // when Google Flow Music made the clip, ISO 8601
audio_url: string // the m4a file, a public link (no token needed)
wav_url: string // the wav file, a public link (no token needed)
image_url: string | null // the artwork Google Flow Music made for the clip, when there is one
}
EditRequest:
{ // TypeScript, fields marked ? may be absent
operation: "effect" | "extend" | "replace" | "cover" | "remix" | "stems" // the edit, as sent
clip: string // the clip edited, as sent
effect?: "Trim" | "Fade" | "Gain" | "Reverb" | "Pan" | "Equalizer" // with operation effect: the effect, as sent
gain_db?: number // `gain_db`, as sent
mix?: number // `mix`, as sent
room_size?: number // `room_size`, as sent
pan?: number // `pan`, as sent
bass_db?: number // `bass_db`, as sent
mid_db?: number // `mid_db`, as sent
treble_db?: number // `treble_db`, as sent
fade_in_s?: number // `fade_in_s`, as sent
fade_out_s?: number // `fade_out_s`, as sent
start_s?: number // `start_s`, as sent
end_s?: number // `end_s`, as sent
extend_s?: number // `extend_s`, as sent
extend_from_s?: number // `extend_from_s`, as sent
mask_start_s?: number // `mask_start_s`, as sent
mask_end_s?: number // `mask_end_s`, as sent
strength?: number // `strength`, as sent
instruction?: string // what to make (extend, replace) or the style direction (cover), as sent
title?: string // the title asked for, as sent
seed?: number // the seed asked for, as sent
lyrics?: string // remix: the new lyrics, as sent
prompt?: string // remix: the sound prompt, as sent
model?: "lyria-3.5" | "lyria-3-pro" // the model the request named
mode?: "sync" | "async" // sync or async, as sent
replyUrl?: string // the webhook URL, as sent
replyRef?: string // the webhook reference, as sent
}
Examples
-
curl -X POST "https://api.useapi.net/v1/flowmusic/music/edit" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"operation":"cover","clip":"user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c","instruction":"lo-fi chillhop reinterpretation","strength":0.7}' -
const response = await fetch('https://api.useapi.net/v1/flowmusic/music/edit', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Content-Type': 'application/json' }, body: JSON.stringify({ "operation": "cover", "clip": "user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c", "instruction": "lo-fi chillhop reinterpretation", "strength": 0.7 }) }) console.log(response.status, await response.json()) -
import requests response = requests.post( 'https://api.useapi.net/v1/flowmusic/music/edit', headers={'Authorization': 'Bearer YOUR_API_TOKEN'}, json={ 'operation': 'cover', 'clip': 'user:[email protected]:3f9c2a7d-81e6-4b05-a9d2-c4e7b6e14d0c', 'instruction': 'lo-fi chillhop reinterpretation', 'strength': 0.7 }, ) print(response.status_code, response.json())