POST
/
api
/
v1
/
generate
/
get-timestamped-lyrics
Get Timestamped Lyrics
curl --request POST \
  --url https://api.sunoapi.org/api/v1/generate/get-timestamped-lyrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "taskId": "5c79****be8e",
  "audioId": "5c79****be8e",
  "musicIndex": 0
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "alignedWords": [
      {
        "word": "[Verse]\nWaggin'",
        "success": true,
        "start_s": 1.36,
        "end_s": 1.79,
        "p_align": 0
      }
    ],
    "waveformData": [
      0,
      1,
      0.5,
      0.75
    ],
    "hootCer": 0.3803191489361702,
    "isStreamed": false
  }
}

Parameter Selection Logic

  1. audioId and musicIndex matching priority:
    • If only audioId is provided: Match by audioId
    • If only musicIndex is provided: Match by index position
    • If both are provided: Try audioId first, fall back to musicIndex if not found

Developer Notes

  1. Timestamp values are in seconds
  2. Returned waveform data can be used for audio visualization
  3. For instrumental tracks (generated with instrumental=true), no lyrics data will be available
  4. Typical use case: Karaoke-style lyrics display in music player interfaces

Authorizations

Authorization
string
header
required

🔑 API Authentication

All endpoints require authentication using Bearer Token.

Get API Key

  1. Visit the API Key Management Page to obtain your API Key

Usage

Add to request headers:

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 from the management page

Body

application/json

Response

200
application/json

Request successful

The response is of type object.