> ## 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` か `format` のどちらか必須)</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.