For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Connect
BlogHelp CenterAPI PricingSign up
OverviewElevenCreativeElevenAgentsElevenAPIAPI referenceChangelog
OverviewElevenCreativeElevenAgentsElevenAPIAPI referenceChangelog
  • API reference
    • Introduction
    • Authentication
    • Streaming
  • ElevenAgents
  • ElevenAPI
      • POSTCompose music
      • STREAMStream music
      • POSTCompose music with details
      • POSTCreate composition plan
      • POSTVideo To Music
      • POSTUpload Music
      • POSTStem Separation
  • ElevenCreative
  • Core Resources
  • Workspace
  • Legacy
LogoLogo
Login
Login
Connect
BlogHelp CenterAPI PricingSign up
ElevenAPIMusic

Video To Music

POST
/v1/music/video-to-music
POST
/v1/music/video-to-music
$curl -X POST https://api.elevenlabs.io/v1/music/video-to-music \
> -H "Content-Type: multipart/form-data" \
> -F "videos[]"=@string
Generate background music from one or more video files. Videos are combined in order. Optional description and style tags influence the generated music.
Was this page helpful?
Previous

Upload Music

Next
Built with

Headers

xi-api-keystringOptional

Query parameters

output_formatenumOptional

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.

Request

This endpoint expects a multipart form with multiple files.
videosfilesRequired

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 or nullOptional1-1000 characters
Optional text description of the music you want. A maximum of 1000 characters is allowed.
tagslist of stringsOptional

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

model_idenumOptionalDefaults to music_v1
The model to use for the generation.
Allowed values:
sign_with_c2pabooleanOptionalDefaults to false
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).

Errors

403
Forbidden Error
422
Unprocessable Entity Error