Upload a music file to be later used for inpainting. Price for uploading is the same as the one for song generation. All uploaded content gets inspected for copyright infringement. If copyrighted content is detected, half of the request cost is still charged.
Request
This endpoint expects a multipart form containing a file.
filefileRequired
The audio file to upload.
extract_composition_planboolean or enumOptionalDefaults to false
Whether to generate and return the composition plan for the uploaded song. Pass a model id (`music_v1` or `music_v2`) to control which composition plan format is returned. Passing `true`/`false` is deprecated; `true` defaults to the `music_v1` plan format. Enabling this will increase the latency.
with_timestampsbooleanOptionalDefaults to false
Whether to transcribe the uploaded song and return word-level timestamps. If True, the response will include words_timestamps but will increase the latency.
with_waveform_visualbooleanOptionalDefaults to false
Whether to return the visual waveform of the uploaded song.
Response
Successfully uploaded music file with optional composition plan
song_idstring
Unique identifier for the uploaded song
composition_planobject or nullOptional
The composition plan extracted from the uploaded song. Only present if extract_composition_plan was provided in the request body.
words_timestampslist of objects or nullOptional
Word-level timestamps transcribed from the uploaded song. Only present if with_timestamps was True in the request body
waveform_visuallist of integers or nullOptional
A low-resolution waveform of the uploaded song, for showing a preview of it. Holds 4 values per second of audio, from -1000 to 1000. Stereo is mixed down to a single channel. Only present if with_waveform_visual was True in the request body.