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

# 获取音频分离详情

> 获取人声和乐器分离任务的详细信息，包括状态和下载链接。

### 状态说明

* PENDING: 任务等待处理中
* SUCCESS: 人声分离成功完成
* CREATE\_TASK\_FAILED: 创建分离任务失败
* GENERATE\_AUDIO\_FAILED: 执行人声分离失败
* CALLBACK\_EXCEPTION: 回调过程中发生错误

### 返回数据说明

根据您在生成时选择的分离类型，响应中包含的音频URL字段会有所不同：

#### separate\_vocal 类型返回字段

当状态为 SUCCESS 时，响应包含以下下载URL：

* `originUrl`: 原始混合音轨
* `instrumentalUrl`: 无人声的伴奏音轨
* `vocalUrl`: 仅包含人声的音轨

#### split\_stem 类型返回字段

当状态为 SUCCESS 时，响应包含以下下载URL：

* `originUrl`: 原始混合音轨
* `vocalUrl`: 仅包含人声的音轨
* `backingVocalsUrl`: 仅包含和声的音轨
* `drumsUrl`: 仅包含鼓声的音轨
* `bassUrl`: 仅包含贝斯的音轨
* `guitarUrl`: 仅包含吉他的音轨
* `keyboardUrl`: 仅包含键盘的音轨
* `percussionUrl`: 仅包含打击乐的音轨
* `stringsUrl`: 仅包含弦乐的音轨
* `synthUrl`: 仅包含合成器的音轨
* `fxUrl`: 仅包含音效的音轨
* `brassUrl`: 仅包含铜管乐的音轨
* `woodwindsUrl`: 仅包含木管乐的音轨

### 开发者说明

* 使用此接口检查分离状态，替代等待回调
* 响应中包含任务创建和完成时间
* 不同的分离类型返回不同的音频字段组合
* 仅当任务成功完成时才会返回音频URL
* 音频文件URL具有时效性，建议及时下载保存
* `separate_vocal` 类型返回 `instrumentalUrl` 和 `vocalUrl` 字段，其他乐器字段为 null
* `split_stem` 类型返回详细的乐器分离字段，`instrumentalUrl` 为 null


## OpenAPI

