> ## 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: Create task

> Synchronous endpoint: `model` picks the endpoint and the parameters go in `input`; the result comes back in `data` of the response, with nothing to poll. Every response has HTTP status 200; check `code`.



## OpenAPI

````yaml /openapi/en/suno-persona.json post /api/v1/jobs/createTask
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/createTask:
    post:
      tags:
        - Suno Generate Persona
      summary: Create task
      description: >-
        Synchronous endpoint: `model` picks the endpoint and the parameters go
        in `input`; the result comes back in `data` of the response, with
        nothing to poll. Every response has HTTP status 200; check `code`.
      operationId: sunoCreateTask
      requestBody:
        content:
          application/json:
            examples:
              With an analysed segment:
                description: Analyse the first 30 seconds of the track and add a style tag.
                summary: With an analysed segment
                value:
                  model: ai-music-api/generate-persona
                  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
              Required parameters only:
                description: Use the default analysed segment (0–30 seconds).
                summary: Required parameters only
                value:
                  model: ai-music-api/generate-persona
                  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
            schema:
              $ref: '#/components/schemas/SunoCreateTaskRequestSunoPersonaInput'
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                Created:
                  description: The result is returned at once; `data` is the result.
                  summary: Created
                  value:
                    code: 200
                    data:
                      description: >-
                        A modern electronic music style pop singer, skilled in
                        dynamic rhythms and synthesizer tones
                      name: Electronic Pop Singer
                      persona_id: 6096c3d052013da4a31071479000ff16
                    msg: success
                Invalid request (422):
                  description: The request is invalid; no task is created or charged.
                  summary: Invalid request (422)
                  value:
                    code: 422
                    msg: >-
                      input.vocal_end - input.vocal_start must be between 10 and
                      30 seconds.
                    data: null
                Unusable source task (422):
                  description: >-
                    `task_id` is unknown, belongs to another account or does not
                    meet the condition in `msg`; no task is created or charged.
                  summary: Unusable source task (422)
                  value:
                    code: 422
                    msg: >-
                      input.task_id must be a succeeded task of this account
                      created in the last 14 days.
                    data: null
                Unauthorized (401):
                  description: Missing or invalid API Key.
                  summary: Unauthorized (401)
                  value:
                    code: 401
                    msg: >-
                      Unauthorized - Authentication credentials are missing or
                      invalid
                    data: null
                Insufficient balance (402):
                  description: The balance does not cover the task.
                  summary: Insufficient balance (402)
                  value:
                    code: 402
                    msg: >-
                      Insufficient Credits - Account does not have enough
                      credits to perform the operation
                    data: null
                Rate limited (429):
                  description: Rate limit exceeded; retry later.
                  summary: Rate limited (429)
                  value:
                    code: 429
                    msg: >-
                      Rate Limited - Request limit has been exceeded for this
                      resource
                    data: null
                Server error (500):
                  description: >-
                    The service is temporarily unavailable; retry later. Not
                    charged.
                  summary: Server error (500)
                  value:
                    code: 500
                    msg: >-
                      Server Error - An unexpected error occurred while
                      processing the request
                    data: null
              schema:
                $ref: '#/components/schemas/SunoSyncCreateResponse'
          description: >-
            Always HTTP 200. With `code` `200` the task was created and
            `data.taskId` is its ID; any other `code` is an error with the
            reason in `msg` and `data` `null`.
          headers:
            X-Request-Id:
              description: ID of this request; include it when reporting issues.
              schema:
                type: string
components:
  schemas:
    SunoCreateTaskRequestSunoPersonaInput:
      additionalProperties: false
      description: Request body of createTask.
      properties:
        model:
          default: ai-music-api/generate-persona
          description: |-
            Endpoint name; it decides the fields of `input`.

            **Allowed values:**
            - `ai-music-api/generate-persona`: Suno Generate Persona
          enum:
            - ai-music-api/generate-persona
          type: string
        callBackUrl:
          description: >-
            Optional URL that receives a callback when the task finishes
            (success or failure); it must be a public `http` / `https` URL.
            Recommended in production; you can also just poll the query
            endpoint. See Task callback for the body and signature.
          type: string
        input:
          $ref: '#/components/schemas/SunoPersonaInput'
          description: Task parameters; the fields depend on `model`.
      required:
        - model
        - input
      type: object
    SunoSyncCreateResponse:
      additionalProperties: false
      description: >-
        Response of createTask for a synchronous endpoint; `data` is the result.
        Always HTTP 200.
      properties:
        code:
          description: >-
            Result code:

            - `200`: success

            - `401`: missing or invalid API Key

            - `402`: insufficient balance

            - `404`: the model does not exist or is not enabled

            - `405`: wrong HTTP method

            - `422`: invalid request, with the reason in `msg`; no task is
            created or charged

            - `429`: too many requests; retry later

            - `455`: service under maintenance

            - `500`: server error; retry later

            - `501`: generation failed

            - `505`: feature disabled
          format: int64
          type: integer
        msg:
          description: 'Message: `success`, or the English reason of an error.'
          type: string
        data:
          $ref: '#/components/schemas/SunoPersonaResponseData'
          description: The result on success; `null` on error.
      required:
        - code
        - msg
        - data
      type: object
    SunoPersonaInput:
      additionalProperties: false
      description: Parameters of `ai-music-api/generate-persona`.
      properties:
        task_id:
          description: >-
            Required source task ID: a Suno task of this account that succeeded
            on DreamTo within the last 14 days (the `data.taskId` returned by
            createTask). An unknown task, a task of another account, one that
            has not succeeded, is older than 14 days or is not a usable kind of
            task returns `code: 422`; no task is created or charged. It must be
            a finished music task (generate, extend, upload and cover / extend,
            add vocals, add instrumental, replace section or mashup).
          type: string
        audio_id:
          description: >-
            Required ID of one track of the source task: `response.data[].id` of
            its result. Each track makes one Persona; calling again returns the
            same `persona_id`.
          type: string
        name:
          description: >-
            Required Persona name: an easily recognizable name that captures the
            essence of its musical style or character.
          type: string
        description:
          description: >-
            Required description of the Persona's musical characteristics, style
            and personality; be specific about genre, mood, instrumentation and
            vocal qualities.
          type: string
        vocal_start:
          default: 0
          description: >-
            Optional start (seconds) of the audio segment analysed for the
            Persona, at least `0`, default `0`. It must be less than
            `vocal_end`, and `vocal_end - vocal_start` must be `10`–`30` seconds
            (a missing end takes its default).
          format: double
          minimum: 0
          type: number
        vocal_end:
          default: 30
          description: >-
            Optional end (seconds) of the audio segment analysed for the
            Persona, at least `0` with at most 2 decimal places, default `30`.
            Together with `vocal_start` it sets the analysed range; `vocal_end -
            vocal_start` must be `10`–`30` seconds.
          format: double
          minimum: 0
          multipleOf: 0.01
          type: number
        style:
          description: >-
            Optional music style tag supplementing the Persona, such as
            `Electronic Pop` or `Jazz Trio`.
          type: string
      required:
        - task_id
        - audio_id
        - name
        - description
      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.