ElevenLabs Music - Generate
curl --request POST \
--url https://api.mountsea.ai/ms/v1/run/elevenlabs/elevenlabs-music/music-generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"prompt": "Mysterious jungle soundtrack.",
"output_format": "mp3_44100_128",
"music_length_ms": 60000
}
}
'import requests
url = "https://api.mountsea.ai/ms/v1/run/elevenlabs/elevenlabs-music/music-generate"
payload = { "input": {
"prompt": "Mysterious jungle soundtrack.",
"output_format": "mp3_44100_128",
"music_length_ms": 60000
} }
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({
input: {
prompt: 'Mysterious jungle soundtrack.',
output_format: 'mp3_44100_128',
music_length_ms: 60000
}
})
};
fetch('https://api.mountsea.ai/ms/v1/run/elevenlabs/elevenlabs-music/music-generate', 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/ms/v1/run/elevenlabs/elevenlabs-music/music-generate",
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([
'input' => [
'prompt' => 'Mysterious jungle soundtrack.',
'output_format' => 'mp3_44100_128',
'music_length_ms' => 60000
]
]),
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/ms/v1/run/elevenlabs/elevenlabs-music/music-generate"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"Mysterious jungle soundtrack.\",\n \"output_format\": \"mp3_44100_128\",\n \"music_length_ms\": 60000\n }\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/ms/v1/run/elevenlabs/elevenlabs-music/music-generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"prompt\": \"Mysterious jungle soundtrack.\",\n \"output_format\": \"mp3_44100_128\",\n \"music_length_ms\": 60000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/ms/v1/run/elevenlabs/elevenlabs-music/music-generate")
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 \"input\": {\n \"prompt\": \"Mysterious jungle soundtrack.\",\n \"output_format\": \"mp3_44100_128\",\n \"music_length_ms\": 60000\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "ms-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"endpoint": "google/veo-3.1/text-to-video",
"model": "veo-3.1",
"mode": "text-to-video",
"created_at": "2023-11-07T05:31:56Z",
"error": {
"code": 500,
"message": "task failed"
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"elapsed_ms": 123,
"output": {
"audio": {
"url": "<string>",
"content_type": "<string>",
"file_name": "<string>"
}
}
}{
"task_id": "ms-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"endpoint": "google/veo-3.1/text-to-video",
"model": "veo-3.1",
"mode": "text-to-video",
"created_at": "2023-11-07T05:31:56Z",
"error": {
"code": 500,
"message": "task failed"
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"elapsed_ms": 123,
"output": {
"audio": {
"url": "<string>",
"content_type": "<string>",
"file_name": "<string>"
}
}
}{
"statusCode": 400,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 400,
"message": "<string>",
"error": "<string>"
}音频
ElevenLabs Music - Generate
POST
/
ms
/
v1
/
run
/
elevenlabs
/
elevenlabs-music
/
music-generate
ElevenLabs Music - Generate
curl --request POST \
--url https://api.mountsea.ai/ms/v1/run/elevenlabs/elevenlabs-music/music-generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"prompt": "Mysterious jungle soundtrack.",
"output_format": "mp3_44100_128",
"music_length_ms": 60000
}
}
'import requests
url = "https://api.mountsea.ai/ms/v1/run/elevenlabs/elevenlabs-music/music-generate"
payload = { "input": {
"prompt": "Mysterious jungle soundtrack.",
"output_format": "mp3_44100_128",
"music_length_ms": 60000
} }
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({
input: {
prompt: 'Mysterious jungle soundtrack.',
output_format: 'mp3_44100_128',
music_length_ms: 60000
}
})
};
fetch('https://api.mountsea.ai/ms/v1/run/elevenlabs/elevenlabs-music/music-generate', 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/ms/v1/run/elevenlabs/elevenlabs-music/music-generate",
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([
'input' => [
'prompt' => 'Mysterious jungle soundtrack.',
'output_format' => 'mp3_44100_128',
'music_length_ms' => 60000
]
]),
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/ms/v1/run/elevenlabs/elevenlabs-music/music-generate"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"Mysterious jungle soundtrack.\",\n \"output_format\": \"mp3_44100_128\",\n \"music_length_ms\": 60000\n }\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/ms/v1/run/elevenlabs/elevenlabs-music/music-generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"prompt\": \"Mysterious jungle soundtrack.\",\n \"output_format\": \"mp3_44100_128\",\n \"music_length_ms\": 60000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/ms/v1/run/elevenlabs/elevenlabs-music/music-generate")
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 \"input\": {\n \"prompt\": \"Mysterious jungle soundtrack.\",\n \"output_format\": \"mp3_44100_128\",\n \"music_length_ms\": 60000\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "ms-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"endpoint": "google/veo-3.1/text-to-video",
"model": "veo-3.1",
"mode": "text-to-video",
"created_at": "2023-11-07T05:31:56Z",
"error": {
"code": 500,
"message": "task failed"
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"elapsed_ms": 123,
"output": {
"audio": {
"url": "<string>",
"content_type": "<string>",
"file_name": "<string>"
}
}
}{
"task_id": "ms-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"endpoint": "google/veo-3.1/text-to-video",
"model": "veo-3.1",
"mode": "text-to-video",
"created_at": "2023-11-07T05:31:56Z",
"error": {
"code": 500,
"message": "task failed"
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"elapsed_ms": 123,
"output": {
"audio": {
"url": "<string>",
"content_type": "<string>",
"file_name": "<string>"
}
}
}{
"statusCode": 400,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 400,
"message": "<string>",
"error": "<string>"
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json
响应
Audio task (usually queued right after submit)
Async audio task
示例:
"ms-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
示例:
"google/veo-3.1/text-to-video"
示例:
"veo-3.1"
可用选项:
image, video, audio 示例:
"text-to-video"
可用选项:
queued, processing, succeeded, failed, timeout, canceled Show child attributes
Show child attributes
Normalized task output. Null while queued/processing; populated when status=succeeded.
Show child attributes
Show child attributes
⌘I