````yaml cn/suno-api/suno-api-cn.json GET /api/v1/vocal-removal/record-info
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/record-info:
    get:
      summary: 获取人声分离详情
      operationId: get-vocal-separation-details
      parameters:
        - in: query
          name: taskId
          description: 从 '分离音乐中的人声' 接口返回的任务ID。用于获取特定人声分离任务的详细信息，包括所有分离音频组件的下载URL。
          required: true
          example: 5e72****97c7
          schema:
            type: string
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          taskId:
                            type: string
                            description: 任务ID
                          musicId:
                            type: string
                            description: 被处理进行人声分离的源音乐音轨ID
                          musicIndex:
                            type: integer
                            description: 歌曲索引0或者1
                            example: 0
                          callbackUrl:
                            type: string
                            description: 人声分离请求中提供的回调URL
                          completeTime:
                            type: string
                            description: 分离完成的时间戳
                            format: date-time
                          response:
                            type: object
                            properties:
                              id:
                                type: string
                                nullable: true
                                description: 响应ID
                              originUrl:
                                type: string
                                description: 原始音频URL
                              originData:
                                type: array
                                description: 分离后的音频轨道信息数组
                                items:
                                  type: object
                                  properties:
                                    duration:
                                      type: number
                                      description: 音频时长（秒）
                                      example: 339.8
                                    audio_url:
                                      type: string
                                      format: uri
                                      description: 分离后的音频轨道URL
                                      example: https://example.mp3
                                    stem_type_group_name:
                                      type: string
                                      description: >-
                                        轨道类型组名称（例如：Vocals、Instrumental、Drums、Bass等）
                                      example: Vocals
                                    id:
                                      type: string
                                      description: 音频轨道的唯一标识符。此ID可用作MIDI生成接口中的audioId参数。
                                      example: 8ca376e7-2693-xxxx-08aaf2c6dd27
                              instrumentalUrl:
                                type: string
                                description: 伴奏部分音频URL（separate_vocal类型时存在）
                              vocalUrl:
                                type: string
                                description: 人声部分音频URL
                              backingVocalsUrl:
                                type: string
                                description: 和声部分音频URL（split_stem类型时存在）
                              drumsUrl:
                                type: string
                                description: 鼓声部分音频URL
                              bassUrl:
                                type: string
                                description: 贝斯部分音频URL
                              guitarUrl:
                                type: string
                                description: 吉他部分音频URL
                              keyboardUrl:
                                type: string
                                description: 键盘部分音频URL（split_stem类型时存在）
                              percussionUrl:
                                type: string
                                description: 打击乐部分音频URL（split_stem类型时存在）
                              stringsUrl:
                                type: string
                                description: 弦乐部分音频URL（split_stem类型时存在）
                              synthUrl:
                                type: string
                                description: 合成器部分音频URL（split_stem类型时存在）
                              fxUrl:
                                type: string
                                description: 音效部分音频URL（split_stem类型时存在）
                              brassUrl:
                                type: string
                                description: 铜管乐部分音频URL（split_stem类型时存在）
                              woodwindsUrl:
                                type: string
                                description: 木管乐部分音频URL（split_stem类型时存在）
                          successFlag:
                            type: string
                            description: 人声分离任务的当前状态
                            enum:
                              - PENDING
                              - SUCCESS
                              - CREATE_TASK_FAILED
                              - GENERATE_AUDIO_FAILED
                              - CALLBACK_EXCEPTION
                          createTime:
                            type: string
                            description: 创建时间
                            format: date-time
                          errorCode:
                            type: number
                            description: 错误码，仅当任务失败时有值
                          errorMessage:
                            type: string
                            description: 错误信息，仅当任务失败时有值
              examples:
                separate_vocal_type:
                  summary: separate_vocal类型查询详情示例
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 3e63b4cc88d52611159371f6af5571e7
                      musicId: 376c687e-d439-42c1-b1e4-bcb43b095ec2
                      musicIndex: 0
                      callbackUrl: >-
                        https://57312fc2e366.ngrok-free.app/api/v1/vocal-removal/test
                      completeTime: 1753782937000
                      response:
                        id: null
                        originUrl: null
                        originData:
                          - duration: 245.6
                            audio_url: https://example001.mp3
                            stem_type_group_name: Vocals
                            id: 3d7021c9-fa8b-4eda-91d1-3b9297ddb172
                          - duration: 245.6
                            audio_url: https://example002.mp3
                            stem_type_group_name: Instrumental
                            id: d92a13bf-c6f4-4ade-bb47-f69738435528
                        instrumentalUrl: >-
                          https://file.aiquickdraw.com/s/d92a13bf-c6f4-4ade-bb47-f69738435528_Instrumental.mp3
                        vocalUrl: >-
                          https://file.aiquickdraw.com/s/3d7021c9-fa8b-4eda-91d1-3b9297ddb172_Vocals.mp3
                        backingVocalsUrl: null
                        drumsUrl: null
                        bassUrl: null
                        guitarUrl: null
                        keyboardUrl: null
                        percussionUrl: null
                        stringsUrl: null
                        synthUrl: null
                        fxUrl: null
                        brassUrl: null
                        woodwindsUrl: null
                      successFlag: SUCCESS
                      createTime: 1753782854000
                      errorCode: null
                      errorMessage: null
                split_stem_type:
                  summary: split_stem类型查询详情示例
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: e649edb7abfd759285bd41a47a634b10
                      musicId: 376c687e-d439-42c1-b1e4-bcb43b095ec2
                      musicIndex: 0
                      callbackUrl: >-
                        https://57312fc2e366.ngrok-free.app/api/v1/vocal-removal/test
                      completeTime: 1753782459000
                      response:
                        id: null
                        originUrl: null
                        originData:
                          - duration: 312.4
                            audio_url: https://example001.mp3
                            stem_type_group_name: Keyboard
                            id: adc934e0-fa7d-45da-da20-1dba160d74e0
                          - duration: 312.4
                            audio_url: https://example002.mp3
                            stem_type_group_name: Percussion
                            id: 0f70884d-047c-41f1-a6d0-7023js8b7dc6
                          - duration: 312.4
                            audio_url: https://example003.mp3
                            stem_type_group_name: Strings
                            id: 49829425-a5b0-424e-857a-75d4233a426b
                          - duration: 312.4
                            audio_url: https://example004.mp3
                            stem_type_group_name: Synth
                            id: 56b2d94a-eb92-4d21-bc43-346024we8348
                        instrumentalUrl: null
                        vocalUrl: >-
                          https://file.aiquickdraw.com/s/07420749-29a2-4054-9b62-e6a6f8b90ccb_Vocals.mp3
                        backingVocalsUrl: >-
                          https://file.aiquickdraw.com/s/aadc51a3-4c88-4c8e-a4c8-e867c539673d_Backing_Vocals.mp3
                        drumsUrl: >-
                          https://file.aiquickdraw.com/s/ac75c5ea-ac77-4ad2-b7d9-66e140b78e44_Drums.mp3
                        bassUrl: >-
                          https://file.aiquickdraw.com/s/a3c2da5a-b364-4422-adb5-2692b9c26d33_Bass.mp3
                        guitarUrl: >-
                          https://file.aiquickdraw.com/s/064dd08e-d5d2-4201-9058-c5c40fb695b4_Guitar.mp3
                        keyboardUrl: >-
                          https://file.aiquickdraw.com/s/adc934e0-df7d-45da-8220-1dba160d74e0_Keyboard.mp3
                        percussionUrl: >-
                          https://file.aiquickdraw.com/s/0f70884d-047c-41f1-a6d0-7044618b7dc6_Percussion.mp3
                        stringsUrl: >-
                          https://file.aiquickdraw.com/s/49829425-a5b0-424e-857a-75d4c63a426b_Strings.mp3
                        synthUrl: >-
                          https://file.aiquickdraw.com/s/56b2d94a-eb92-4d21-bc43-3460de0c8348_Synth.mp3
                        fxUrl: >-
                          https://file.aiquickdraw.com/s/a8822c73-6629-4089-8f2a-d19f41f0007d_FX.mp3
                        brassUrl: >-
                          https://file.aiquickdraw.com/s/334b2d23-0c65-4a04-92c7-22f828afdd44_Brass.mp3
                        woodwindsUrl: >-
                          https://file.aiquickdraw.com/s/d81545b1-6f94-4388-9785-1aaa6ecabb02_Woodwinds.mp3
                      successFlag: SUCCESS
                      createTime: 1753782327000
                      errorCode: null
                      errorMessage: null
        '500':
          $ref: '#/components/responses/Error'
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 泄露，请立即在管理页面重置

````