创建作曲计划(不消耗 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
创建作曲计划
从文本提示生成结构化作曲计划
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>"
}从文本提示生成结构化的作曲计划。计划包含段落、风格、时长和歌词 — 可直接自定义后传给生成音乐。
此端点免费,不消耗积分。用它来预览和自定义作曲结构,然后再生成音乐。
可选提供
sourceCompositionPlan 作为参考来引导新计划的结构。musicLengthMs 参数在此可选 — 不传时由 AI 自动确定长度。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json
文字提示
示例:
"An upbeat pop song about summer adventures"
目标长度(毫秒),范围 3000-600000
必填范围:
3000 <= x <= 600000示例:
180000
参考的已有作曲计划
Show child attributes
Show child attributes
模型 ID
可用选项:
music_v1, music_v2, eleven_multilingual_v2, eleven_turbo_v2_5, eleven_flash_v2_5, eleven_v3 响应
200 - application/json
任务创建成功
任务 ID,用于后续查询结果
⌘I