创建作曲计划(不消耗 credits)
curl --request POST \
--url https://api.mountsea.ai/eleven/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "An upbeat pop song about summer adventures",
"musicLengthMs": 180000,
"sourceCompositionPlan": {
"positive_global_styles": [
"epic orchestral",
"cinematic"
],
"negative_global_styles": [
"lo-fi",
"acoustic"
],
"sections": [
{
"section_name": "Verse",
"positive_local_styles": [
"soft piano",
"building tension"
],
"negative_local_styles": [
"heavy drums"
],
"duration_ms": 15000,
"lines": [
"First line of lyrics",
"Second line"
]
}
]
},
"model": "music_v1"
}
'import requests
url = "https://api.mountsea.ai/eleven/plan"
payload = {
"prompt": "An upbeat pop song about summer adventures",
"musicLengthMs": 180000,
"sourceCompositionPlan": {
"positive_global_styles": ["epic orchestral", "cinematic"],
"negative_global_styles": ["lo-fi", "acoustic"],
"sections": [
{
"section_name": "Verse",
"positive_local_styles": ["soft piano", "building tension"],
"negative_local_styles": ["heavy drums"],
"duration_ms": 15000,
"lines": ["First line of lyrics", "Second line"]
}
]
},
"model": "music_v1"
}
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({
prompt: 'An upbeat pop song about summer adventures',
musicLengthMs: 180000,
sourceCompositionPlan: {
positive_global_styles: ['epic orchestral', 'cinematic'],
negative_global_styles: ['lo-fi', 'acoustic'],
sections: [
{
section_name: 'Verse',
positive_local_styles: ['soft piano', 'building tension'],
negative_local_styles: ['heavy drums'],
duration_ms: 15000,
lines: ['First line of lyrics', 'Second line']
}
]
},
model: 'music_v1'
})
};
fetch('https://api.mountsea.ai/eleven/plan', 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/plan",
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([
'prompt' => 'An upbeat pop song about summer adventures',
'musicLengthMs' => 180000,
'sourceCompositionPlan' => [
'positive_global_styles' => [
'epic orchestral',
'cinematic'
],
'negative_global_styles' => [
'lo-fi',
'acoustic'
],
'sections' => [
[
'section_name' => 'Verse',
'positive_local_styles' => [
'soft piano',
'building tension'
],
'negative_local_styles' => [
'heavy drums'
],
'duration_ms' => 15000,
'lines' => [
'First line of lyrics',
'Second line'
]
]
]
],
'model' => 'music_v1'
]),
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/plan"
payload := strings.NewReader("{\n \"prompt\": \"An upbeat pop song about summer adventures\",\n \"musicLengthMs\": 180000,\n \"sourceCompositionPlan\": {\n \"positive_global_styles\": [\n \"epic orchestral\",\n \"cinematic\"\n ],\n \"negative_global_styles\": [\n \"lo-fi\",\n \"acoustic\"\n ],\n \"sections\": [\n {\n \"section_name\": \"Verse\",\n \"positive_local_styles\": [\n \"soft piano\",\n \"building tension\"\n ],\n \"negative_local_styles\": [\n \"heavy drums\"\n ],\n \"duration_ms\": 15000,\n \"lines\": [\n \"First line of lyrics\",\n \"Second line\"\n ]\n }\n ]\n },\n \"model\": \"music_v1\"\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/plan")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"An upbeat pop song about summer adventures\",\n \"musicLengthMs\": 180000,\n \"sourceCompositionPlan\": {\n \"positive_global_styles\": [\n \"epic orchestral\",\n \"cinematic\"\n ],\n \"negative_global_styles\": [\n \"lo-fi\",\n \"acoustic\"\n ],\n \"sections\": [\n {\n \"section_name\": \"Verse\",\n \"positive_local_styles\": [\n \"soft piano\",\n \"building tension\"\n ],\n \"negative_local_styles\": [\n \"heavy drums\"\n ],\n \"duration_ms\": 15000,\n \"lines\": [\n \"First line of lyrics\",\n \"Second line\"\n ]\n }\n ]\n },\n \"model\": \"music_v1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/eleven/plan")
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 \"prompt\": \"An upbeat pop song about summer adventures\",\n \"musicLengthMs\": 180000,\n \"sourceCompositionPlan\": {\n \"positive_global_styles\": [\n \"epic orchestral\",\n \"cinematic\"\n ],\n \"negative_global_styles\": [\n \"lo-fi\",\n \"acoustic\"\n ],\n \"sections\": [\n {\n \"section_name\": \"Verse\",\n \"positive_local_styles\": [\n \"soft piano\",\n \"building tension\"\n ],\n \"negative_local_styles\": [\n \"heavy drums\"\n ],\n \"duration_ms\": 15000,\n \"lines\": [\n \"First line of lyrics\",\n \"Second line\"\n ]\n }\n ]\n },\n \"model\": \"music_v1\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}ElevenLabs
Create Composition Plan
Generate a structured composition plan from a text prompt
POST
/
eleven
/
plan
创建作曲计划(不消耗 credits)
curl --request POST \
--url https://api.mountsea.ai/eleven/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "An upbeat pop song about summer adventures",
"musicLengthMs": 180000,
"sourceCompositionPlan": {
"positive_global_styles": [
"epic orchestral",
"cinematic"
],
"negative_global_styles": [
"lo-fi",
"acoustic"
],
"sections": [
{
"section_name": "Verse",
"positive_local_styles": [
"soft piano",
"building tension"
],
"negative_local_styles": [
"heavy drums"
],
"duration_ms": 15000,
"lines": [
"First line of lyrics",
"Second line"
]
}
]
},
"model": "music_v1"
}
'import requests
url = "https://api.mountsea.ai/eleven/plan"
payload = {
"prompt": "An upbeat pop song about summer adventures",
"musicLengthMs": 180000,
"sourceCompositionPlan": {
"positive_global_styles": ["epic orchestral", "cinematic"],
"negative_global_styles": ["lo-fi", "acoustic"],
"sections": [
{
"section_name": "Verse",
"positive_local_styles": ["soft piano", "building tension"],
"negative_local_styles": ["heavy drums"],
"duration_ms": 15000,
"lines": ["First line of lyrics", "Second line"]
}
]
},
"model": "music_v1"
}
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({
prompt: 'An upbeat pop song about summer adventures',
musicLengthMs: 180000,
sourceCompositionPlan: {
positive_global_styles: ['epic orchestral', 'cinematic'],
negative_global_styles: ['lo-fi', 'acoustic'],
sections: [
{
section_name: 'Verse',
positive_local_styles: ['soft piano', 'building tension'],
negative_local_styles: ['heavy drums'],
duration_ms: 15000,
lines: ['First line of lyrics', 'Second line']
}
]
},
model: 'music_v1'
})
};
fetch('https://api.mountsea.ai/eleven/plan', 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/plan",
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([
'prompt' => 'An upbeat pop song about summer adventures',
'musicLengthMs' => 180000,
'sourceCompositionPlan' => [
'positive_global_styles' => [
'epic orchestral',
'cinematic'
],
'negative_global_styles' => [
'lo-fi',
'acoustic'
],
'sections' => [
[
'section_name' => 'Verse',
'positive_local_styles' => [
'soft piano',
'building tension'
],
'negative_local_styles' => [
'heavy drums'
],
'duration_ms' => 15000,
'lines' => [
'First line of lyrics',
'Second line'
]
]
]
],
'model' => 'music_v1'
]),
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/plan"
payload := strings.NewReader("{\n \"prompt\": \"An upbeat pop song about summer adventures\",\n \"musicLengthMs\": 180000,\n \"sourceCompositionPlan\": {\n \"positive_global_styles\": [\n \"epic orchestral\",\n \"cinematic\"\n ],\n \"negative_global_styles\": [\n \"lo-fi\",\n \"acoustic\"\n ],\n \"sections\": [\n {\n \"section_name\": \"Verse\",\n \"positive_local_styles\": [\n \"soft piano\",\n \"building tension\"\n ],\n \"negative_local_styles\": [\n \"heavy drums\"\n ],\n \"duration_ms\": 15000,\n \"lines\": [\n \"First line of lyrics\",\n \"Second line\"\n ]\n }\n ]\n },\n \"model\": \"music_v1\"\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/plan")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"An upbeat pop song about summer adventures\",\n \"musicLengthMs\": 180000,\n \"sourceCompositionPlan\": {\n \"positive_global_styles\": [\n \"epic orchestral\",\n \"cinematic\"\n ],\n \"negative_global_styles\": [\n \"lo-fi\",\n \"acoustic\"\n ],\n \"sections\": [\n {\n \"section_name\": \"Verse\",\n \"positive_local_styles\": [\n \"soft piano\",\n \"building tension\"\n ],\n \"negative_local_styles\": [\n \"heavy drums\"\n ],\n \"duration_ms\": 15000,\n \"lines\": [\n \"First line of lyrics\",\n \"Second line\"\n ]\n }\n ]\n },\n \"model\": \"music_v1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/eleven/plan")
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 \"prompt\": \"An upbeat pop song about summer adventures\",\n \"musicLengthMs\": 180000,\n \"sourceCompositionPlan\": {\n \"positive_global_styles\": [\n \"epic orchestral\",\n \"cinematic\"\n ],\n \"negative_global_styles\": [\n \"lo-fi\",\n \"acoustic\"\n ],\n \"sections\": [\n {\n \"section_name\": \"Verse\",\n \"positive_local_styles\": [\n \"soft piano\",\n \"building tension\"\n ],\n \"negative_local_styles\": [\n \"heavy drums\"\n ],\n \"duration_ms\": 15000,\n \"lines\": [\n \"First line of lyrics\",\n \"Second line\"\n ]\n }\n ]\n },\n \"model\": \"music_v1\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}Generate a structured composition plan from a text prompt. The plan includes sections with styles, durations, and lyrics — ready to be customized and passed to Generate Music.
This endpoint is free and does not consume credits. Use it to preview and customize the composition structure before generating music.
Optionally provide a
sourceCompositionPlan as a reference to guide the new plan’s structure. The musicLengthMs parameter is optional here — if omitted, the AI determines the length.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
文字提示
Example:
"An upbeat pop song about summer adventures"
目标长度(毫秒),范围 3000-600000
Required range:
3000 <= x <= 600000Example:
180000
参考的已有作曲计划
Show child attributes
Show child attributes
模型 ID
Available options:
music_v1, music_v2, eleven_multilingual_v2, eleven_turbo_v2_5, eleven_flash_v2_5, eleven_v3 Response
200 - application/json
任务创建成功
任务 ID,用于后续查询结果
⌘I