> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mountsea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 提交音频任务

## 接口地址

```
POST https://api.mountsea.ai/hub/v1/audio
Authorization: Bearer <your-api-key>
Content-Type: application/json
```

**请求结构**

```json theme={null}
{
  "model": "<model-id>",   // 必填 — 从下方模型参考中选取
  "input": { ... }         // 模型专属参数 — 展开对应模型查看详情
}
```

**响应**

```json theme={null}
{ "taskId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }
```

轮询 `GET /hub/v1/tasks/:taskId`，直到 `ready = true`。

***

## 模型参考（Model Reference）

<Tip>
  点击下方**能力分类标签**，再点击**模型名称**即可展开参数表与可直接复制的请求示例。
</Tip>

基于 ElevenLabs 的音乐生成。展开模型即可查看参数表与请求示例。

<Tabs>
  <Tab title="音乐生成 · 1">
    <AccordionGroup>
      <Accordion title="elevenlabs-music — ElevenLabs Music (ElevenLabs)" icon="cube">
        ElevenLabs Music: AI music generation from text description.

        | Parameter                    | Type      | Req | Default         | Values / Range                                                                                                                                                                                                                                                               | Description                                                                                                                                                                                                                                                                                                                                  |
        | ---------------------------- | --------- | --- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
        | `prompt`                     | `string`  |     | –               | –                                                                                                                                                                                                                                                                            | The text prompt describing the music to generate. Use this for simple text-to-music generation. Mutually exclusive with composition\_plan.                                                                                                                                                                                                   |
        | `output_format`              | `string`  |     | `mp3_44100_128` | `mp3_22050_32` `mp3_44100_32` `mp3_44100_64` `mp3_44100_96` `mp3_44100_128` `mp3_44100_192` `pcm_8000` `pcm_16000` `pcm_22050` `pcm_24000` `pcm_44100` `pcm_48000` `ulaw_8000` `alaw_8000` `opus_48000_32` `opus_48000_64` `opus_48000_96` `opus_48000_128` `opus_48000_192` | Output audio format. Encoded as codec\_sampleRate\_bitrate (e.g. mp3\_44100\_128 = MP3 at 44.1kHz / 128kbps). Note: mp3\_44100\_192 requires Creator tier; pcm\_44100 requires Pro tier.                                                                                                                                                     |
        | `music_length_ms`            | `integer` | ✓   | –               | `3000`–`600000`                                                                                                                                                                                                                                                              | Duration of the generated music in milliseconds. Required for billing. Range: 3000ms (3s) to 600000ms (10min). Use with prompt only; when using composition\_plan, total duration is determined by the sum of section duration\_ms values.                                                                                                   |
        | `composition_plan`           | `object`  |     | –               | –                                                                                                                                                                                                                                                                            | Advanced: structured composition plan with sections, styles and lyrics. Each section requires section\_name, positive\_local\_styles\[], negative\_local\_styles\[], duration\_ms (3000-120000ms), and lines\[]. Also requires positive\_global\_styles\[] and negative\_global\_styles\[] at the top level. Mutually exclusive with prompt. |
        | `force_instrumental`         | `boolean` |     | –               | –                                                                                                                                                                                                                                                                            | If true, guarantees the generated song is instrumental (no vocals). Can only be used with prompt.                                                                                                                                                                                                                                            |
        | `respect_sections_durations` | `boolean` |     | `true`          | –                                                                                                                                                                                                                                                                            | Controls how strictly section durations in the composition\_plan are enforced. Only effective with composition\_plan. When true, each section's duration\_ms is precisely respected; when false, the model may adjust durations for better quality while preserving total song length.                                                       |

        <details>
          <summary>Example request body</summary>

          ```json theme={null}
          {
            "model": "elevenlabs-music",
            "input": {
              "prompt": "Mysterious original soundtrack, themes of jungle, rainforest, nature, woodwinds, busy rhythmic tribal percussion.",
              "output_format": "mp3_44100_128",
              "music_length_ms": 60000
            }
          }
          ```
        </details>
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>
