video-to-music

Generate background music from one or more video files. Videos are combined in order. Optional description and style tags influence the generated music.

post/v1/music/video-to-music

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/video-to-music
  • Auth
    none declared

Query parameters

output_format'mp3_22050_32' | 'mp3_24000_48' | 'mp3_44100_32' | 'mp3_44100_64' | 'mp3_44100_96' | 'mp3_44100_128' | 'mp3_44100_192' | 'pcm_8000' | 'pcm_16000' | 'pcm_22050' | 'pcm_24000' | 'pcm_32000' | 'pcm_44100' | 'pcm_48000' | 'ulaw_8000' | 'alaw_8000' | 'opus_48000_32' | 'opus_48000_64' | 'opus_48000_96' | 'opus_48000_128' | 'opus_48000_192'

Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.

enable_loggingboolean

When enable_logging is set to false zero retention mode will be used for the request. Zero retention mode may only be used by enterprise customers.

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

videosstring[] required
        One or more video files sent via FormData array (multipart/form-data). They will be combined into one codec in order.
        A maximum of 10 videos is allowed, where the total size of the combined video is limited to 200MB.
        In total, the video can be up to 600 seconds long. Note that combining multiple videos may increase the request duration significantly. If possible, combine the videos beforehand.
        
descriptionstring nullable

Optional text description of the music you want. A maximum of 4100 characters is allowed.

tagsstring[]

Optional list of style tags (e.g. ['upbeat', 'cinematic']). A maximum of 10 tags is allowed.

model_id'music_v1' | 'music_v2' | 'music_v2_5'
add_sfxboolean

When true, incorporate SFX cues from the video.

separate_tracksboolean

When true, return a ZIP with separate music and SFX audio tracks instead of a single mixed file. Use this for more flexibility to layer the tracks.

use_audio_as_referenceboolean

When true, analyze the video's audio track and use its genres, BPM, instrumentation, mood, and arc as reference characteristics for music generation.

sign_with_c2paboolean

Whether to sign the generated song with C2PA. Applicable only for mp3 files.

Response

Generated audio file matching the video. Content-Type and file extension depend on the output_format parameter (default mp3).

Changes

    • info

      added the new optional query request parameter enable_logging

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property