music-generation

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.

post/v1/music/upload

Request

  • Base URL
    https://api.elevenlabs.io (the document declares no server; this is the origin it was published from)
  • URL
    https://api.elevenlabs.io/v1/music/upload
  • Auth
    none declared

Headers

xi-api-keystring nullable

Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

Request body multipart/form-data

filestring binary required

The audio file to upload.

with_timestampsboolean

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_visualboolean

Whether to return the visual waveform of the uploaded song.

Response

Successfully uploaded music file with optional composition plan

song_idstring required

Unique identifier for the uploaded song

waveform_visualinteger[] nullable

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.

Example response

{
  "song_id": "jR4Xz8kL2mNpQ9wVtY1b"
}

Changes

    • info

      added the new music_v2_5 enum value to the request property /

    • breaking

      the ///// response property's maxLength was increased from 6000 to 6132 for the response status