Documentation – LRC Generator & Lyrics File Maker
API Documentation

API Documentation

Generate time-synced LRC lyric files from audio/video programmatically using the AI LRC Generator API.

Overview

The AI LRC Generator API lets you upload audio/video files and receive time-synced LRC lyrics asynchronously. The typical flow is:

  1. Upload + triggerPOST /api/v2/open/audio_analysis (one-step, recommended)
  2. Poll for resultGET /api/v2/open/audio_tasks/:id until status is COMPLETED

Base URL: https://ailrcgenerator.com

Authentication

All requests require an API key in the Authorization header.

Authorization: Bearer ailrc_sk_YOUR_KEY

Create and manage your API keys on the Developer API page. Keys are shown only once at creation — save them immediately.

Treat your API key like a password. Never expose it in client-side code or public repositories.

Rate Limits

The API is currently in public beta. Limits may change based on service capacity and actual usage. For higher-throughput requirements, please contact support.

General request limits are a high-ceiling abuse safeguard covering task submission, task lists, status polling, and other Open API calls. They use a three-layer sliding window (minute / hour / day); hitting any layer returns 429.

TierPer MinutePer HourPer Day
Free306003,000
Pro3006,00030,000
Premium1,00020,000100,000

Analysis submissions are the primary tier limit. Only POST /api/v2/open/audio_analysis counts toward these limits:

TierPer MinutePer HourPer DayIn Flight
Free320501
Pro601,0005,0003
Premium2004,00020,0005

Rate limit state is returned on every response:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1745024400

Exceeding the limit returns 429 Too Many Requests with a Retry-After header indicating how many seconds to wait.

Endpoints

Trigger Analysis

Upload an audio/video file and immediately start AI analysis (one-step mode).

POST /api/v2/open/audio_analysis
Content-Type: multipart/form-data

Request

FieldTypeRequiredNotes
fileFilemp3, wav, ogg, flac, mp4, webm, mov
fileNamestringCustom file name; falls back to original if omitted
metadataJSON stringAI analysis options serialized as JSON

metadata fields

FieldTypeDefaultNotes
enableMetadatabooleantrueUse embedded audio metadata when generating lyrics
referencestring""Reference lyrics or text to assist recognition
languagestringautoLyrics language code, or auto for detection
enableChorusbooleanfalseAdd singer/chorus labels when supported
enableTranslationbooleanfalseGenerate translated lyrics together with the original
sourceLanguagestringautoTranslation source language code, or auto
targetLanguagestringRequired when enableTranslation is true

Size limits by tier: Free 10 MB · Pro 30 MB · Premium 60 MB

Example

curl -X POST https://ailrcgenerator.com/api/v2/open/audio_analysis \
  -H "Authorization: Bearer ailrc_sk_YOUR_KEY" \
  -F "[email protected]" \
  -F "fileName=My Song" \
  -F 'metadata={"enableMetadata":true,"reference":"","language":"auto","enableChorus":false,"enableTranslation":true,"sourceLanguage":"auto","targetLanguage":"en"}'

Response

{
  "code": 0,
  "message": "ok",
  "items": {
    "taskId": "cm4abc123",
    "traceId": "cm4abc123",
    "status": "QUEUED",
    "queuePosition": 2,
    "remainingCredits": 46,
    "fileName": "song.mp3"
  }
}

Get Task Status

Fetch the current status and result of a task. Poll this endpoint until status is COMPLETED or FAILED. See Polling Guide for recommended intervals.

GET /api/v2/open/audio_tasks/:id

Example

curl https://ailrcgenerator.com/api/v2/open/audio_tasks/cm4abc123 \
  -H "Authorization: Bearer ailrc_sk_YOUR_KEY"

Response fields

