POST
POST /v1/music/video-to-music — ElevenLabs API
ElevenLabs APIVideo To Music
- Base URL
- https://api.elevenlabs.io
- Auth
- xi-api-key: <ELEVENLABS_API_KEY>
- Last verified
- 2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 218 tokens · Vary: Accept
→ 218 tokens · Vary: Accept
Critical gotchas
Authentication uses the non-standard xi-api-key header, not Authorization: Bearer. Sending a Bearer token returns HTTP 401.
Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (--output speech.mp3) rather than parsing it.
cURL
curl -X POST 'https://api.elevenlabs.io/v1/music/video-to-music?output_format=mp3_22050_32&enable_logging=true' \ -H "xi-api-key: $ELEVENLABS_API_KEY" \ -F '[email protected]' \ -F 'description=example-description' \ -F 'tags=string' \ -F 'model_id=music_v1' \ -F 'add_sfx=false' \ -F 'separate_tracks=false' \ -F 'use_audio_as_reference=false' \ -F 'sign_with_c2pa=false'
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| output_format | query | string | No | 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_logging | query | boolean | No | 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. |
| videos | body | string[] | Yes | 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 | body | string | No | Optional text description of the music you want. A maximum of 4100 characters is allowed. |
| tags | body | string[] | No | Optional list of style tags (e.g. ['upbeat', 'cinematic']). A maximum of 10 tags is allowed. |
| model_id | body | string | No | Request body field model_id. |
| add_sfx | body | boolean | No | When true, incorporate SFX cues from the video. |
| separate_tracks | body | boolean | No | 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 | body | boolean | No | 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 | body | boolean | No | Whether to sign the generated song with C2PA. Applicable only for mp3 files. |
Response 200 OK
"binary"Get a free ElevenLabs API key → sponsored
Affiliate link - we may earn a commission, at no extra cost to you.