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

# ステム分離とトラック追加

> stems/stemsAll 分離、addStem/addVocals/addInstrumental トラック生成

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

## ステム分離

| operation | 説明 | 料金 |
| - | - | - |
| `stems` | ボーカル/伴奏の2分割 | \$0.10 |
| `stemsAll` | 全楽器を個別分離 | \$0.24 |

各トラックは `result.music[]` の `audio_url` として返り、CDN にミラー済みです。

```bash theme={null}
curl --request POST \
  --url https://toapis.com/v1/music/generations/stemsAll \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"model":"suno","task_id":"tsk_aud_xxx"}'
```

## トラック追加(各 $0.05,Max $0.10)

<Warning>`addVocals`/`addInstrumental`/`addStem` の `task_id` は `uploadTask` 生成物のみ。</Warning>

| operation | 説明 |
| - | - |
| `addVocals` | アップロード素材にボーカル生成 |
| `addInstrumental` | アップロード素材に伴奏生成 |
| `addStem` | 楽器トラックを 1 本追加 |

<ParamField body="gpt_description" type="string">目標説明(custom=false 時必須)</ParamField>

<ParamField body="custom" type="boolean" />

<ParamField body="prompt" type="string">custom=true 時の歌詞</ParamField>
<ParamField body="max_mode" type="boolean">Max ティア</ParamField>

```bash theme={null}
curl --request POST \
  --url https://toapis.com/v1/music/generations/addVocals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"model":"suno","task_id":"tsk_aud_upload_task","gpt_description":"add dreamy female vocals"}'
```

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