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

> AI-powered lyrics generation based on themes and descriptions

<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 generates song lyrics based on your theme or description
* Multiple lyric variations may be generated for each request
* Use the generated lyrics with the Generate Music endpoint in Custom Mode

## Parameter Details

* `prompt` (required): Description of the desired lyrics content
  * Be specific about theme, mood, style, or story elements
  * Maximum length: 200 words
  * Include details like genre feel, emotional tone, and narrative elements


## OpenAPI

````yaml /api-manual/music-series/generate-lyrics.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Generate Lyrics API
  description: AI-powered lyrics generation based on themes and descriptions
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Lyrics
      summary: Submit Generate Lyrics Task
      description: Generate song lyrics based on a theme or description
      operationId: submitGenerateLyricsTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              nostalgic-song:
                summary: Nostalgic Childhood Song
                value:
                  model: generate-lyrics
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A nostalgic song about childhood memories and growing up
                      in a small town
              love-song:
                summary: Romantic Love Song
                value:
                  model: generate-lyrics
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A romantic ballad about finding love unexpectedly in the
                      city
      responses:
        '200':
          description: Task submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '413':
          description: Prompt exceeds length limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 413
                error:
                  message: Prompt exceeds maximum length of 200 words
                  type: payload_too_large
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - callback_url
        - input
      properties:
        model:
          type: string
          description: |-
            API model identifier.

            Must be `generate-lyrics` for this endpoint.
          enum:
            - generate-lyrics
          example: generate-lyrics
        callback_url:
          type: string
          format: uri
          description: >-
            Webhook callback URL for result notifications.


            The endpoint will receive POST requests when generation completes,
            including results and variations.
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          description: Input parameters for lyrics generation
          properties:
            prompt:
              type: string
              description: |-
                Description of the desired lyrics content.

                Be specific about theme, mood, style, or story elements.

                Maximum 200 words.
              maxLength: 1500
              example: >-
                A nostalgic song about childhood memories and growing up in a
                small town
    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

        ```

````