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

# 人声和乐器分离

> 将音乐音轨分割为人声和伴奏两个独立的部分，或者分离各种乐器的声音。

### **使用指南**

* 将平台生成的混音分离为人声、伴奏及单个乐器组件。
* 支持三种处理模式：
  * `separate_vocal` — 2 轨分离（人声 + 伴奏）
  * `split_stem` — 最多 12 轨分离
  * `split_stem_advanced` — 高级多音轨分离，支持指定特定乐器音轨
* 适用于卡拉 OK 制作、混音、采样提取或精细后期处理。
* 对人声与乐器层次分明的专业混音 AI 曲目效果最佳。
* **计费说明：** 每次调用消耗积分；**重复调用同一曲目会再次扣费**（无服务端缓存）。
* **价格：** 当前每次调用的积分消耗请查看 [**https://sunoapi.org/billing**](https://sunoapi.org/billing)。

### 分离模式详情

| **模式（<code>type</code>）** | **返回的 Stems**                                           | **典型用途**         | **积分消耗**  |
| :------------------------ | :------------------------------------------------------ | :--------------- | :-------- |
| `separate_vocal` *（默认）*   | **2 轨** — 人声 + 伴奏                                       | 快速去人声、卡拉 OK、基础混音 | **10 积分** |
| `split_stem`              | **最多 12 轨** — 人声、背景人声、鼓、贝斯、吉他、键盘、弦乐、铜管、木管、打击乐、合成器、FX/其他 | 进阶混音、重混、声音设计     | **50 积分** |
| `split_stem_advanced`     | **指定乐器轨道** — 通过 `stemName` 指定要分离的特定乐器                   | 精准提取特定乐器、专业后期制作  | **20 积分** |

### 参数参考

| **名称**        | **类型** | **说明**                                                                                                                   |
| :------------ | :----- | :----------------------------------------------------------------------------------------------------------------------- |
| `taskId`      | string | 音乐生成任务的唯一标识符。应为"生成音乐"或"延长音乐"接口返回的 taskId                                                                                 |
| `audioId`     | string | 要进行人声分离处理的特定音频轨道的唯一标识符。此 ID 在音乐生成完成后的回调数据中返回                                                                             |
| `type`        | string | 分离类型：`separate_vocal`（默认）、`split_stem` 或 `split_stem_advanced`                                                           |
| `stemName`    | string | 仅在 `type` 为 `split_stem_advanced` 时使用，用于指定要分离的特定音轨/乐器名称。支持的乐器包括：Lead Vocal、Drum Kit、Piano、Guitar、Bass、Synth、Percussion 等 |
| `callBackUrl` | string | 用于接收人声分离任务完成更新的 URL 地址。                                                                                                  |

### 开发者注意事项

* 所有返回的音频文件 URL 有效期为 **14 天**。
* 分离质量取决于原曲的复杂度和混音情况。
* `separate_vocal` 返回 **2 轨** — 人声 + 伴奏。
* `split_stem` 返回 **最多 12 条独立轨道** — 人声、背景人声、鼓、贝斯、吉他、键盘、弦乐、铜管、木管、打击乐、合成器、FX/其他。
* `split_stem_advanced` 返回指定乐器的独立轨道，需通过 `stemName` 参数指定具体乐器名称。
* **计费：** 每次请求都会扣费。重复提交同一曲目会 **再次扣除积分**（无服务端缓存）。


## OpenAPI

````yaml cn/suno-api/suno-api-cn.json POST /api/v1/vocal-removal/generate
openapi: 3.0.0
info:
  title: intro
  description: 这是生成音频的API接口文档
  version: 1.0.0
  contact:
    name: 技术支持
    email: support@sunoapi.org
servers:
  - url: https://api.sunoapi.org
    description: API 服务器
security:
  - BearerAuth: []
tags:
  - name: Music Generation
    description: 用于创建和管理音乐生成任务的接口
  - name: Lyrics Generation
    description: 用于歌词生成和管理的接口
  - name: WAV Conversion
    description: 用于将音乐转换为WAV格式的接口
  - name: Vocal Removal
    description: 用于从音乐轨道中移除人声的接口
  - name: Music Video Generation
    description: 用于生成MP4视频的接口
  - name: Account Management
    description: 用于账户和积分管理的接口
paths:
  /api/v1/vocal-removal/generate:
    post:
      summary: 分离音乐中的人声
      operationId: separate-vocals-from-music
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - taskId
                - audioId
                - stemName
                - callBackUrl
              properties:
                taskId:
                  type: string
                  description: 音乐生成任务的唯一标识符。应为"生成音乐"或"延长音乐"接口返回的taskId。
                  example: 5c79****be8e
                audioId:
                  type: string
                  description: 要进行人声分离处理的特定音频轨道的唯一标识符。此ID在音乐生成完成后的回调数据中返回。
                  example: e231****-****-****-****-****8cadc7dc
                type:
                  type: string
                  description: |-
                    分离类型。
                    - `separate_vocal`：分离人声和伴奏，生成人声轨道和伴奏轨道
                    - `split_stem`：分离各种乐器声音，生成多个乐器轨道
                    - `split_stem_advanced`：高级多音轨分离，支持指定特定乐器音轨，生成更精细的乐器轨道
                  enum:
                    - separate_vocal
                    - split_stem
                    - split_stem_advanced
                  default: separate_vocal
                  example: separate_vocal
                stemName:
                  type: string
                  description: 仅在 type 为 split_stem_advanced 时使用，用于指定要分离的特定音轨/乐器名称
                  enum:
                    - Lead Vocal
                    - Drum Kit
                    - Kick
                    - Snare
                    - Risers
                    - Bass
                    - Backing Vocals
                    - Piano
                    - Electric Guitar
                    - Percussion
                    - String Section
                    - Synth
                    - Acoustic Guitar
                    - Sound Effects
                    - Synth Pad
                    - Synth Bass
                    - Guitar
                    - Brass Section
                    - Organ
                    - Electronic Drum Kit
                    - Lead Electric Guitar
                    - Synth Keys
                    - Rhythm Electric Guitar
                    - Electric Piano
                    - Upright Bass
                    - Keyboards
                    - Distorted Electric Guitar
                    - Synth Strings
                    - Synth Lead
                    - Woodwinds
                    - Rhythm Acoustic Guitar
                    - Flute
                    - Harp
                    - Tambourine
                    - Trumpet
                    - Arpeggiator
                    - Accordion
                    - Fiddle
                    - Pedal Steel Guitar
                    - Synth Voice
                    - Violin
                    - Digital Piano
                    - Synth Brass
                    - Mandolin
                    - Choir
                    - Banjo
                    - Bells
                    - Clarinet
                    - Tenor Saxophone
                    - Trombone
                    - Shaker
                    - French Horn
                    - Glockenspiel
                    - Electric Bass
                    - Cello
                    - Timpani
                    - Harmonica
                    - Marimba
                    - Vibraphone
                    - Lap Steel Guitar
                    - Saxophone
                    - Orchestra
                    - Horns
                    - Cymbals
                    - Hand Clap
                    - Oboe
                    - Celesta
                    - Congas
                    - Drone
                    - Alto Saxophone
                    - Double Bass
                    - Ukulele
                    - Harpsichord
                    - Baritone Saxophone
                    - Xylophone
                    - Tuba
                    - Bass Guitar
                    - Whistle
                    - Lead Guitar
                    - Rhodes
                    - '808'
                    - Bongos
                    - Bassoon
                    - Cowbell
                    - Viola
                    - Sitar
                    - Steel Drums
                    - Piccolo
                    - Theremin
                    - Bagpipes
                    - Hi-Hat
                    - Music Box
                    - Melodica
                    - Tabla
                    - Koto
                    - Djembe
                    - Taiko
                    - Didgeridoo
                callBackUrl:
                  type: string
                  format: uri
                  description: 用于接收人声分离任务完成更新的URL地址。所有人声分离请求都需要此参数。
                  example: https://api.example.com/callback
              x-apidog-orders:
                - taskId
                - audioId
                - type
                - stemName
                - callBackUrl
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          taskId:
                            type: string
                            description: 任务ID，用于后续查询任务状态
                            example: 5c79****be8e
        '500':
          $ref: '#/components/responses/Error'
      callbacks:
        vocalRemovalGenerated:
          '{$request.body#/callBackUrl}':
            post:
              description: |-
                当人声分离生成完成时，系统会调用此回调通知结果。

                ### separate_vocal类型回调示例
                ```json
                {
                  "code": 200,
                  "data": {
                    "task_id": "3e63b4cc88d52611159371f6af5571e7",
                    "vocal_removal_info": {
                      "instrumental_url": "https://file.aiquickdraw.com/s/d92a13bf-c6f4-4ade-bb47-f69738435528_Instrumental.mp3",
                      "origin_url": "",
                      "vocal_url": "https://file.aiquickdraw.com/s/3d7021c9-fa8b-4eda-91d1-3b9297ddb172_Vocals.mp3"
                    }
                  },
                  "msg": "vocal Removal generated successfully."
                }
                ```

                ### split_stem类型回调示例
                ```json
                {
                  "code": 200,
                  "data": {
                    "task_id": "e649edb7abfd759285bd41a47a634b10",
                    "vocal_removal_info": {
                      "origin_url": "",
                      "backing_vocals_url": "https://file.aiquickdraw.com/s/aadc51a3-4c88-4c8e-a4c8-e867c539673d_Backing_Vocals.mp3",
                      "bass_url": "https://file.aiquickdraw.com/s/a3c2da5a-b364-4422-adb5-2692b9c26d33_Bass.mp3",
                      "brass_url": "https://file.aiquickdraw.com/s/334b2d23-0c65-4a04-92c7-22f828afdd44_Brass.mp3",
                      "drums_url": "https://file.aiquickdraw.com/s/ac75c5ea-ac77-4ad2-b7d9-66e140b78e44_Drums.mp3",
                      "fx_url": "https://file.aiquickdraw.com/s/a8822c73-6629-4089-8f2a-d19f41f0007d_FX.mp3",
                      "guitar_url": "https://file.aiquickdraw.com/s/064dd08e-d5d2-4201-9058-c5c40fb695b4_Guitar.mp3",
                      "keyboard_url": "https://file.aiquickdraw.com/s/adc934e0-df7d-45da-8220-1dba160d74e0_Keyboard.mp3",
                      "percussion_url": "https://file.aiquickdraw.com/s/0f70884d-047c-41f1-a6d0-7044618b7dc6_Percussion.mp3",
                      "strings_url": "https://file.aiquickdraw.com/s/49829425-a5b0-424e-857a-75d4c63a426b_Strings.mp3",
                      "synth_url": "https://file.aiquickdraw.com/s/56b2d94a-eb92-4d21-bc43-3460de0c8348_Synth.mp3",
                      "vocal_url": "https://file.aiquickdraw.com/s/07420749-29a2-4054-9b62-e6a6f8b90ccb_Vocals.mp3",
                      "woodwinds_url": "https://file.aiquickdraw.com/s/d81545b1-6f94-4388-9785-1aaa6ecabb02_Woodwinds.mp3"
                    }
                  },
                  "msg": "vocal Removal generated successfully."
                }
                ```
              requestBody:
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        code:
                          type: integer
                          description: 状态码
                          example: 200
                        msg:
                          type: string
                          description: 返回消息
                          example: vocal Removal generated successfully.
                        data:
                          type: object
                          properties:
                            task_id:
                              type: string
                              description: 任务ID
                            vocal_removal_info:
                              type: object
                              properties:
                                instrumental_url:
                                  type: string
                                  description: 伴奏部分音频URL（separate_vocal类型时存在）
                                origin_url:
                                  type: string
                                  description: 原始音频URL
                                vocal_url:
                                  type: string
                                  description: 人声部分音频URL
                                backing_vocals_url:
                                  type: string
                                  description: 和声部分音频URL（split_stem类型时存在）
                                drums_url:
                                  type: string
                                  description: 鼓声部分音频URL
                                bass_url:
                                  type: string
                                  description: 贝斯部分音频URL
                                guitar_url:
                                  type: string
                                  description: 吉他部分音频URL
                                keyboard_url:
                                  type: string
                                  description: 键盘部分音频URL（split_stem类型时存在）
                                percussion_url:
                                  type: string
                                  description: 打击乐部分音频URL（split_stem类型时存在）
                                strings_url:
                                  type: string
                                  description: 弦乐部分音频URL（split_stem类型时存在）
                                synth_url:
                                  type: string
                                  description: 合成器部分音频URL（split_stem类型时存在）
                                fx_url:
                                  type: string
                                  description: 音效部分音频URL（split_stem类型时存在）
                                brass_url:
                                  type: string
                                  description: 铜管乐部分音频URL（split_stem类型时存在）
                                woodwinds_url:
                                  type: string
                                  description: 木管乐部分音频URL（split_stem类型时存在）
              responses:
                '200':
                  description: 回调接收成功
              method: post
              type: path
            path: '{$request.body#/callBackUrl}'
components:
  schemas:
    ApiResponse:
      type: object
      properties:
        code:
          type: integer
          description: |-
            # 状态码说明

            - ✅ 200 - 请求成功
            - ⚠️ 400 - 参数错误
            - ⚠️ 401 - 没有访问权限
            - ⚠️ 404 - 请求方式或者路径错误
            - ⚠️ 405 - 调用超过限制
            - ⚠️ 413 - 主题或者prompt过长
            - ⚠️ 429 - 积分不足
            - ⚠️ 430 - 您的调用频率过高，请稍后再试。
            - ⚠️ 455 - 网站维护
            - ❌ 500 - 服务器异常
          example: 200
          enum:
            - 200
            - 400
            - 401
            - 404
            - 405
            - 413
            - 429
            - 430
            - 455
            - 500
        msg:
          type: string
          description: 当 code != 200 时，展示错误信息
          example: success
  responses:
    Error:
      description: 服务器异常
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |-
        # 🔑 API 认证说明

        所有接口都需要通过 Bearer Token 方式进行认证。

        ## 获取 API Key

        1. 访问 [API Key 管理页面](https://sunoapi.org/api-key) 获取您的 API Key

        ## 使用方式

        在请求头中添加：

        ```
        Authorization: Bearer YOUR_API_KEY
        ```

        > **⚠️ 注意：**
        > - 请妥善保管您的 API Key，不要泄露给他人
        > - 如果怀疑 API Key 泄露，请立即在管理页面重置

````