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

# Vocal and instrument stem separation: Get task

> Returns the state and result of a task by `taskId`. When `data.state` is `success`, read the result from `data.response` (the same as `data.resultJson`); when it is `fail`, `data.failCode` / `data.failMsg` give the reason. Poll about every 10 seconds.



## OpenAPI

````yaml /openapi/en/suno-separate-vocals.json get /api/v1/jobs/recordInfo
openapi: 3.1.0
info:
  description: >-
    Separate a song into vocals and accompaniment, split it into up to 12
    instrument stems, or extract one chosen instrument.
  title: Suno Vocal and instrument stem separation
  version: v1
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: Suno Vocal and instrument stem separation
paths:
  /api/v1/jobs/recordInfo:
    get:
      tags:
        - Suno Vocal and instrument stem separation
      summary: Get task
      description: >-
        Returns the state and result of a task by `taskId`. When `data.state` is
        `success`, read the result from `data.response` (the same as
        `data.resultJson`); when it is `fail`, `data.failCode` / `data.failMsg`
        give the reason. Poll about every 10 seconds.
      operationId: sunoRecordInfo
      parameters:
        - description: 'Task ID: `data.taskId` returned by createTask.'
          example: 7d3f0a9c41e85b2f6a1c9e04b8d27f53
          explode: false
          in: query
          name: taskId
          required: true
          schema:
            examples:
              - 7d3f0a9c41e85b2f6a1c9e04b8d27f53
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                Waiting:
                  description: The task is created and waiting.
                  summary: Waiting
                  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
                Generating:
                  description: Generating; query again later.
                  summary: Generating
                  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
                Succeeded:
                  description: >-
                    `response` (the same as `resultJson`) is the result; every
                    link is a DreamTo download link.
                  summary: Succeeded
                  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
                Unknown task (422):
                  description: >-
                    The task ID does not exist, belongs to another account or
                    has expired.
                  summary: Unknown task (422)
                  value:
                    code: 422
                    msg: recordInfo is null
                    data: null
                Failed:
                  description: '`failCode` / `failMsg` give the reason; not charged.'
                  summary: Failed
                  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
              schema:
                $ref: '#/components/schemas/SunoRecordInfoResponse'
          description: >-
            Always HTTP 200. With `code` `200`, `data` is the task (whether the
            task succeeded is `data.state`); any other `code` is an error with
            `data` `null`.
          headers:
            X-Request-Id:
              description: ID of this request; include it when reporting issues.
              schema:
                type: string
