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

# Get Timestamped Lyrics

> Retrieve synchronized lyrics with precise timestamps

<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 retrieves synchronized lyrics with precise timestamps for generated audio tracks
* Use this to create karaoke-style displays, subtitles, or lyric visualizations
* Requires a completed music generation task with vocals

## Parameter Details

* Required parameters:

  * `task_id`: The unique identifier from a previous music generation task

  * `audio_id`: The specific audio track identifier from the task result

* Both identifiers are obtained from the response of music generation endpoints or their callbacks

## Developer Notes

* This endpoint only works with audio tracks that contain vocals
* The `hoot_cer` (Character Error Rate) value indicates alignment precision - lower values mean better accuracy
* Use `waveform_data` for creating audio visualizations alongside the lyrics

## Response Fields

* `aligned_words` (array): List of lyric words with timing information
  * `word` (string): The lyric text, may include section markers like `[Verse]`, `[Chorus]`
  * `start_s` (number): Word start time in seconds
  * `end_s` (number): Word end time in seconds
  * `success` (boolean): Whether the word was successfully aligned
  * `palign` (number): Alignment confidence score

* `waveform_data` (array): Numerical data for audio waveform visualization

* `hoot_cer` (number): Alignment precision score (Character Error Rate)

* `is_streamed` (boolean): Indicates if the audio is a streamed track


## OpenAPI

````yaml /api-manual/music-series/get-timestamped-lyrics.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Get Timestamped Lyrics API
  description: Retrieve synchronized lyrics with precise timestamps
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Music Generation
      summary: Submit Get Timestamped Lyrics Task
      description: >-
        Retrieve synchronized lyrics with precise timestamps for a generated
        audio track
      operationId: submitGetTimestampedLyricsTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              basic:
                summary: Get Lyrics with Timestamps
                value:
                  model: get-timestamped-lyrics
                  callback_url: https://your-domain.com/callback
                  input:
                    task_id: task-unified-1757165031-uyujaw3d
                    audio_id: e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc
      responses:
        '200':
          description: Timestamped lyrics retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LyricsResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 404
                error:
                  message: Task or audio not found
                  type: not_found_error
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: |-
            API model identifier.

            Must be `get-timestamped-lyrics` for this endpoint.
          enum:
            - get-timestamped-lyrics
          example: get-timestamped-lyrics
        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
          description: Input parameters for retrieving timestamped lyrics
          properties:
            task_id:
              type: string
              description: >-
                Unique identifier of the music generation task.


                Obtained from the response of a previous music generation
                request.
              example: task-unified-1757165031-uyujaw3d
            audio_id:
              type: string
              description: |-
                Unique identifier of the specific audio track.

                Obtained from the task result or callback response.
              example: e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc
    LyricsResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          description: HTTP status code
        data:
          type: object
          properties:
            aligned_words:
              type: array
              description: List of aligned lyric words with timing information
              items:
                type: object
                properties:
                  word:
                    type: string
                    description: The lyric text (may include section markers like [Verse])
                    example: '[Verse] Waggin'''
                  success:
                    type: boolean
                    description: Whether the word was successfully aligned
                    example: true
                  start_s:
                    type: number
                    description: Start time of the word in seconds
                    example: 1.36
                  end_s:
                    type: number
                    description: End time of the word in seconds
                    example: 1.79
                  palign:
                    type: number
                    description: Alignment confidence score
                    example: 0
            waveform_data:
              type: array
              description: Waveform data for audio visualization
              items:
                type: number
              example:
                - 0
                - 1
                - 0.5
                - 0.75
            hoot_cer:
              type: number
              description: |-
                Lyrics alignment precision score (Character Error Rate).

                Lower values indicate better alignment accuracy.
              example: 0.38
            is_streamed:
              type: boolean
              description: Indicates whether this is a streamed audio track
              example: false
    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

        ```

````