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

# Suno Stems API 文档

> 该接口用于从已有 Suno 音频中提取指定分轨，例如主唱、贝斯、钢琴、鼓组、电吉他等，方便混音、剪辑和后期制作。

使用 **Suno Stems API** 从已有 Suno 音频中提取指定分轨。通过 `stem_type` 选择要提取的部分，例如 `lead_vocal`、`bass`、`piano`、`drum_kit`、`electric_guitar`。

不传 `stem_type` 时，默认使用 `lead_vocal`。


## OpenAPI

````yaml openapi/cn/suno.json POST /suno/v1/stems
openapi: 3.1.0
info:
  title: TTAPI API DOCS
  version: 1.0.0
  description: Suno 音乐生成相关接口
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /suno/v1/stems:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/IsStorageParams'
                - $ref: '#/components/schemas/HookUrlParams'
                - type: object
                  properties:
                    music_id:
                      type: string
                      description: 要分离的音轨的音频ID
                    stem_type:
                      type: string
                      description: >-
                        要提取的分轨类型。默认 lead_vocal。可传
                        bass、piano、drum_kit、electric_guitar 等支持的枚举
                        code，用于提取指定乐器或人声分轨。
                      default: lead_vocal
                      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
                  required:
                    - music_id
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    IsStorageParams:
      type: object
      properties:
        isStorage:
          type: boolean
          default: true
          description: |-
            是否转存

            - **true**：音频将进行转存，返回TTAPI CDN地址
            - **false**：返回官方源地址
    HookUrlParams:
      type: object
      properties:
        hookUrl:
          type: string
          description: 回调通知地址
  responses:
    SuccessResponse:
      description: 请求成功
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: SUCCESS
              message:
                type: string
                example: success
              data:
                type: object
                example:
                  jobId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            required:
              - status
              - message
              - data
    400Response:
      description: 参数错误
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: 授权失败
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        请前往 <a href='https://dashboard.ttapi.io' target='_blank'>TTAPI 控制台</a>
        获取 API 密钥。

````