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

# 人声与乐器分轨：查询任务

> 按 `taskId` 查询任务状态和结果。`data.state` 为 `success` 时从 `data.response`（与 `data.resultJson` 相同）读取结果，为 `fail` 时 `data.failCode` / `data.failMsg` 为失败原因。建议每 10 秒左右查询一次。



## OpenAPI

````yaml /openapi/zh/suno-separate-vocals.json get /api/v1/jobs/recordInfo
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/recordInfo:
    get:
      tags:
        - Suno 人声与乐器分轨
      summary: 查询任务
      description: >-
        按 `taskId` 查询任务状态和结果。`data.state` 为 `success` 时从 `data.response`（与
        `data.resultJson` 相同）读取结果，为 `fail` 时 `data.failCode` / `data.failMsg`
        为失败原因。建议每 10 秒左右查询一次。
      operationId: sunoRecordInfo
      parameters:
        - description: 任务 ID，即创建任务返回的 `data.taskId`。
          example: 7d3f0a9c41e85b2f6a1c9e04b8d27f53
          explode: false
          in: query
          name: taskId
          required: true
          schema:
            examples:
              - 7d3f0a9c41e85b2f6a1c9e04b8d27f53
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                排队中:
                  description: 任务已创建，等待生成。
                  summary: 排队中
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 7d3f0a9c41e85b2f6a1c9e04b8d27f53
                      model: ai-music-api/separate-vocals
                      state: waiting
                      param: >-
                        {"input":"{\"task_id\":\"c2a81e5f09d34b7e8f61a2d4c9b03e75\",\"audio_id\":\"f924248f-e765-48fd-9ea9-c64290225e4e\",\"type\":\"separate_vocal\"}","model":"ai-music-api/separate-vocals"}
                      resultJson: null
                      failCode: null
                      failMsg: null
                      costTime: null
                      completeTime: null
                      createTime: 1795014897000
                      updateTime: 1795014907000
                生成中:
                  description: 生成中，请稍后再查。
                  summary: 生成中
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 7d3f0a9c41e85b2f6a1c9e04b8d27f53
                      model: ai-music-api/separate-vocals
                      state: generating
                      param: >-
                        {"input":"{\"task_id\":\"c2a81e5f09d34b7e8f61a2d4c9b03e75\",\"audio_id\":\"f924248f-e765-48fd-9ea9-c64290225e4e\",\"type\":\"separate_vocal\"}","model":"ai-music-api/separate-vocals"}
                      resultJson: null
                      failCode: null
                      failMsg: null
                      costTime: null
                      completeTime: null
                      createTime: 1795014897000
                      updateTime: 1795014907000
                生成成功:
                  description: '`response`（与 `resultJson` 相同）为结果，链接均为 DreamTo 下载地址。'
                  summary: 生成成功
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 7d3f0a9c41e85b2f6a1c9e04b8d27f53
                      model: ai-music-api/separate-vocals
                      state: success
                      param: >-
                        {"input":"{\"task_id\":\"c2a81e5f09d34b7e8f61a2d4c9b03e75\",\"audio_id\":\"f924248f-e765-48fd-9ea9-c64290225e4e\",\"type\":\"separate_vocal\"}","model":"ai-music-api/separate-vocals"}
                      resultJson: >-
                        {"resultObject":{"instrumental_url":"https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/d0d0f443d998ca50a05fb/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t","origin_data":[{"audio_url":"https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/8186af69dccb72e575704/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t","duration":41.08,"id":"40bdbc9f-87af-4d9d-8e95-415f33b138b6","stem_type_group_name":"Vocals"},{"audio_url":"https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/d0d0f443d998ca50a05fb/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t","duration":41.08,"id":"c4059353-ecbe-4bfa-b297-dda6ac7f61ad","stem_type_group_name":"Instrumental"}],"vocal_url":"https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/8186af69dccb72e575704/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t"},"resultUrls":["https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/8186af69dccb72e575704/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t","https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/d0d0f443d998ca50a05fb/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t"]}
                      failCode: null
                      failMsg: null
                      costTime: 62
                      completeTime: 1795015988399
                      createTime: 1795014897000
                      updateTime: 1795014939000
                      response:
                        resultObject:
                          instrumental_url: >-
                            https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/d0d0f443d998ca50a05fb/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t
                          origin_data:
                            - audio_url: >-
                                https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/8186af69dccb72e575704/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t
                              duration: 41.08
                              id: 40bdbc9f-87af-4d9d-8e95-415f33b138b6
                              stem_type_group_name: Vocals
                            - audio_url: >-
                                https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/d0d0f443d998ca50a05fb/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t
                              duration: 41.08
                              id: c4059353-ecbe-4bfa-b297-dda6ac7f61ad
                              stem_type_group_name: Instrumental
                          vocal_url: >-
                            https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/8186af69dccb72e575704/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t
                        resultUrls:
                          - >-
                            https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/8186af69dccb72e575704/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t
                          - >-
                            https://api.dreamto.ai/v1/tasks/7d3f0a9c41e85b2f6a1c9e04b8d27f53/artifacts/d0d0f443d998ca50a05fb/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t
                生成失败:
                  description: '`failCode` / `failMsg` 为失败原因，不扣费。'
                  summary: 生成失败
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 7d3f0a9c41e85b2f6a1c9e04b8d27f53
                      model: ai-music-api/separate-vocals
                      state: fail
                      param: >-
                        {"input":"{\"task_id\":\"c2a81e5f09d34b7e8f61a2d4c9b03e75\",\"audio_id\":\"f924248f-e765-48fd-9ea9-c64290225e4e\",\"type\":\"separate_vocal\"}","model":"ai-music-api/separate-vocals"}
                      resultJson: ''
                      failCode: '500'
                      failMsg: Vocal separation failed
                      costTime: 0
                      completeTime: 1795014939000
                      createTime: 1795014897000
                      updateTime: 1795014939000
                任务不存在（422）:
                  description: 任务 ID 不存在、不属于当前账号或已过期。
                  summary: 任务不存在（422）
                  value:
                    code: 422
                    msg: recordInfo is null
                    data: null
              schema:
                $ref: '#/components/schemas/SunoRecordInfoResponse'
          description: >-
            HTTP 状态码始终为 200。`code` 为 `200` 时 `data` 为任务信息（任务本身是否成功看
            `data.state`）；其他 `code` 为错误，`data` 为 `null`。
          headers:
            X-Request-Id:
              description: 本次请求的 ID，排查问题时请提供。
              schema:
                type: string
