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

# 人声分离

> 从成曲里分离出主人声，或指定某一条乐器轨。

> [!TIP]
>
> 也可以用统一任务接口 `POST /v1/task/submit` 提交：`model` 填 `suno/stems`，参数放进 `input`。两种写法效果与计费完全一样。

> [accordion] 任务结果
>
> 任务成功后，查询结果里产物的格式
>
> 任务成功后，`data.musics` 里是产出的音轨。
>
> ```json theme={null}
> {
>   "code": "success",
>   "data": {
>     "task_id": "5adac6ee-...",
>     "action": "stems",
>     "model": "suno/stems",
>     "status": "SUCCESS",
>     "progress": "100%",
>     "submit_time": 1757800000000,
>     "finish_time": 1757800120000,
>     "musics": [
>       {
>         "music_id": "89b20862-...",
>         "title": "Rain on Tin Roof",
>         "tags": "lo-fi piano",
>         "audio_url": "https://...",
>         "image_url": "https://...",
>         "duration": 187.56
>       }
>     ]
>   }
> }
> ```
>
> **music\_id** `string` *required*
>
> 曲目 ID。续写、翻唱、分轨、导出等后续操作都填它。
>
> **title** `string`
>
> 标题。
>
> **tags** `string`
>
> 风格标签。
>
> **lyrics** `string`
>
> 歌词，纯伴奏没有这个字段。
>
> **audio\_url** `string`
>
> 音频地址，可直接下载。
>
> **image\_url** `string`
>
> 封面图地址。
>
> **image\_large\_url** `string`
>
> 大尺寸封面图地址。
>
> **video\_url** `string`
>
> 视频地址，没有视频时不返回。
>
> **duration** `number`
>
> 时长，单位秒。


## OpenAPI

````yaml cn/openapi/suno.json POST /suno/v2/stems
openapi: 3.1.0
info:
  title: Suno API
  version: 1.0.0
  description: Suno 接口
servers:
  - url: https://api.ephone.ai
security:
  - bearerAuth: []
paths:
  /suno/v2/stems:
    post:
      summary: 人声分离
      description: 从成曲里分离出主人声，或指定某一条乐器轨。
      operationId: suno_stems
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                audio_format:
                  type: string
                  enum:
                    - mp3
                    - m4a
                    - wav
                  description: >-
                    **输出格式**：成品音频的格式，不填默认 mp3。可选值：`mp3` MP3（通用）；`m4a` M4A；`wav`
                    WAV（无损）。
                music_id:
                  type: string
                  description: '**源曲目**：要处理的曲目，填之前生成结果里的 music_id。'
                stem_type:
                  type: string
                  enum:
                    - lead_vocal
                    - drum_kit
                    - 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
                    - kick
                    - snare
                    - risers
                    - synth_strings
                    - synth_lead
                    - woodwinds
                    - 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
                  default: lead_vocal
                  description: '**分轨类型**：要单独分离出哪一条轨，不填默认取主人声。'
                notify_hook:
                  type: string
                  format: uri
                  description: >-
                    **推送地址**：任务结束后，把和查询结果相同的内容 POST 到这个地址（公网可以访问的 http / https
                    地址）。不传就自己查询。
              required:
                - music_id
            example:
              music_id: 曲目 ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
              example:
                code: success
                message: success
                data:
                  task_id: 5adac6ee-...
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: error
                message: music_id is required
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              example:
                error:
                  message: Invalid Token
                  type: rix_api_error
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              example:
                error:
                  message: Too many requests, please try again later
                  type: rix_api_error
components:
  schemas:
    SubmitResponse:
      type: object
      properties:
        code:
          type: string
          enum:
            - success
        message:
          type: string
        data:
          type: object
          properties:
            task_id:
              type: string
              description: 任务 ID。
          required:
            - task_id
      required:
        - code
        - data
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
    GatewayError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '在请求头 `Authorization: Bearer YOUR_API_KEY` 里带上 API Key。'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.