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

# 人声与乐器分轨：创建任务

> 创建 Suno 任务：`model` 选择接口，参数放在 `input` 中，可选 `callBackUrl` 接收完成回调。成功后返回 `data.taskId`，任务在后台异步执行，用查询任务接口轮询结果。所有响应的 HTTP 状态码都是 200，以 `code` 判断结果。



## OpenAPI

````yaml /openapi/zh/suno-separate-vocals.json post /api/v1/jobs/createTask
openapi: 3.1.0
info:
  description: 把一首歌分离成人声与伴奏，或拆成最多 12 条乐器分轨，也可以精确提取指定乐器。
  title: Suno 人声与乐器分轨
  version: v1
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: Suno 人声与乐器分轨
paths:
  /api/v1/jobs/createTask:
    post:
      tags:
        - Suno 人声与乐器分轨
      summary: 创建任务
      description: >-
        创建 Suno 任务：`model` 选择接口，参数放在 `input` 中，可选 `callBackUrl` 接收完成回调。成功后返回
        `data.taskId`，任务在后台异步执行，用查询任务接口轮询结果。所有响应的 HTTP 状态码都是 200，以 `code` 判断结果。
      operationId: sunoCreateTask
      requestBody:
        content:
          application/json:
            examples:
              分离人声与伴奏:
                description: '`task_id` + `audio_id` 指定此前生成的一首歌，分离成人声和伴奏两轨，完成后回调。'
                summary: 分离人声与伴奏
                value:
                  model: ai-music-api/separate-vocals
                  callBackUrl: https://your-domain.com/api/callback
                  input:
                    task_id: c2a81e5f09d34b7e8f61a2d4c9b03e75
                    audio_id: f924248f-e765-48fd-9ea9-c64290225e4e
                    type: separate_vocal
              拆成多条乐器分轨:
                description: '`split_stem` 把歌曲拆成最多 12 条乐器分轨。'
                summary: 拆成多条乐器分轨
                value:
                  model: ai-music-api/separate-vocals
                  input:
                    task_id: c2a81e5f09d34b7e8f61a2d4c9b03e75
                    audio_id: f924248f-e765-48fd-9ea9-c64290225e4e
                    type: split_stem
              从自己的音频提取钢琴:
                description: >-
                  `audio_url` 传入音频，`split_stem_advanced` + `stem_name: Piano`
                  得到钢琴提取轨和去掉钢琴的其余部分。
                summary: 从自己的音频提取钢琴
                value:
                  model: ai-music-api/separate-vocals
                  input:
                    audio_url: https://your-cdn.example.com/song.mp3
                    type: split_stem_advanced
                    stem_name: Piano
            schema:
              $ref: >-
                #/components/schemas/SunoCreateTaskRequestSunoSeparateVocalsInput
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                创建成功:
                  description: '`data.taskId` 为任务 ID。'
                  summary: 创建成功
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 7d3f0a9c41e85b2f6a1c9e04b8d27f53
                参数错误（422）:
                  description: 参数不合法，不建任务、不扣费。
                  summary: 参数错误（422）
                  value:
                    code: 422
                    msg: >-
                      input.stem_name is required when input.type is
                      split_stem_advanced.
                    data: null
                源任务不可用（422）:
                  description: '`task_id` 不存在、不属于当前账号或不满足 `msg` 中的条件；不建任务、不扣费。'
                  summary: 源任务不可用（422）
                  value:
                    code: 422
                    msg: >-
                      input.task_id must be a succeeded task of this account
                      created in the last 14 days.
                    data: null
                未授权（401）:
                  description: API Key 缺失或无效。
                  summary: 未授权（401）
                  value:
                    code: 401
                    msg: >-
                      Unauthorized - Authentication credentials are missing or
                      invalid
                    data: null
                余额不足（402）:
                  description: 余额不足以支付本次任务。
                  summary: 余额不足（402）
                  value:
                    code: 402
                    msg: >-
                      Insufficient Credits - Account does not have enough
                      credits to perform the operation
                    data: null
                请求过于频繁（429）:
                  description: 超过频率限制，请稍后重试。
                  summary: 请求过于频繁（429）
                  value:
                    code: 429
                    msg: >-
                      Rate Limited - Request limit has been exceeded for this
                      resource
                    data: null
                服务器错误（500）:
                  description: 服务暂时不可用，可稍后重试，不扣费。
                  summary: 服务器错误（500）
                  value:
                    code: 500
                    msg: >-
                      Server Error - An unexpected error occurred while
                      processing the request
                    data: null
              schema:
                $ref: '#/components/schemas/SunoCreateTaskResponse'
          description: >-
            HTTP 状态码始终为 200。`code` 为 `200` 时创建成功，`data.taskId` 为任务 ID；其他 `code`
            为错误，`msg` 为原因，`data` 为 `null`。
          headers:
            X-Request-Id:
              description: 本次请求的 ID，排查问题时请提供。
              schema:
                type: string
