> ## 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 视频

<Note>
  **国内用户请注意：** 中国大陆用户请使用 `https://toapis.cn` 作为接口地址（Base URL）。
</Note>

```
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.