AI Music API
HomeGet API key
HomeGet API key
  1. sonic
  • Introduction
  • Credits Usage Guide
  • AI Music API FAQ & Troubleshooting
  • Special Scenarios
  • Error handling
  • Webhook Integration Guide
  • sonic
    • Sonic Instructions
    • download (mp3 / m4a / wav)
      POST
    • replace section
      POST
    • create / extend / cover music
      POST
    • upload and extend music
      POST
    • upload and cover music
      POST
    • create persona
      POST
    • sample
      POST
    • mashup
      POST
    • get BPM
      POST
    • get VOX
      POST
    • get wav
      POST
    • get midi
      POST
    • get lyrics timeline
      POST
    • upsample tags
      POST
    • concat music
      POST
    • stems basic
      POST
    • stems full
      POST
    • remaster
      POST
    • add vocal
      POST
    • add instrumental
      POST
    • upload music
      POST
    • create voice
      POST
    • get music
      GET
  • riffusion(Deprecated)
    • Riffusion instructions
    • create music (with lyrics)
    • create music (with description)
    • cover music
    • extend music
    • replace music section
    • swap music sound
    • swap music vocals
    • upload
    • get music
  • producer
    • Producer Instructions
    • Complete Request Example
    • create music
    • upload
    • download
    • get task / poll result
  • nuro
    • Nuro Instruction
    • Error handling
    • create vocal music
    • create instrument music
    • get music
  • lyrics generation
    • Make Lyrics
  • get-credits
    GET
  1. sonic

get lyrics timeline

POST
https://api.aimusicapi.ai/api/v1/sonic/aligned-lyrics
Get the lyric timeline for the specified clip_id.

granularity (optional)#

token (default): data.alignment only, exactly as before. Records are sub-word tokens (e.g. "Hard", "-luck"), and the punctuation / line break that ends a line is attached to the FIRST token of the next line.
word: returns data.alignment unchanged plus data.words, one record per whole word:
type: "word": whole word with trailing punctuation attached. end_s is taken from the word's last letter, so closing punctuation never stretches a line into the next one.
type: "section": section tags such as [Verse 2]. Not sung, so start_s / end_s are null.
type: "parenthetical": text in ( ). It can be a stage direction ((Laugh)) or sung backing vocals ((oh, oh)), so it is flagged rather than removed.
line: 0-based index of the lyric line. Blank lines are not counted, so records sharing a line form one displayed line.
Chinese, Japanese, Thai and other scripts written without spaces keep the original token boundaries.

Notes on timing#

Timings are on an ~80 ms grid; no finer resolution is available.
p_align and success are always 1 and true. They do not indicate alignment confidence and should not be used to filter records.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/jsonRequired

Example
{
    "clip_id": "45021de5-2142-4ebb-9e46-6f3e345f7486",
    "granularity": "word"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.aimusicapi.ai/api/v1/sonic/aligned-lyrics' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "clip_id": "45021de5-2142-4ebb-9e46-6f3e345f7486",
    "granularity": "word"
}'

Responses

🟢200Success
application/json
Bodyapplication/json

Examples
{
    "code": 200,
    "data": {
        "alignment": [
            {
                "word": "[Verse 1]\n\n\n[Acoustic Guitar][Emotional Melody][Powerful Vocals]\nHard",
                "end_s": 1.2766,
                "p_align": 1,
                "start_s": 0.87766,
                "success": true
            },
            {
                "word": "-luck",
                "end_s": 1.59574,
                "p_align": 1,
                "start_s": 1.2766,
                "success": true
            },
            {
                "word": " town",
                "end_s": 1.99468,
                "p_align": 1,
                "start_s": 1.59574,
                "success": true
            },
            {
                "word": ", you",
                "end_s": 2.79255,
                "p_align": 1,
                "start_s": 2.39362,
                "success": true
            },
            {
                "word": " learned",
                "end_s": 3.75,
                "p_align": 1,
                "start_s": 3.1117,
                "success": true
            },
            {
                "word": " to",
                "end_s": 4.06915,
                "p_align": 1,
                "start_s": 3.82979,
                "success": true
            },
            {
                "word": " run",
                "end_s": 4.62766,
                "p_align": 1,
                "start_s": 4.30851,
                "success": true
            },
            {
                "word": ",\nBr",
                "end_s": 7.10106,
                "p_align": 1,
                "start_s": 7.02128,
                "success": true
            },
            {
                "word": "u",
                "end_s": 7.18085,
                "p_align": 1,
                "start_s": 7.10106,
                "success": true
            },
            {
                "word": "ised",
                "end_s": 7.5,
                "p_align": 1,
                "start_s": 7.18085,
                "success": true
            },
            {
                "word": " knees",
                "end_s": 8.05851,
                "p_align": 1,
                "start_s": 7.57979,
                "success": true
            },
            {
                "word": ", brave",
                "end_s": 8.93617,
                "p_align": 1,
                "start_s": 8.53723,
                "success": true
            },
            {
                "word": " heart",
                "end_s": 9.41489,
                "p_align": 1,
                "start_s": 8.93617,
                "success": true
            },
            {
                "word": ", never",
                "end_s": 10.29255,
                "p_align": 1,
                "start_s": 9.73404,
                "success": true
            },
            {
                "word": " done",
                "end_s": 10.77128,
                "p_align": 1,
                "start_s": 10.37234,
                "success": true
            },
            {
                "word": ".\nPain",
                "end_s": 13.48404,
                "p_align": 1,
                "start_s": 13.08511,
                "success": true
            },
            {
                "word": " hit",
                "end_s": 13.80319,
                "p_align": 1,
                "start_s": 13.48404,
                "success": true
            },
            {
                "word": " early",
                "end_s": 14.3617,
                "p_align": 1,
                "start_s": 13.88298,
                "success": true
            },
            {
                "word": ", car",
                "end_s": 15.47872,
                "p_align": 1,
                "start_s": 15.31915,
                "success": true
            },
            {
                "word": "ved",
                "end_s": 15.71809,
                "p_align": 1,
                "start_s": 15.47872,
                "success": true
            },
            {
                "word": " you",
                "end_s": 16.19681,
                "p_align": 1,
                "start_s": 15.87766,
                "success": true
            },
            {
                "word": " strong",
                "end_s": 16.99468,
                "p_align": 1,
                "start_s": 16.43617,
                "success": true
            },
            {
                "word": ",\nYou",
                "end_s": 19.14894,
                "p_align": 1,
                "start_s": 18.75,
                "success": true
            },
            {
                "word": " turned",
                "end_s": 19.54787,
                "p_align": 1,
                "start_s": 19.14894,
                "success": true
            },
            {
                "word": " the",
                "end_s": 19.78723,
                "p_align": 1,
                "start_s": 19.54787,
                "success": true
            },
            {
Modified at 2026-09-29 13:53:35
Previous
get midi
Next
upsample tags
Built with