视频配乐
curl --request POST \
--url https://api.mountsea.ai/eleven/video-to-music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videoUrls": [
"https://example.com/video.mp4"
],
"description": "Upbeat background music for a travel vlog",
"tags": [
"upbeat",
"cinematic"
],
"outputFormat": "mp3_44100_128",
"signWithC2pa": false
}
'import requests
url = "https://api.mountsea.ai/eleven/video-to-music"
payload = {
"videoUrls": ["https://example.com/video.mp4"],
"description": "Upbeat background music for a travel vlog",
"tags": ["upbeat", "cinematic"],
"outputFormat": "mp3_44100_128",
"signWithC2pa": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
videoUrls: ['https://example.com/video.mp4'],
description: 'Upbeat background music for a travel vlog',
tags: ['upbeat', 'cinematic'],
outputFormat: 'mp3_44100_128',
signWithC2pa: false
})
};
fetch('https://api.mountsea.ai/eleven/video-to-music', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mountsea.ai/eleven/video-to-music",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'videoUrls' => [
'https://example.com/video.mp4'
],
'description' => 'Upbeat background music for a travel vlog',
'tags' => [
'upbeat',
'cinematic'
],
'outputFormat' => 'mp3_44100_128',
'signWithC2pa' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mountsea.ai/eleven/video-to-music"
payload := strings.NewReader("{\n \"videoUrls\": [\n \"https://example.com/video.mp4\"\n ],\n \"description\": \"Upbeat background music for a travel vlog\",\n \"tags\": [\n \"upbeat\",\n \"cinematic\"\n ],\n \"outputFormat\": \"mp3_44100_128\",\n \"signWithC2pa\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mountsea.ai/eleven/video-to-music")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoUrls\": [\n \"https://example.com/video.mp4\"\n ],\n \"description\": \"Upbeat background music for a travel vlog\",\n \"tags\": [\n \"upbeat\",\n \"cinematic\"\n ],\n \"outputFormat\": \"mp3_44100_128\",\n \"signWithC2pa\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/eleven/video-to-music")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"videoUrls\": [\n \"https://example.com/video.mp4\"\n ],\n \"description\": \"Upbeat background music for a travel vlog\",\n \"tags\": [\n \"upbeat\",\n \"cinematic\"\n ],\n \"outputFormat\": \"mp3_44100_128\",\n \"signWithC2pa\": false\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}ElevenLabs
视频配乐
根据视频内容生成背景音乐
POST
/
eleven
/
video-to-music
视频配乐
curl --request POST \
--url https://api.mountsea.ai/eleven/video-to-music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videoUrls": [
"https://example.com/video.mp4"
],
"description": "Upbeat background music for a travel vlog",
"tags": [
"upbeat",
"cinematic"
],
"outputFormat": "mp3_44100_128",
"signWithC2pa": false
}
'import requests
url = "https://api.mountsea.ai/eleven/video-to-music"
payload = {
"videoUrls": ["https://example.com/video.mp4"],
"description": "Upbeat background music for a travel vlog",
"tags": ["upbeat", "cinematic"],
"outputFormat": "mp3_44100_128",
"signWithC2pa": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
videoUrls: ['https://example.com/video.mp4'],
description: 'Upbeat background music for a travel vlog',
tags: ['upbeat', 'cinematic'],
outputFormat: 'mp3_44100_128',
signWithC2pa: false
})
};
fetch('https://api.mountsea.ai/eleven/video-to-music', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mountsea.ai/eleven/video-to-music",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'videoUrls' => [
'https://example.com/video.mp4'
],
'description' => 'Upbeat background music for a travel vlog',
'tags' => [
'upbeat',
'cinematic'
],
'outputFormat' => 'mp3_44100_128',
'signWithC2pa' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mountsea.ai/eleven/video-to-music"
payload := strings.NewReader("{\n \"videoUrls\": [\n \"https://example.com/video.mp4\"\n ],\n \"description\": \"Upbeat background music for a travel vlog\",\n \"tags\": [\n \"upbeat\",\n \"cinematic\"\n ],\n \"outputFormat\": \"mp3_44100_128\",\n \"signWithC2pa\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mountsea.ai/eleven/video-to-music")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoUrls\": [\n \"https://example.com/video.mp4\"\n ],\n \"description\": \"Upbeat background music for a travel vlog\",\n \"tags\": [\n \"upbeat\",\n \"cinematic\"\n ],\n \"outputFormat\": \"mp3_44100_128\",\n \"signWithC2pa\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/eleven/video-to-music")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"videoUrls\": [\n \"https://example.com/video.mp4\"\n ],\n \"description\": \"Upbeat background music for a travel vlog\",\n \"tags\": [\n \"upbeat\",\n \"cinematic\"\n ],\n \"outputFormat\": \"mp3_44100_128\",\n \"signWithC2pa\": false\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}根据视频内容自动生成匹配的背景音乐。AI 会分析视频画面,创建与情绪、节奏和转场相匹配的音乐。
这是一个异步任务。响应中包含
taskId — 使用获取任务状态轮询生成的音频。限制
- 每次请求最多 10 个视频 URL
- 总文件大小:最大 200 MB
- 总视频时长:最大 600 秒(10 分钟)
添加
description 和 tags 来引导 AI 生成所需风格。例如 "description": "Upbeat background music for a travel vlog","tags": ["upbeat", "cinematic"]。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json
视频文件 URL 列表(最多 10 个,总大小限 200MB,总时长限 600 秒)
Maximum array length:
10示例:
["https://example.com/video.mp4"]
音乐描述(最多 1000 字符)
Maximum string length:
1000示例:
"Upbeat background music for a travel vlog"
风格标签(最多 10 个)
Maximum array length:
10示例:
["upbeat", "cinematic"]
输出格式,格式为 codec_sampleRate_bitrate
可用选项:
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 是否使用 C2PA 签名标记 AI 生成内容。仅适用于 MP3 输出格式
响应
200 - application/json
任务创建成功
任务 ID,用于后续查询结果
⌘I