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

# Generate lyrics: 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-lyrics.json get /api/v1/jobs/recordInfo
openapi: 3.1.0
info:
  description: >-
    Write lyrics from a one-line theme; each request returns two or three sets
    of lyrics with titles and section markers to choose from.
  title: Suno Generate lyrics
  version: v1
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: Suno Generate lyrics
paths:
  /api/v1/jobs/recordInfo:
    get:
      tags:
        - Suno Generate lyrics
      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/generate-lyrics
                      state: waiting
                      param: >-
                        {"input":"{\"prompt\":\"A nostalgic song about childhood
                        memories and growing up in a small
                        town\"}","model":"ai-music-api/generate-lyrics"}
                      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/generate-lyrics
                      state: generating
                      param: >-
                        {"input":"{\"prompt\":\"A nostalgic song about childhood
                        memories and growing up in a small
                        town\"}","model":"ai-music-api/generate-lyrics"}
                      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/generate-lyrics
                      state: success
                      param: >-
                        {"input":"{\"prompt\":\"A nostalgic song about childhood
                        memories and growing up in a small
                        town\"}","model":"ai-music-api/generate-lyrics"}
                      resultJson: >-
                        {"resultObject":{"code":200,"lyricsData":[{"error_message":"","status":"complete","tags":["Indie-folk
                        ballad with a gentle swung 6/8 pulse, brushed acoustic
                        guitar and soft upright bass; verse stays sparse with
                        close-mic lead vocal and fingerpicked harmonics,
                        pre-chorus opens into a breathy harmony lift, chorus
                        brings a warm cello line and doubled hook vocals. Little
                        rain-stick swells and reversed guitar breaths between
                        lines, final chorus blooms with handclaps and room
                        reverb. Intimate, dusty, and widescreen at
                        once."],"text":"[Verse 1]\nPaws on the sill\nEyes on the
                        glass\nThe whole yard turns silver\nAs the clouds roll
                        past\n\n[Verse 2]\nA drip on the pane\nA tap on the
                        tin\nYou tilt your small head\nLike you know where I've
                        been\n\n[Pre-Chorus]\nTail flick, slow and low\nYou
                        never need a name\nYou watch the water write\nIts secret
                        in the frame\n\n[Chorus]\nRain, rain, stay\nCat by the
                        window\nRain, rain, play\nSoft on the rooftop\n(soft on
                        the rooftop)\nYou and the storm\nShare the same
                        hush\nRain, rain, stay\nCat by the window\n\n[Verse
                        3]\nYou never chase thunder\nYou never run out\nJust sit
                        with the gray\nLike it's something to
                        trust\n\n[Pre-Chorus]\nTail flick, slow and low\nYou
                        never need a name\nYou watch the water write\nIts secret
                        in the frame\n\n[Chorus]\nRain, rain, stay\nCat by the
                        window\nRain, rain, play\nSoft on the rooftop\n(soft on
                        the rooftop)\nYou and the storm\nShare the same
                        hush\nRain, rain, stay\nCat by the
                        window\n\n[Bridge]\nWhen the last drop fades\nYou'll
                        blink once and yawn\nBut for one more minute\nThe whole
                        world holds on\n\n[Final Chorus]\nRain, rain, stay\nCat
                        by the window\nRain, rain, play\nSoft on the
                        rooftop\n(soft on the rooftop)\nYou and the storm\nShare
                        the same hush\nRain, rain, stay\nCat by the
                        window","title":"Tin Roof
                        Cat"},{"error_message":"","status":"complete","tags":["Indie-folk
                        waltz with brushed acoustic guitar, soft upright bass,
                        and a slow 6/8 sway; verse stays sparse with close-mic
                        vocal and room tone, pre-chorus adds cello lift and hand
                        taps, chorus opens with gentle harmony stacks and a
                        hummed answer. Rainstick swells, porch-screen creaks,
                        and a final instrumental shimmer. Warm, intimate, dusty
                        mix."],"text":"[Verse 1]\nOn the windowsill you
                        sit\nTail curled like a question\nEvery drop on the tin
                        roof\nMakes a tiny resurrection\n\nYour whiskers catch
                        the grey\nAs the whole yard turns to silver\nYou blink
                        at the puddles\nLike they owe you something
                        clearer\n\n[Pre-Chorus]\nAnd you don't move\nYou just
                        hold that view\nLike the world is
                        new\n\n[Chorus]\nLittle cat, little cat\nWatching the
                        rain fall down\nLittle cat, little cat\nSafe in your
                        cardboard crown\nYou don't rush, you don't run\nYou let
                        the cold come through\nLittle cat, little cat\nThe sky
                        belongs to you\n\n[Verse 2]\nA moth taps at the porch
                        light\nThen drifts off in the mist\nYou follow every
                        ripple\nWith that slow, sure little twist\n\nMy shoes
                        are by the door\nBut I'm staying here with you\nCountin'
                        every silver thread\nAs it stitches up the
                        blue\n\n[Pre-Chorus]\nAnd you don't move\nYou just hold
                        that view\nLike the world is new\n\n[Chorus]\nLittle
                        cat, little cat\nWatching the rain fall down\nLittle
                        cat, little cat\nSafe in your cardboard crown\nYou don't
                        rush, you don't run\nYou let the cold come
                        through\nLittle cat, little cat\nThe sky belongs to
                        you\n\n[Bridge]\nWhen the storm leans heavy\nYou just
                        soften more\nA small kind of prayer\nOn the kitchen
                        floor\n\n[Final Chorus]\nLittle cat, little
                        cat\nWatching the rain fall down\nLittle cat, little
                        cat\nSafe in your cardboard crown\nYou don't rush, you
                        don't run\nYou let the cold come through\nLittle cat,
                        little cat\nThe sky belongs to you","title":"Tin Roof
                        Cat"}],"message":"success","taskId":"7d3f0a9c41e85b2f6a1c9e04b8d27f53"}}
                      failCode: null
                      failMsg: null
                      costTime: 5
                      completeTime: 1795014902888
                      createTime: 1795014897000
                      updateTime: 1795014939000
                      response:
                        resultObject:
                          code: 200
                          lyricsData:
                            - error_message: ''
                              status: complete
                              tags:
                                - >-
                                  Indie-folk ballad with a gentle swung 6/8
                                  pulse, brushed acoustic guitar and soft
                                  upright bass; verse stays sparse with
                                  close-mic lead vocal and fingerpicked
                                  harmonics, pre-chorus opens into a breathy
                                  harmony lift, chorus brings a warm cello line
                                  and doubled hook vocals. Little rain-stick
                                  swells and reversed guitar breaths between
                                  lines, final chorus blooms with handclaps and
                                  room reverb. Intimate, dusty, and widescreen
                                  at once.
                              text: |-
                                [Verse 1]
                                Paws on the sill
                                Eyes on the glass
                                The whole yard turns silver
                                As the clouds roll past

                                [Verse 2]
                                A drip on the pane
                                A tap on the tin
                                You tilt your small head
                                Like you know where I've been

                                [Pre-Chorus]
                                Tail flick, slow and low
                                You never need a name
                                You watch the water write
                                Its secret in the frame

                                [Chorus]
                                Rain, rain, stay
                                Cat by the window
                                Rain, rain, play
                                Soft on the rooftop
                                (soft on the rooftop)
                                You and the storm
                                Share the same hush
                                Rain, rain, stay
                                Cat by the window

                                [Verse 3]
                                You never chase thunder
                                You never run out
                                Just sit with the gray
                                Like it's something to trust

                                [Pre-Chorus]
                                Tail flick, slow and low
                                You never need a name
                                You watch the water write
                                Its secret in the frame

                                [Chorus]
                                Rain, rain, stay
                                Cat by the window
                                Rain, rain, play
                                Soft on the rooftop
                                (soft on the rooftop)
                                You and the storm
                                Share the same hush
                                Rain, rain, stay
                                Cat by the window

                                [Bridge]
                                When the last drop fades
                                You'll blink once and yawn
                                But for one more minute
                                The whole world holds on

                                [Final Chorus]
                                Rain, rain, stay
                                Cat by the window
                                Rain, rain, play
                                Soft on the rooftop
                                (soft on the rooftop)
                                You and the storm
                                Share the same hush
                                Rain, rain, stay
                                Cat by the window
                              title: Tin Roof Cat
                            - error_message: ''
                              status: complete
                              tags:
                                - >-
                                  Indie-folk waltz with brushed acoustic guitar,
                                  soft upright bass, and a slow 6/8 sway; verse
                                  stays sparse with close-mic vocal and room
                                  tone, pre-chorus adds cello lift and hand
                                  taps, chorus opens with gentle harmony stacks
                                  and a hummed answer. Rainstick swells,
                                  porch-screen creaks, and a final instrumental
                                  shimmer. Warm, intimate, dusty mix.
                              text: |-
                                [Verse 1]
                                On the windowsill you sit
                                Tail curled like a question
                                Every drop on the tin roof
                                Makes a tiny resurrection

                                Your whiskers catch the grey
                                As the whole yard turns to silver
                                You blink at the puddles
                                Like they owe you something clearer

                                [Pre-Chorus]
                                And you don't move
                                You just hold that view
                                Like the world is new

                                [Chorus]
                                Little cat, little cat
                                Watching the rain fall down
                                Little cat, little cat
                                Safe in your cardboard crown
                                You don't rush, you don't run
                                You let the cold come through
                                Little cat, little cat
                                The sky belongs to you

                                [Verse 2]
                                A moth taps at the porch light
                                Then drifts off in the mist
                                You follow every ripple
                                With that slow, sure little twist

                                My shoes are by the door
                                But I'm staying here with you
                                Countin' every silver thread
                                As it stitches up the blue

                                [Pre-Chorus]
                                And you don't move
                                You just hold that view
                                Like the world is new

                                [Chorus]
                                Little cat, little cat
                                Watching the rain fall down
                                Little cat, little cat
                                Safe in your cardboard crown
                                You don't rush, you don't run
                                You let the cold come through
                                Little cat, little cat
                                The sky belongs to you

                                [Bridge]
                                When the storm leans heavy
                                You just soften more
                                A small kind of prayer
                                On the kitchen floor

                                [Final Chorus]
                                Little cat, little cat
                                Watching the rain fall down
                                Little cat, little cat
                                Safe in your cardboard crown
                                You don't rush, you don't run
                                You let the cold come through
                                Little cat, little cat
                                The sky belongs to you
                              title: Tin Roof Cat
                          message: success
                          taskId: 7d3f0a9c41e85b2f6a1c9e04b8d27f53
                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/generate-lyrics
                      state: fail
                      param: >-
                        {"input":"{\"prompt\":\"A nostalgic song about childhood
                        memories and growing up in a small
                        town\"}","model":"ai-music-api/generate-lyrics"}
                      resultJson: ''
                      failCode: '400'
                      failMsg: Song Description flagged for moderation
                      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/SunoLyricsResult'
          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
    SunoLyricsResult:
      additionalProperties: false
      description: Lyrics generation result.
      properties:
        resultObject:
          $ref: '#/components/schemas/SunoLyricsResultObject'
          description: The generation result.
      required:
        - resultObject
      type: object
    SunoLyricsResultObject:
      additionalProperties: false
      description: The generation result.
      properties:
        lyricsData:
          description: The generated lyrics, usually two or three sets.
          items:
            $ref: '#/components/schemas/SunoLyricsItem'
          type: array
        code:
          description: Status code; `200` means the lyrics were generated.
          format: int64
          type: integer
        message:
          description: Status message, `success` on success.
          type: string
        taskId:
          description: Task ID (the `data.taskId` returned by createTask).
          type: string
      required:
        - lyricsData
        - code
        - message
        - taskId
      type: object
    SunoLyricsItem:
      additionalProperties: false
      description: One set of generated lyrics.
      properties:
        text:
          description: >-
            The full lyrics, with sections marked by `[Verse]`, `[Chorus]` and
            so on.
          type: string
        title:
          description: Song title.
          type: string
        status:
          description: |-
            Generation status of this set of lyrics.

            **Allowed values:**
            - `complete`: Generated.
            - `failed`: Generation failed; see `error_message`.
          enum:
            - complete
            - failed
          type: string
        error_message:
          description: >-
            Error message, meaningful when `status` is `failed`; an empty string
            on success.
          type: string
        tags:
          description: >-
            Suggested music style description, usable as a reference for `style`
            of the generate music endpoint.
          items:
            type: string
          type: array
      required:
        - text
        - title
        - status
        - error_message
      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.