> ## 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 Persona: 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-persona.json get /api/v1/jobs/recordInfo
openapi: 3.1.0
info:
  description: >-
    Create a Persona (a music character) from one track of a song you generated;
    pass its `persona_id` to later music tasks to keep that style.
  title: Suno Generate Persona
  version: v1
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: Suno Generate Persona
paths:
  /api/v1/jobs/recordInfo:
    get:
      tags:
        - Suno Generate Persona
      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:
                Succeeded:
                  description: >-
                    A synchronous task is finished when created; `response` (the
                    same as `resultJson`) is the result.
                  summary: Succeeded
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 7d3f0a9c41e85b2f6a1c9e04b8d27f53
                      model: ai-music-api/generate-persona
                      state: success
                      param: >-
                        {"input":"{\"task_id\":\"c2a81e5f09d34b7e8f61a2d4c9b03e75\",\"audio_id\":\"f924248f-e765-48fd-9ea9-c64290225e4e\",\"name\":\"Electronic
                        Pop Singer\",\"description\":\"A modern electronic music
                        style pop singer, skilled in dynamic rhythms and
                        synthesizer
                        tones\",\"vocal_start\":0,\"vocal_end\":30,\"style\":\"Electronic
                        Pop\"}","model":"ai-music-api/generate-persona"}
                      resultJson: >-
                        {"description":"A modern electronic music style pop
                        singer, skilled in dynamic rhythms and synthesizer
                        tones","name":"Electronic Pop
                        Singer","persona_id":"6096c3d052013da4a31071479000ff16"}
                      failCode: null
                      failMsg: null
                      costTime: 42
                      completeTime: 1795014939000
                      createTime: 1795014897000
                      updateTime: 1795014939000
                      response:
                        description: >-
                          A modern electronic music style pop singer, skilled in
                          dynamic rhythms and synthesizer tones
                        name: Electronic Pop Singer
                        persona_id: 6096c3d052013da4a31071479000ff16
                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
              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/SunoPersonaResponseData'
          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
    SunoPersonaResponseData:
      additionalProperties: false
      description: The generated Persona.
      properties:
        persona_id:
          description: >-
            Persona ID. Pass it as is in `input.persona_id` of Generate music,
            Extend music, Upload and cover or Upload and extend (with
            `persona_model` `style_persona`) to create music with similar style
            characteristics.
          type: string
        name:
          description: Persona name, the `name` of the request.
          type: string
        description:
          description: Persona description, the `description` of the request.
          type: string
      required:
        - persona_id
        - name
        - description
      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.