跳转到主要内容
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"
}
'
{
  "taskId": "<string>"
}
从文本提示生成结构化的作曲计划。计划包含段落、风格、时长和歌词 — 可直接自定义后传给生成音乐
此端点免费,不消耗积分。用它来预览和自定义作曲结构,然后再生成音乐。
可选提供 sourceCompositionPlan 作为参考来引导新计划的结构。musicLengthMs 参数在此可选 — 不传时由 AI 自动确定长度。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
prompt
string
必填

文字提示

示例:

"An upbeat pop song about summer adventures"

musicLengthMs
number

目标长度(毫秒),范围 3000-600000

必填范围: 3000 <= x <= 600000
示例:

180000

sourceCompositionPlan
object

参考的已有作曲计划

model
enum<string>
默认值:music_v1

模型 ID

可用选项:
music_v1

响应

200 - application/json

任务创建成功

taskId
string
必填

任务 ID,用于后续查询结果