components:
  schemas:
    SunoRecordInfoResponse:
      additionalProperties: false
      description: Response of recordInfo; always HTTP 200.
      properties:
        code:
          description: >-
            Result code:

            - `200`: found (whether the task succeeded is `data.state`)

            - `401`: missing or invalid API Key

            - `405`: wrong HTTP method

            - `422`: `taskId` is missing, unknown, belongs to another account or
            has expired (`msg` is `recordInfo is null`)

            - `429`: too many requests

            - `500`: server error; retry later
          format: int64
          type: integer
        msg:
          description: 'Message: `success`, or the English reason of an error.'
          type: string
        data:
          $ref: '#/components/schemas/SunoTaskRecord'
          description: The task; `null` on error.
      required:
        - code
        - msg
        - data
      type: object
    SunoTaskRecord:
      additionalProperties: false
      description: A task.
      properties:
        taskId:
          description: Task ID.
          type: string
        model:
          description: Endpoint name of the task.
          type: string
        state:
          description: >-
            Task state; `success` and `fail` are final.


            **Allowed values:**

            - `waiting`: Created and waiting to start

            - `queuing`: Queued

            - `generating`: Generating

            - `success`: Succeeded (final); the result is in `response`

            - `fail`: Failed (final); the reason is in `failCode` / `failMsg`;
            not charged
          enum:
            - waiting
            - queuing
            - generating
            - success
            - fail
          type: string
        param:
          description: >-
            The create request as a JSON string with `model`, `callBackUrl` (if
            any) and `input`; `input` is itself a JSON string and needs a second
            parse.
          type: string
        resultJson:
          description: >-
            The result as a JSON string, the same as `response`; `null` until
            the task finishes and an empty string when it failed.
          type:
            - string
            - 'null'
        failCode:
          description: >-
            Failure code (a numeric string such as `"500"`); `null` unless the
            task failed.
          type:
            - string
            - 'null'
        failMsg:
          description: Failure reason (English); `null` unless the task failed.
          type:
            - string
            - 'null'
        costTime:
          description: Generation time in seconds; `null` until the task finishes.
          format: int64
          type:
            - integer
            - 'null'
        completeTime:
          description: >-
            Completion time as Unix milliseconds; `null` until the task
            finishes.
          format: int64
          type:
            - integer
            - 'null'
        createTime:
          description: Creation time as Unix milliseconds.
          format: int64
          type: integer
        updateTime:
          description: Last update time as Unix milliseconds.
          format: int64
          type: integer
        response:
          $ref: '#/components/schemas/SunoSeparateVocalsResult'
          description: >-
            The parsed result, only when the task succeeded; every file link in
            it is a DreamTo download link.
      required:
        - taskId
        - model
        - state
        - param
        - resultJson
        - failCode
        - failMsg
        - costTime
        - completeTime
        - createTime
        - updateTime
      type: object
    SunoSeparateVocalsResult:
      additionalProperties: false
      description: Separation result.
      properties:
        resultUrls:
          description: >-
            Download links of every stem (MP3); the file names end with the stem
            name (such as `_Vocals.mp3` or `_Instrumental.mp3`).
          items:
            type: string
          type: array
        resultObject:
          $ref: '#/components/schemas/SunoSeparateVocalsStems'
          description: Stem details; the fields depend on `type`.
      required:
        - resultUrls
        - resultObject
      type: object
    SunoSeparateVocalsStems:
      additionalProperties: false
      description: >-
        Stem details; the fields depend on the requested `type`: `vocal_url` +
        `instrumental_url` for `separate_vocal`; `vocal_url` and the instrument
        `*_url` fields for `split_stem`; only `origin_data` for
        `split_stem_advanced`.
      properties:
        origin_url:
          description: Original audio URL; may be empty or absent.
          type: string
        vocal_url:
          description: Vocal (lead vocal) track URL.
          type: string
        instrumental_url:
          description: Accompaniment track URL (`separate_vocal` only).
          type: string
        backing_vocals_url:
          description: Backing vocals track URL (`split_stem` only).
          type: string
        drums_url:
          description: Drums track URL (`split_stem` only).
          type: string
        bass_url:
          description: Bass track URL (`split_stem` only).
          type: string
        guitar_url:
          description: Guitar track URL (`split_stem` only).
          type: string
        keyboard_url:
          description: Keyboard track URL (`split_stem` only).
          type: string
        percussion_url:
          description: Percussion track URL (`split_stem` only).
          type: string
        strings_url:
          description: Strings track URL (`split_stem` only).
          type: string
        synth_url:
          description: Synth track URL (`split_stem` only).
          type: string
        fx_url:
          description: FX / other track URL (`split_stem` only).
          type: string
        brass_url:
          description: Brass track URL (`split_stem` only).
          type: string
        woodwinds_url:
          description: Woodwinds track URL (`split_stem` only).
          type: string
        origin_data:
          description: >-
            Per-stem details. For `separate_vocal` / `split_stem` each entry is
            one stem; for `split_stem_advanced` each entry is a group of
            `extract` (only the target instrument) and `remove` (everything
            except it).
          items:
            $ref: '#/components/schemas/SunoSeparateVocalsOriginData'
          type: array
      type: object
    SunoSeparateVocalsOriginData:
      additionalProperties: false
      description: >-
        One stem, or one `split_stem_advanced` group of extract / remove
        results.
      properties:
        id:
          description: >-
            Stem ID, usable as the `audio_id` of Generate MIDI and Convert to
            WAV (for `split_stem_advanced`, see `extract.id` / `remove.id`).
          type: string
        audio_url:
          description: Download link of the stem audio (MP3).
          type: string
        duration:
          description: Duration in seconds.
          format: double
          type: number
        stem_type_group_name:
          description: Stem type name, such as `Vocals`, `Instrumental` or `Drums`.
          type: string
        extract:
          $ref: '#/components/schemas/SunoSeparateVocalsStem'
          description: >-
            The extracted track with only the target instrument
            (`split_stem_advanced` only).
        remove:
          $ref: '#/components/schemas/SunoSeparateVocalsStem'
          description: >-
            The rest of the mix without the target instrument
            (`split_stem_advanced` only).
      type: object
    SunoSeparateVocalsStem:
      additionalProperties: false
      description: One extract or remove track of `split_stem_advanced`.
      properties:
        id:
          description: >-
            Track ID, usable as the `audio_id` of Generate MIDI and Convert to
            WAV.
          type: string
        audio_url:
          description: Download link of the audio (MP3).
          type: string
        duration:
          description: Duration in seconds.
          format: double
          type: number
        stem_type_group_name:
          description: >-
            Target instrument name, such as `Lead Vocal`; the same on the
            extract and remove tracks.
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      description: >-
        API Key created in the DreamTo console, sent as `Authorization: Bearer
        <API Key>`.
      scheme: bearer
      type: http

````

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