Get Aligned Lyrics Endpoint
Overview
Retrieves word-level timestamp alignment for lyrics of a song. Returns timing information for each word in the lyrics.
🔗 Quick Links
- 📊 Dashboard - Manage accounts, view logs, and monitor system status
- 📚 API Index - Complete API reference
Endpoint
GET /api/get_aligned_lyrics?song_id=song-id
GET /[accountId]/api/get_aligned_lyrics?song_id=song-id
Request
Query Parameters
song_id (string, required)
ID of the song to get aligned lyrics for
Example Request
curl "https://your-domain.com/api/get_aligned_lyrics?song_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890"
const response = await fetch('/api/get_aligned_lyrics?song_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890');
Response
Success Response (200 OK)
Returns lyric alignment data with timestamps:
{
"words": [
{
"word": "Hello",
"start": 0.0,
"end": 0.5
},
{
"word": "world",
"start": 0.5,
"end": 1.0
}
]
}
Status Code: 200
Content-Type: application/json
Note: Actual response structure depends on Suno API response format.
Bad Request (400)
When song_id is missing:
{
"error": "Song ID is required"
}
Status Code: 400
Content-Type: application/json
Internal Server Error (500)
When an error occurs:
{
"error": "Internal server error. [error details]"
}
Status Code: 500
Content-Type: application/json
Method Not Allowed (405)
When using an unsupported HTTP method:
Status Code: 405
Headers: Allow: GET
Notes
- Returns word-level timing information for lyrics
- Useful for creating karaoke-style displays or lyric synchronization
- All responses include CORS headers