> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Persona

> Create reusable musical personas from existing audio tracks

<Tip>
  1. After submission, a `task_id` will be returned. If you provided a `callback_url`, when the task status becomes `finished` or `failed`, a POST request will be sent to the `callback_url`.
  2. Regardless of whether `callback_url` is provided, you can retrieve the response result through the unified [Query Music Detail](/api-manual/music-series/query-music-detail) endpoint.
</Tip>

## Usage Guide

* This endpoint creates a reusable musical persona from an existing audio track
* Personas capture the vocal style, genre characteristics, and musical personality
* Once created, personas can be used with the Generate Music endpoint via the `persona_id` parameter

## Parameter Details

* `task_id` (required): Task ID from a completed music generation ([Generate](/api-manual/music-series/generate-music), [Extend](/api-manual/music-series/extend-music), [Upload Cover](/api-manual/music-series/upload-and-cover-audio), or [Upload Extend](/api-manual/music-series/upload-and-extend-audio))
* `audio_id` (required): Specific audio track identifier from the callback data
* `name` (required): A descriptive name that captures the musical style or character
* `description` (required): Detailed description including:
  * Genre and mood
  * Instrumentation preferences
  * Vocal characteristics
  * Unique musical personality traits

## Developer Notes

* Each audio track can only have one persona created from it
* If a persona already exists for the audio, the API returns error code 409
* You can apply the `persona_id` to the following endpoints:
  * [Generate Music](/api-manual/music-series/generate-music)
  * [Extend Music](/api-manual/music-series/extend-music)
  * [Upload And Cover Audio](/api-manual/music-series/upload-and-cover-audio)
  * [Upload And Extend Audio](/api-manual/music-series/upload-and-extend-audio)
* Provide detailed descriptions for best results when using the persona


## OpenAPI

````yaml /api-manual/music-series/generate-persona.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Generate Persona API
  description: Create reusable musical personas from existing audio tracks
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Persona
      summary: Submit Generate Persona Task
      description: Create a reusable musical persona from an existing audio track
      operationId: submitGeneratePersonaTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              jazz-persona:
                summary: Create Jazz Singer Persona
                value:
                  model: generate-persona
                  callback_url: https://your-domain.com/callback
                  input:
                    task_id: 5c79xxxxbe8e
                    audio_id: e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc
                    name: Smooth Jazz Singer
                    description: >-
                      A sultry jazz vocalist with smooth, mellow tones.
                      Specializes in late-night jazz ballads with piano
                      accompaniment and warm, intimate delivery.
              rock-persona:
                summary: Create Rock Band Persona
                value:
                  model: generate-persona
                  callback_url: https://your-domain.com/callback
                  input:
                    task_id: 5c79xxxxbe8e
                    audio_id: e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc
                    name: Electric Rock Band
                    description: >-
                      High-energy rock band with powerful guitar riffs, driving
                      drums, and passionate vocals. Perfect for anthemic rock
                      songs and energetic performances.
      responses:
        '200':
          description: Task submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '409':
          description: Persona already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 409
                error:
                  message: Persona already exists for this audio
                  type: conflict_error
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: |-
            API model identifier.

            Must be `generate-persona` for this endpoint.
          enum:
            - generate-persona
          example: generate-persona
        callback_url:
          type: string
          format: uri
          description: Webhook callback URL for result notifications
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - task_id
            - audio_id
            - name
            - description
          description: Input parameters for persona generation
          properties:
            task_id:
              type: string
              description: >-
                Unique identifier of the original music generation task.


                Can be from Generate Music, Extend Music, Upload Cover, or
                Upload Extend endpoints.
              example: 5c79xxxxbe8e
            audio_id:
              type: string
              description: >-
                Unique identifier of the audio track to create Persona for.


                This ID is returned in the callback data after music generation
                completes.
              example: e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc
            name:
              type: string
              description: |-
                Descriptive name for the persona.

                Should capture the musical style or character of the persona.
              example: Smooth Jazz Singer
            description:
              type: string
              description: >-
                Detailed description of the Persona's musical characteristics,
                style, and personality.


                Include details about genre, mood, instrumentation, vocal style,
                and any unique characteristics.
              example: >-
                A sultry jazz vocalist with smooth, mellow tones. Specializes in
                late-night jazz ballads with piano accompaniment.
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          description: HTTP status code
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
              description: Unique task identifier for status tracking
            status:
              type: string
              enum:
                - not_started
              example: not_started
              description: Initial task status
            created_time:
              type: string
              format: date-time
              example: '2025-11-12T10:30:00'
              description: ISO 8601 timestamp when the task was created
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          description: HTTP status code
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
              description: Error message describing what went wrong
            type:
              type: string
              example: invalid_request_error
              description: Error type identifier
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All API endpoints require Bearer Token authentication


        Get your API Key:


        Visit the [API Key Management
        Page](https://vidgo.ai/apis/dashboard/api-key) to get your API Key


        Add it to the request header:


        ```

        Authorization: Bearer VIDGO_API_KEY

        ```

````