FieldTypeReturned whenNotes
taskIdstringAlwaysAnalysis task ID
fileNamestringAlwaysUploaded file name
statusstringAlwaysPENDING, QUEUED, PROCESSING, COMPLETED, or FAILED
queuePositionnumber/nullQueuedCurrent queue position when available
progressnumberProcessingProcessing progress reported by the worker
resultobjectCompletedContains the generated lrc text
errorstringFailedNormalized public error message
creditsUsednumberCompletedCredits charged for the task
completedAtstringCompletedISO 8601 completion time
audioFileUrlstring/nullAlwaysPresigned audio URL; expires after 24 hours and may be null if signing fails

Response — queued

{
  "code": 0,
  "items": {
    "taskId": "cm4abc123",
    "status": "QUEUED",
    "queuePosition": 2,
    "audioFileUrl": "https://storage.example.com/presigned-audio-url",
    "fileName": "song.mp3"
  }
}

Response — in progress

{
  "code": 0,
  "items": {
    "taskId": "cm4abc123",
    "status": "PROCESSING",
    "progress": 35,
    "audioFileUrl": "https://storage.example.com/presigned-audio-url",
    "fileName": "song.mp3"
  }
}

Response — completed

{
  "code": 0,
  "items": {
    "taskId": "cm4abc123",
    "status": "COMPLETED",
    "result": {
      "lrc": "[00:00.00]Line one\n[00:05.23]Line two\n[00:10.40]Line three"
    },
    "creditsUsed": 6,
    "completedAt": "2026-04-19T10:02:30Z",
    "audioFileUrl": "https://storage.example.com/presigned-audio-url",
    "fileName": "song.mp3"
  }
}

Response — failed

{
  "code": 0,
  "items": {
    "taskId": "cm4abc123",
    "status": "FAILED",
    "error": "PROCESSING_FAILED",
    "audioFileUrl": "https://storage.example.com/presigned-audio-url",
    "fileName": "song.mp3"
  }
}

List Tasks

Return a paginated list of your audio tasks.

GET /api/v2/open/audio_tasks

Query parameters

ParameterDefaultNotes
page1Page number
limit20Max 100 per page
statusFilter: PENDING QUEUED PROCESSING COMPLETED FAILED

Example

curl "https://ailrcgenerator.com/api/v2/open/audio_tasks?page=1&limit=20&status=COMPLETED" \
  -H "Authorization: Bearer ailrc_sk_YOUR_KEY"

Delete Task

Delete a task and its associated data.

DELETE /api/v2/open/audio_tasks/:id

Tasks with status PROCESSING or QUEUED cannot be deleted.

Example

curl -X DELETE https://ailrcgenerator.com/api/v2/open/audio_tasks/cm4abc123 \
  -H "Authorization: Bearer ailrc_sk_YOUR_KEY"

Error Reference

All errors use a consistent envelope:

{
  "code": 403,
  "message": "Not enough credits",
  "businessCode": "not_enough_credits"
}
HTTPbusinessCodeMeaning
400Bad request — missing or invalid field
401API key is missing, invalid, revoked, or expired
403not_enough_creditsInsufficient credits
403level_not_enoughFile exceeds the size limit for your tier
404Task not found or does not belong to your account
429Rate limit exceeded — check Retry-After
500Internal server error

Polling Guide

AI analysis is asynchronous and typically completes within 30–120 seconds depending on file length.

Recommended strategy: start at 3 s, back off to a 10 s cap, give up after 60 attempts (~10 min).

async function pollTask(taskId, apiKey) {
  let delay = 3000;
  for (let i = 0; i < 60; i++) {
    await new Promise((r) => setTimeout(r, delay));
    const res = await fetch(
      `https://ailrcgenerator.com/api/v2/open/audio_tasks/${taskId}`,
      { headers: { Authorization: `Bearer ${apiKey}` } },
    );
    const { items } = await res.json();
    if (items.status === "COMPLETED") return items.result.lrc;
    if (items.status === "FAILED")
      throw new Error(items.error ?? "Analysis failed");
    delay = Math.min(delay * 1.5, 10000);
  }
  throw new Error("Timed out");
}

Need help? Contact support · Webhook support coming soon.