Get Timestamped Lyrics
curl --request POST \
--url https://apibox.erweima.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://apibox.erweima.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://apibox.erweima.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://apibox.erweima.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://apibox.erweima.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://apibox.erweima.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://apibox.erweima.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
}
}Generate Music
Get Timestamped Lyrics
Retrieve timestamped lyrics for synchronized display during audio playback.
POST
/
api
/
v1
/
generate
/
get-timestamped-lyrics
Get Timestamped Lyrics
curl --request POST \
--url https://apibox.erweima.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://apibox.erweima.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://apibox.erweima.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://apibox.erweima.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://apibox.erweima.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://apibox.erweima.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://apibox.erweima.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
}
}Parameter Selection Logic
- 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
- Timestamp values are in seconds
- Returned waveform data can be used for audio visualization
- For instrumental tracks (generated with instrumental=true), no lyrics data will be available
- Typical use case: Karaoke-style lyrics display in music player interfaces
Authorizations
🔑 API Authentication
All endpoints require authentication using Bearer Token.
Get API Key
- 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
The task ID of the music generation task. Required to identify which generation task contains the lyrics.
Example:
"5c79****be8e"
The specific audio ID to retrieve lyrics for.
- Required to identify the exact track.
- This parameter is required to identify which audio track to get lyrics from.
Example:
"e231****-****-****-****-****8cadc7dc"
Response
Request successful
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
Error message when code != 200
Example:
"success"
Show child attributes
Show child attributes
