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"
}
'import requests
url = "https://api.kie.ai/api/v1/generate/get-timestamped-lyrics"
payload = {
"taskId": "5c79****be8e",
"audioId": "e231****-****-****-****-****8cadc7dc"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({taskId: '5c79****be8e', audioId: 'e231****-****-****-****-****8cadc7dc'})
};
fetch('https://api.kie.ai/api/v1/generate/get-timestamped-lyrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kie.ai/api/v1/generate/get-timestamped-lyrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'taskId' => '5c79****be8e',
'audioId' => 'e231****-****-****-****-****8cadc7dc'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kie.ai/api/v1/generate/get-timestamped-lyrics"
payload := strings.NewReader("{\n \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kie.ai/api/v1/generate/get-timestamped-lyrics")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kie.ai/api/v1/generate/get-timestamped-lyrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\"\n}"
response = http.request(request)
puts response.read_body{
"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
}
}Suno API
Get Timestamped Lyrics
Retrieve synchronized lyrics with precise timestamps for music tracks.
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"
}
'import requests
url = "https://api.kie.ai/api/v1/generate/get-timestamped-lyrics"
payload = {
"taskId": "5c79****be8e",
"audioId": "e231****-****-****-****-****8cadc7dc"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({taskId: '5c79****be8e', audioId: 'e231****-****-****-****-****8cadc7dc'})
};
fetch('https://api.kie.ai/api/v1/generate/get-timestamped-lyrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kie.ai/api/v1/generate/get-timestamped-lyrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'taskId' => '5c79****be8e',
'audioId' => 'e231****-****-****-****-****8cadc7dc'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kie.ai/api/v1/generate/get-timestamped-lyrics"
payload := strings.NewReader("{\n \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kie.ai/api/v1/generate/get-timestamped-lyrics")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kie.ai/api/v1/generate/get-timestamped-lyrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"taskId\": \"5c79****be8e\",\n \"audioId\": \"e231****-****-****-****-****8cadc7dc\"\n}"
response = http.request(request)
puts response.read_body{
"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
taskIdandaudioIdare required to identify the specific track - The
taskIdcomes from either “Generate Music” or “Extend Music” endpoints - The
audioIdidentifies 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
All APIs require authentication via Bearer Token.
Get API Key:
- 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
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"
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
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 Error message when code != 200
Example:
"success"
Show child attributes
Show child attributes
