Skip to main content
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": "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
  }
}

Parameter Selection Logic

  1. audioId parameter:
    • The audioId parameter is required to identify the exact track
    • Provides a unique identifier for the audio track within the generation task

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
taskId
string
required

The task ID of the music generation task. Required to identify which generation task contains the lyrics.

Example:

"5c79****be8e"

audioId
string
required

Audio ID of the track to retrieve lyrics for.

Example:

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

Response

Request successful

code
enum<integer>

Status Codes

  • ✅ 200 - Request successful
  • ⚠️ 400 - Invalid parameters
  • ⚠️ 401 - Unauthorized access
  • ⚠️ 404 - Invalid request method or path
  • ⚠️ 405 - Rate limit exceeded
  • ⚠️ 413 - Theme or prompt too long
  • ⚠️ 429 - Insufficient credits
  • ⚠️ 430 - Your call frequency is too high. Please try again later.
  • ⚠️ 455 - System maintenance
  • ❌ 500 - Server error
Available options:
200,
400,
401,
404,
405,
413,
429,
430,
455,
500
Example:

200

msg
string

Error message when code != 200

Example:

"success"

data
object