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

# 分析與匯出

> midi 音符轉譜,bpm 分析,alignedLyrics 歌詞時間軸,download/wav 下載,generateMp4 影片

```
POST https://toapis.com/v1/music/generations/{operation}
```

<ParamField body="model" type="string" required>固定 `"suno"`</ParamField>
<ParamField body="task_id" type="string" required>源任務 ID</ParamField>
<ParamField body="audio_index" type="number">源曲目序號</ParamField>

## midi — MIDI 轉譜(\$0.05)

將歌曲轉為分軌 MIDI 音符資料。`result.instruments[]` 返回每軌樂器:

<ResponseField name="instruments" type="array">
  <Expandable title="樂器軌">
    <ResponseField name="name" type="string">樂器名,如 `Electric Piano 1`</ResponseField>
    <ResponseField name="program" type="integer">General MIDI 音色號</ResponseField>
    <ResponseField name="is_drum" type="boolean">是否打擊軌(打擊軌的 pitch 為鼓件編號)</ResponseField>

    <ResponseField name="notes" type="array">
      音符列表:`start`/`end`(秒)、`pitch`(MIDI 音高 0-127)、`velocity`(0-1 力度)
    </ResponseField>
  </Expandable>
</ResponseField>

## bpm — BPM 分析(\$0.0008)

返回 `result` 中的 `avg_bpm` / `max_bpm` / `min_bpm`。

## alignedLyrics — 歌詞時間軸(\$0.0008)

返回逐句/逐詞的時間軸對齊資料。

## download — 多格式下載(\$0.0016)

<ParamField body="formats" type="array">格式列表:`mp3` / `m4a` / `wav`</ParamField>
<ParamField body="format" type="string">單格式(與 `formats` 二選一,至少給一個)</ParamField>

返回 `result.files[]`,檔案已鏡像本站 CDN。

## generateMp4 — 歌詞影片(\$0.004)

生成帶歌詞字幕的 MP4,返回 `result.videoUrl`(已鏡像 CDN)。

## wav — 下載 WAV(\$0.0016,舊版)

<Tip>已廢棄,建議使用 `download` 並指定 `format: "wav"`。</Tip>

## Response

<ResponseField name="task_id" type="string">任務 ID</ResponseField>
<ResponseField name="status" type="string">`submitted`</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.