Submit Get Timestamped Lyrics Task
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "get-timestamped-lyrics",
"callback_url": "https://your-domain.com/callback",
"input": {
"task_id": "task-unified-1757165031-uyujaw3d",
"audio_id": "e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc"
}
}
'import requests
url = "https://api.poyo.ai/api/generate/submit"
payload = {
"model": "get-timestamped-lyrics",
"callback_url": "https://your-domain.com/callback",
"input": {
"task_id": "task-unified-1757165031-uyujaw3d",
"audio_id": "e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc"
}
}
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({
model: 'get-timestamped-lyrics',
callback_url: 'https://your-domain.com/callback',
input: {
task_id: 'task-unified-1757165031-uyujaw3d',
audio_id: 'e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc'
}
})
};
fetch('https://api.poyo.ai/api/generate/submit', 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.poyo.ai/api/generate/submit",
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([
'model' => 'get-timestamped-lyrics',
'callback_url' => 'https://your-domain.com/callback',
'input' => [
'task_id' => 'task-unified-1757165031-uyujaw3d',
'audio_id' => 'e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc'
]
]),
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.poyo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"get-timestamped-lyrics\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"task-unified-1757165031-uyujaw3d\",\n \"audio_id\": \"e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc\"\n }\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.poyo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"get-timestamped-lyrics\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"task-unified-1757165031-uyujaw3d\",\n \"audio_id\": \"e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.poyo.ai/api/generate/submit")
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 \"model\": \"get-timestamped-lyrics\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"task-unified-1757165031-uyujaw3d\",\n \"audio_id\": \"e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"aligned_words": [
{
"word": "[Verse] Waggin'",
"success": true,
"start_s": 1.36,
"end_s": 1.79,
"palign": 0
}
],
"waveform_data": [
0,
1,
0.5,
0.75
],
"hoot_cer": 0.38,
"is_streamed": false
}
}{
"code": 404,
"error": {
"message": "Task or audio not found",
"type": "not_found_error"
}
}Suno AI
Get Timestamped Lyrics
Retrieve synchronized lyrics with precise timestamps
POST
/
api
/
generate
/
submit
Submit Get Timestamped Lyrics Task
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "get-timestamped-lyrics",
"callback_url": "https://your-domain.com/callback",
"input": {
"task_id": "task-unified-1757165031-uyujaw3d",
"audio_id": "e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc"
}
}
'import requests
url = "https://api.poyo.ai/api/generate/submit"
payload = {
"model": "get-timestamped-lyrics",
"callback_url": "https://your-domain.com/callback",
"input": {
"task_id": "task-unified-1757165031-uyujaw3d",
"audio_id": "e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc"
}
}
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({
model: 'get-timestamped-lyrics',
callback_url: 'https://your-domain.com/callback',
input: {
task_id: 'task-unified-1757165031-uyujaw3d',
audio_id: 'e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc'
}
})
};
fetch('https://api.poyo.ai/api/generate/submit', 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.poyo.ai/api/generate/submit",
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([
'model' => 'get-timestamped-lyrics',
'callback_url' => 'https://your-domain.com/callback',
'input' => [
'task_id' => 'task-unified-1757165031-uyujaw3d',
'audio_id' => 'e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc'
]
]),
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.poyo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"get-timestamped-lyrics\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"task-unified-1757165031-uyujaw3d\",\n \"audio_id\": \"e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc\"\n }\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.poyo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"get-timestamped-lyrics\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"task-unified-1757165031-uyujaw3d\",\n \"audio_id\": \"e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.poyo.ai/api/generate/submit")
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 \"model\": \"get-timestamped-lyrics\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"task-unified-1757165031-uyujaw3d\",\n \"audio_id\": \"e231xxxx-xxxx-xxxx-xxxx-xxxx8cadc7dc\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"aligned_words": [
{
"word": "[Verse] Waggin'",
"success": true,
"start_s": 1.36,
"end_s": 1.79,
"palign": 0
}
],
"waveform_data": [
0,
1,
0.5,
0.75
],
"hoot_cer": 0.38,
"is_streamed": false
}
}{
"code": 404,
"error": {
"message": "Task or audio not found",
"type": "not_found_error"
}
}- After submission, a
task_idwill be returned. If you provided acallback_url, when the task status becomesfinishedorfailed, a POST request will be sent to thecallback_url. - Regardless of whether
callback_urlis provided, you can retrieve the response result through the unified Query Music Detail endpoint.
Usage Guide
- This endpoint retrieves synchronized lyrics with precise timestamps for generated audio tracks
- Use this to create karaoke-style displays, subtitles, or lyric visualizations
- Requires a completed music generation task with vocals
Parameter Details
-
Required parameters:
-
task_id: The unique identifier from a previous music generation task -
audio_id: The specific audio track identifier from the task result
-
- Both identifiers are obtained from the response of music generation endpoints or their callbacks
Developer Notes
- This endpoint only works with audio tracks that contain vocals
- The
hoot_cer(Character Error Rate) value indicates alignment precision - lower values mean better accuracy - Use
waveform_datafor creating audio visualizations alongside the lyrics
Response Fields
-
aligned_words(array): List of lyric words with timing informationword(string): The lyric text, may include section markers like[Verse],[Chorus]start_s(number): Word start time in secondsend_s(number): Word end time in secondssuccess(boolean): Whether the word was successfully alignedpalign(number): Alignment confidence score
-
waveform_data(array): Numerical data for audio waveform visualization -
hoot_cer(number): Alignment precision score (Character Error Rate) -
is_streamed(boolean): Indicates if the audio is a streamed track
Authorizations
All API endpoints require Bearer Token authentication
Get your API Key:
Visit the API Key Management Page to get your API Key
Add it to the request header:
Authorization: Bearer PoYo_API_KEY
Body
application/json
API model identifier.
Must be get-timestamped-lyrics for this endpoint.
Available options:
get-timestamped-lyrics Example:
"get-timestamped-lyrics"
Input parameters for retrieving timestamped lyrics
Show child attributes
Show child attributes
Webhook callback URL for result notifications
Example:
"https://your-domain.com/callback"
