---
title: "Video To Music"
method: POST
path: "/v1/music/video-to-music"
tags: ["video-to-music"]
---

# Video To 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

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

## 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'
- `enable_logging` boolean: 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-key` string, 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`

- BodyVideoToMusicV1MusicVideoToMusicPost
  - `videos` string[], 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.
  - `description` string, nullable: Optional text description of the music you want. A maximum of 4100 characters is allowed.
  - `tags` string[]: 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_sfx` boolean: When true, incorporate SFX cues from the video.
  - `separate_tracks` boolean: 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_reference` boolean: 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_c2pa` boolean: Whether to sign the generated song with C2PA. Applicable only for mp3 files.

## Response `200`

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

## Other responses

- `403`: Subscription required.
- `422`: Validation error (e.g. invalid or missing videos).

## Changes

- **2026-10-15** `7caa31372b10`: 1 info
  - added the new optional `query` request parameter `enable_logging`
- **2026-10-15** `260e07ca1d41`: 3 info
  - added the new optional request property `add_sfx`
  - added the new optional request property `separate_tracks`
  - added the new optional request property `use_audio_as_reference`
- **2026-10-08** `991554f79511`: 1 info
  - the `description/anyOf[subschema #1]/` request property's maxLength was increased from `1000` to `4100`
- **2026-09-11** `01782c0621ab`: 1 info
  - added the new `music_v2_5` enum value to the request property `model_id`
- **2026-07-31** `72c54eba117e`: 1 info
  - added the media type `application/zip` for the response with the status `200`

[Operation history](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/changes/v1/music/video-to-music/post.md)

---

[API](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation.md) - [All operations](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/revisions/d04f5e77c40a?raw)