components:
  schemas:
    SunoRecordInfoResponse:
      additionalProperties: false
      description: 查询任务的响应。HTTP 状态码始终为 200。
      properties:
        code:
          description: |-
            结果代码：
            - `200`：查询成功（任务本身是否成功看 `data.state`）
            - `401`：API Key 缺失或无效
            - `405`：请求方法错误
            - `422`：`taskId` 缺失、不存在、属于其他账号或已过期（`msg` 为 `recordInfo is null`）
            - `429`：请求过于频繁
            - `500`：服务器错误，可稍后重试
          format: int64
          type: integer
        msg:
          description: 结果说明：成功时为 `success`，错误时为英文原因。
          type: string
        data:
          $ref: '#/components/schemas/SunoTaskRecord'
          description: 任务信息；错误时为 `null`。
      required:
        - code
        - msg
        - data
      type: object
    SunoTaskRecord:
      additionalProperties: false
      description: 任务信息。
      properties:
        taskId:
          description: 任务 ID。
          type: string
        model:
          description: 创建任务时的接口名称。
          type: string
        state:
          description: |-
            任务状态；`success` 和 `fail` 为终态。

            **可选值：**
            - `waiting`：已创建，等待开始
            - `queuing`：排队中
            - `generating`：生成中
            - `success`：成功（终态），结果在 `response`
            - `fail`：失败（终态），原因在 `failCode` / `failMsg`，不扣费
          enum:
            - waiting
            - queuing
            - generating
            - success
            - fail
          type: string
        param:
          description: >-
            创建任务时的请求，JSON 字符串，包含 `model`、`callBackUrl`（如有）和 `input`；其中 `input`
            也是 JSON 字符串，需要再解析一次。
          type: string
        resultJson:
          description: 结果的 JSON 字符串，内容与 `response` 相同；任务结束前为 `null`，失败时为空串。
          type:
            - string
            - 'null'
        failCode:
          description: 失败代码（数字字符串，如 `"500"`）；未失败时为 `null`。
          type:
            - string
            - 'null'
        failMsg:
          description: 失败原因（英文）；未失败时为 `null`。
          type:
            - string
            - 'null'
        costTime:
          description: 生成耗时（秒）；任务结束前为 `null`。
          format: int64
          type:
            - integer
            - 'null'
        completeTime:
          description: 完成时间，Unix 毫秒时间戳；任务结束前为 `null`。
          format: int64
          type:
            - integer
            - 'null'
        createTime:
          description: 创建时间，Unix 毫秒时间戳。
          format: int64
          type: integer
        updateTime:
          description: 最后更新时间，Unix 毫秒时间戳。
          format: int64
          type: integer
        response:
          $ref: '#/components/schemas/SunoSeparateVocalsResult'
          description: 解析后的结果，仅任务成功时返回；其中的文件链接均为 DreamTo 下载地址。
      required:
        - taskId
        - model
        - state
        - param
        - resultJson
        - failCode
        - failMsg
        - costTime
        - completeTime
        - createTime
        - updateTime
      type: object
    SunoSeparateVocalsResult:
      additionalProperties: false
      description: 分轨结果。
      properties:
        resultUrls:
          description: 全部分轨音频（MP3）的下载地址，文件名以分轨名结尾（如 `_Vocals.mp3`、`_Instrumental.mp3`）。
          items:
            type: string
          type: array
        resultObject:
          $ref: '#/components/schemas/SunoSeparateVocalsStems'
          description: 分轨详情，字段随 `type` 不同。
      required:
        - resultUrls
        - resultObject
      type: object
    SunoSeparateVocalsStems:
      additionalProperties: false
      description: >-
        分轨详情，字段随请求的 `type` 不同：`separate_vocal` 为 `vocal_url` +
        `instrumental_url`；`split_stem` 为 `vocal_url` 及各乐器的
        `*_url`；`split_stem_advanced` 只有 `origin_data`。
      properties:
        origin_url:
          description: 原始音频地址；可能为空或不返回。
          type: string
        vocal_url:
          description: 人声（主唱）音轨地址。
          type: string
        instrumental_url:
          description: 伴奏音轨地址（仅 `separate_vocal`）。
          type: string
        backing_vocals_url:
          description: 和声音轨地址（仅 `split_stem`）。
          type: string
        drums_url:
          description: 鼓音轨地址（仅 `split_stem`）。
          type: string
        bass_url:
          description: 贝斯音轨地址（仅 `split_stem`）。
          type: string
        guitar_url:
          description: 吉他音轨地址（仅 `split_stem`）。
          type: string
        keyboard_url:
          description: 键盘音轨地址（仅 `split_stem`）。
          type: string
        percussion_url:
          description: 打击乐音轨地址（仅 `split_stem`）。
          type: string
        strings_url:
          description: 弦乐音轨地址（仅 `split_stem`）。
          type: string
        synth_url:
          description: 合成器音轨地址（仅 `split_stem`）。
          type: string
        fx_url:
          description: 音效 / 其他音轨地址（仅 `split_stem`）。
          type: string
        brass_url:
          description: 铜管音轨地址（仅 `split_stem`）。
          type: string
        woodwinds_url:
          description: 木管音轨地址（仅 `split_stem`）。
          type: string
        origin_data:
          description: >-
            逐条分轨信息。`separate_vocal` / `split_stem` 每项是一条分轨；`split_stem_advanced`
            每项是一组 `extract`（只含目标乐器）与 `remove`（去掉目标乐器后的其余部分）。
          items:
            $ref: '#/components/schemas/SunoSeparateVocalsOriginData'
          type: array
      type: object
    SunoSeparateVocalsOriginData:
      additionalProperties: false
      description: 一条分轨，或 `split_stem_advanced` 的一组提取 / 移除结果。
      properties:
        id:
          description: >-
            分轨 ID，可作为“生成 MIDI”“转换为 WAV”的 `audio_id`（`split_stem_advanced` 时见
            `extract.id` / `remove.id`）。
          type: string
        audio_url:
          description: 分轨音频（MP3）下载地址。
          type: string
        duration:
          description: 时长（秒）。
          format: double
          type: number
        stem_type_group_name:
          description: 分轨类型名，如 `Vocals`、`Instrumental`、`Drums`。
          type: string
        extract:
          $ref: '#/components/schemas/SunoSeparateVocalsStem'
          description: 只含目标乐器的提取轨（仅 `split_stem_advanced`）。
        remove:
          $ref: '#/components/schemas/SunoSeparateVocalsStem'
          description: 去掉目标乐器后的其余部分（仅 `split_stem_advanced`）。
      type: object
    SunoSeparateVocalsStem:
      additionalProperties: false
      description: '`split_stem_advanced` 的一条提取或移除音轨。'
      properties:
        id:
          description: 音轨 ID，可作为“生成 MIDI”“转换为 WAV”的 `audio_id`。
          type: string
        audio_url:
          description: 音频（MP3）下载地址。
          type: string
        duration:
          description: 时长（秒）。
          format: double
          type: number
        stem_type_group_name:
          description: 目标乐器名，如 `Lead Vocal`；提取与移除两轨相同。
          type: string
      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.