Skip to main content
POST
/
api
/
v1
/
generate
/
get-timestamped-lyrics
Get Timestamped Lyrics
curl --request POST \
  --url https://api.kie.ai/api/v1/generate/get-timestamped-lyrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "taskId": "5c79****be8e",
  "audioId": "e231****-****-****-****-****8cadc7dc"
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "alignedWords": [
      {
        "word": "[Verse]\nWaggin'",
        "success": true,
        "startS": 1.36,
        "endS": 1.79,
        "palign": 0
      }
    ],
    "waveformData": [
      0,
      1,
      0.5,
      0.75
    ],
    "hootCer": 0.3803191489361702,
    "isStreamed": false
  }
}

Usage Guide

  • Use this endpoint to get lyrics that synchronize with audio playback
  • Implement karaoke-style lyric displays in your music players
  • Create visualizations that match audio timing

Parameter Details

  • Both taskId and audioId are required to identify the specific track
  • The taskId comes from either “Generate Music” or “Extend Music” endpoints
  • The audioId identifies the specific track version when multiple were generated

Developer Notes

  • Timestamps are provided in seconds for precise synchronization
  • Waveform data is included for audio visualization implementations
  • For instrumental tracks (created with instrumental=true), no lyrics data will be returned

Authorizations

Authorization
string
header
required

All APIs require authentication via Bearer Token.

Get API Key:

  1. Visit API Key Management Page to get your API Key

Usage: Add to request header: Authorization: Bearer YOUR_API_KEY

Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately in the management page

Body

application/json
taskId
string
required

Unique identifier of the music generation task. This should be a taskId returned from either the "Generate Music" or "Extend Music" endpoints.

Example:

"5c79****be8e"

audioId
string
required

Unique identifier of the specific audio track for which to retrieve lyrics. This ID is returned in the callback data after music generation completes.

Example:

"e231****-****-****-****-****8cadc7dc"

Response

Request successful

code
enum<integer>

Response status code

  • 200: Success - Request has been processed successfully
  • 401: Unauthorized - Authentication credentials are missing or invalid
  • 404: Not Found - The requested resource or endpoint does not exist
  • 422: Validation Error - The request parameters failed validation checks
  • 429: Rate Limited - Request limit has been exceeded for this resource
  • 451: Unauthorized - Failed to fetch the image. Kindly verify any access limits set by you or your service provider.
  • 455: Service Unavailable - System is currently undergoing maintenance
  • 500: Server Error - An unexpected error occurred while processing the request
Available options:
200,
401,
404,
422,
429,
451,
455,
500
msg
string

Error message when code != 200

Example:

"success"

data
object
I