components:
  schemas:
    SunoCreateTaskRequestSunoSeparateVocalsInput:
      additionalProperties: false
      description: 创建任务的请求体。
      properties:
        model:
          default: ai-music-api/separate-vocals
          description: |-
            接口名称，决定 `input` 的字段。

            **可选值：**
            - `ai-music-api/separate-vocals`：Suno 人声与乐器分轨
          enum:
            - ai-music-api/separate-vocals
          type: string
        callBackUrl:
          description: >-
            可选，任务完成（成功或失败）后接收回调的地址，须为公网可访问的 `http` / `https`
            地址；推荐生产环境使用，也可以只轮询查询任务接口。回调格式和签名见“任务完成回调”。
          type: string
        input:
          $ref: '#/components/schemas/SunoSeparateVocalsInput'
          description: 任务参数，字段由 `model` 决定。
      required:
        - model
        - input
      type: object
    SunoCreateTaskResponse:
      additionalProperties: false
      description: 创建任务的响应。HTTP 状态码始终为 200。
      properties:
        code:
          description: |-
            结果代码：
            - `200`：成功
            - `401`：API Key 缺失或无效
            - `402`：余额不足
            - `404`：模型不存在或未开通
            - `405`：请求方法错误
            - `422`：参数错误，`msg` 为原因，不建任务、不扣费
            - `429`：请求过于频繁，请稍后重试
            - `455`：服务维护中
            - `500`：服务器错误，可稍后重试
            - `501`：生成失败
            - `505`：功能已停用
          format: int64
          type: integer
        msg:
          description: 结果说明：成功时为 `success`，错误时为英文原因。
          type: string
        data:
          $ref: '#/components/schemas/SunoCreateTaskData'
          description: 成功时为任务信息；错误时为 `null`。
      required:
        - code
        - msg
        - data
      type: object
    SunoSeparateVocalsInput:
      additionalProperties: false
      description: >-
        `ai-music-api/separate-vocals` 的参数。需要一个音频源：`task_id` + `audio_id`，或
        `audio_url`。
      properties:
        task_id:
          description: >-
            要分离的歌曲所在任务的 ID：本账号在 DreamTo 上 14
            天内成功的歌曲任务（生成、续写、翻唱、加人声、加伴奏、替换片段、混搭、音效等，createTask 返回的
            `data.taskId`）。须与 `audio_id` 同时传，与 `audio_url`
            互斥。任务不存在、不属于当前账号、未成功、超过 14 天或不产出歌曲时返回 `code: 422`，不建任务、不扣费。
          type: string
        audio_id:
          description: >-
            要分离的那首歌的 ID，即源任务查询结果 `response.data[].id`。须与 `task_id` 同时传，与
            `audio_url` 互斥。
          type: string
        audio_url:
          description: >-
            自己上传的音频地址，须为公网可访问的 `http` / `https` 地址，文件不超过 20MB。未传 `task_id` +
            `audio_id` 时必填，与二者互斥。
          type: string
        type:
          default: separate_vocal
          description: >-
            可选，分离模式，默认 `separate_vocal`。决定返回的分轨和单价。


            **可选值：**

            - `separate_vocal`：2 轨：人声 + 伴奏，适合快速去人声、卡拉 OK 和基础混音（默认）。

            - `split_stem`：最多 12 轨：人声、和声、鼓、贝斯、吉他、键盘、弦乐、铜管、木管、打击乐、合成器、音效 /
            其他，适合重新混音和单独提取乐器。

            - `split_stem_advanced`：按 `stem_name`
            精确提取一种乐器：返回只含该乐器的提取轨和去掉该乐器的移除轨，适合精细后期。
          enum:
            - separate_vocal
            - split_stem
            - split_stem_advanced
          type: string
        stem_name:
          description: |-
            要提取的分轨（乐器）名称，区分大小写。`type` 为 `split_stem_advanced` 时必填，其他模式不能传。

            **可选值：**
            - `Lead Vocal`：提取主唱。
            - `Drum Kit`：提取架子鼓。
            - `Kick`：提取底鼓。
            - `Snare`：提取军鼓。
            - `Risers`：提取上升音效（Riser）。
            - `Bass`：提取贝斯。
            - `Backing Vocals`：提取和声 / 伴唱。
            - `Piano`：提取钢琴。
            - `Electric Guitar`：提取电吉他。
            - `Percussion`：提取打击乐。
            - `String Section`：提取弦乐组。
            - `Synth`：提取合成器。
            - `Acoustic Guitar`：提取原声吉他。
            - `Sound Effects`：提取音效。
            - `Synth Pad`：提取合成器铺底（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`：提取民间小提琴（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`：提取持续音（Drone）。
            - `Alto Saxophone`：提取中音萨克斯。
            - `Double Bass`：提取低音提琴。
            - `Ukulele`：提取尤克里里。
            - `Harpsichord`：提取羽管键琴。
            - `Baritone Saxophone`：提取上低音萨克斯。
            - `Xylophone`：提取木琴。
            - `Tuba`：提取大号。
            - `Bass Guitar`：提取贝斯吉他。
            - `Whistle`：提取口哨。
            - `Lead Guitar`：提取主音吉他。
            - `Rhodes`：提取Rhodes 电钢琴。
            - `808`：提取808 低音鼓。
            - `Bongos`：提取邦戈鼓。
            - `Bassoon`：提取大管。
            - `Cowbell`：提取牛铃。
            - `Viola`：提取中提琴。
            - `Sitar`：提取西塔琴。
            - `Steel Drums`：提取钢鼓。
            - `Piccolo`：提取短笛。
            - `Theremin`：提取特雷门琴。
            - `Bagpipes`：提取风笛。
            - `Hi-Hat`：提取踩镲。
            - `Music Box`：提取八音盒。
            - `Melodica`：提取口风琴。
            - `Tabla`：提取塔布拉鼓。
            - `Koto`：提取日本筝。
            - `Djembe`：提取非洲鼓（Djembe）。
            - `Taiko`：提取太鼓。
            - `Didgeridoo`：提取迪吉里杜管。
          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
          type: string
      type: object
    SunoCreateTaskData:
      additionalProperties: false
      description: 新建的任务。
      properties:
        taskId:
          description: 任务 ID（32 位十六进制），用于查询任务，也作为后续接口的 `task_id`。
          type: string
      required:
        - taskId
      type: object
  securitySchemes:
    bearerAuth:
      description: 'DreamTo 控制台创建的 API Key，格式 `Authorization: Bearer <API Key>`。'
      scheme: bearer
      type: http

````

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