# Get API Access Source: https://docs.lyrcs.ai/api-access How to request an API key for lyrcs.ai The lyrcs.ai API is currently available to music distributors, streaming platforms, rights management companies, and karaoke providers. ## How to request access Email **[support@lyrcs.ai](mailto:support@lyrcs.ai)** with the following information: > [card] Company name > > Your organisation's full legal name and any relevant brand names. > [card] Use case > > What you're building — e.g. "deliver time-synced lyrics to DSPs for Indian language catalog" or "lyric display feature for streaming app". > [card] Expected monthly volume > > Estimated number of tracks per month. This helps us provision the right rate limits for your account. > [card] Languages > > Which languages you primarily work with. Indian language catalogs receive enhanced processing. We'll respond within **2 business days** with your API key and webhook secret. ## What you'll receive * An **API key** in the format `lyrcs_live_...` — used as the Bearer token in the `Authorization` header * A **webhook secret** — used to verify HMAC-SHA256 signatures on webhook deliveries Both are scoped to your organisation. All jobs, usage, and webhooks are isolated to your org. > [!WARNING] > > Keep your API key and webhook secret secure. Do not commit them to source control or expose them in client-side code. If you believe a key has been compromised, contact [support@lyrcs.ai](mailto:support@lyrcs.ai) immediately. ## Default rate limits Submissions and reads are metered separately, so polling for a job's status never consumes the budget you use to submit songs. **Submissions** — `POST /transcribe`, `POST /batch`, and [`POST /jobs/{id}/align`](/api-reference/align-job). A batch counts as one submission per job it contains. `POST /jobs/{id}/align` is metered here rather than as a read because it runs the aligner, which is real per-call cost. Approving a held job ([`POST /jobs/{id}/approve`](/api-reference/approve)) is **not** a submission — the job was charged when you created it. | Window | Limit | | - | - | | Per minute | 10 | | Per hour | 100 | | Per day | 1,000 | **Reads** — everything else: status checks, downloads, usage. | Window | Limit | | - | - | | Per minute | 120 | | Per hour | 2,000 | | Per day | 20,000 | Limits apply per organisation, not per API key — issuing additional keys does not increase them. > [!NOTE] > > Prefer webhooks over polling where you can. The read budget is generous enough that > polling will not normally reach it, but a webhook tells you the moment a job is done > rather than up to a poll interval later. If your catalog volume requires higher limits, mention it in your access request email. ## Next steps after receiving your key > [card] [Quickstart](/getting-started/quickstart) > > Submit your first job and download an LRC file in minutes. > [card] [Authentication](/getting-started/authentication) > > Learn how API keys work and how to use them securely. # POST /jobs/[id]/align Source: https://docs.lyrcs.ai/api-reference/align-job Align, or re-align, a job that already exists ## Endpoint ``` POST https://lyrcs.ai/api/v1/jobs/{job_id}/align ``` Runs alignment on a job you already submitted. Two situations, one endpoint: | The job | What happens | | - | - | | Transcript only (`align=false`) | Alignment runs for the first time | | Already aligned | Timings are **re-derived** from the job's current text | The second case matters after an edit. Word-level timings are positional, so correcting a line leaves them describing words that are no longer there; re-aligning re-derives every output together so they cannot disagree. ## It does not charge Your credit is bound to the song when the job is created, at your organisation's tier — the tier is an entitlement, not a per-feature price. A transcript-only job on Lyrics Pro has already paid the price that includes alignment, so aligning it later costs nothing further. Alignment does require Lyrics Pro; a Lyrics Basic organisation receives `402`. ## Request No body. The job id in the path is the whole request. ```bash theme={null} curl -X POST https://lyrcs.ai/api/v1/jobs/{job_id}/align \ -H "Authorization: Bearer $LYRCS_API_KEY" ``` ## Responses **Alignment queued** — `202`: ```json theme={null} { "job_id": "a1b2c3d4-...", "status": "queued", "message": "Alignment queued. This job will report `processing` until timings are ready; poll GET /v1/jobs/{id}." } ``` **Re-aligned** — `200`, synchronous: ```json theme={null} { "job_id": "a1b2c3d4-...", "status": "complete", "realigned": true, "lines": 19, "words": 60, "coverage": 1 } ``` > [!WARNING] > > **This is the one thing that moves a job out of `complete`.** A transcript-only > job is `complete`; queueing alignment returns it to `processing` until the > timings land. Everywhere else `complete` is terminal — here your own request > changed what the job is for. Completion is observed by polling `GET /jobs/{id}`. No new `job.complete` webhook is fired for work requested this way. ## Repeat calls are cheap Re-aligning text that has already been timed would produce an identical result, so it is not done. A repeat call on unchanged text returns immediately: ```json theme={null} { "job_id": "a1b2c3d4-...", "status": "complete", "realigned": false, "reason": "unchanged", "message": "The timings already describe this text. Edit the lyrics first if you want them re-derived." } ``` Edit the lyrics — at the review gate, or in the studio — and the next call re-derives normally. A job whose timings came from the older aligner is always re-aligned, unchanged text or not, because switching aligner genuinely changes the result. > [!NOTE] > > This endpoint draws on the **submit** rate limit, not the read limit, because it > performs real work. Status polling is unaffected. ## Errors | HTTP | `code` | Meaning | | - | - | - | | 402 | `PAY_002` | Alignment requires a Lyrics Pro plan | | 404 | `NOT_001` | Job not found, or belongs to another organisation | | 409 | `ALN_001` | No transcript yet — wait for transcription to finish | | 409 | `ALN_002` | Job is held for review; approve it to release alignment | | 409 | `ALN_003` | Re-alignment unavailable, or produced no usable result. Existing timings unchanged | | 409 | `ALN_004` | Alignment is already running for this job | | 422 | `ALN_005` | No stored audio to align against | A failed re-alignment never leaves you worse off: nothing is written unless the new timings are usable. ## Relationship to the withdrawn `POST /v1/align` The old endpoint took audio and lyrics and created a *second* job for a recording already in the system — a second charge for one song. It never worked and returns `410`. This endpoint is its replacement, and takes a job id precisely so there is one row, one charge, and audio already in the bucket. # POST /jobs/[id]/approve Source: https://docs.lyrcs.ai/api-reference/approve Approve a job held for review, from your own server ## Endpoint ``` POST https://lyrcs.ai/api/v1/jobs/{job_id}/approve ``` Approves a job held at a review gate, authenticated with your API key. No review link, no browser, no visit to lyrcs.ai — for when the artist reviews the lyrics inside your own product. This is one of two doors into the same held job. The other is our review page, reached through `review_url`. Both converge on the same approval and the same outputs. See [Running Review In Your Own Product](/guides/partner-review). ## Request Both fields are optional. Omit them to approve the lyrics unchanged. ```bash theme={null} curl -X POST https://lyrcs.ai/api/v1/jobs/{job_id}/approve \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "lines": ["first line", "second line corrected", "third line"], "transliterated_lines": ["…", "…", "…"] }' ``` | Field | Type | Notes | | - | - | - | | `lines` | `string[]` | Edited lines of the original script. Cannot be an empty array — omit it instead. | | `transliterated_lines` | `string[]` | Edited transliteration. Position-parallel to `lines`. | ### The two scripts move together Index 3 of `transliterated_lines` is the romanisation of index 3 of `lines`, and alignment inherits each transliteration's timing from its original by index. When you add or remove a line, send **both** arrays — sending one alone with a different length is refused with `409 APR_005`. The refusal exists because the alternative is silent: an uneven pair does not fail alignment, it produces a blank transliterated line, and a deletion shifts every remaining pair onto the wrong original for the rest of the song. ### Text only, no timestamps Timings are taken from the job, not from you. You have not run the aligner, so you have no measured timings to send, and anything an edit invalidates is re-derived from the audio on approval. Read the current lyrics from the `review` block on [`GET /jobs/{id}`](/api-reference/jobs) while the job is held. ## Responses **Approved at the transcript gate** — `200`. The job is *not* finished; alignment now runs on the text you approved. ```json theme={null} { "job_id": "a1b2c3d4-…", "status": "approved", "stage": "transcript", "lines_edited": 1, "transliteration_lines_edited": 1, "aligning": true, "message": "Approved. Alignment is running; poll GET /v1/jobs/{id} or wait for the job.complete webhook." } ``` **Approved at the aligned gate** — `200`. The job is finished. ```json theme={null} { "job_id": "a1b2c3d4-…", "status": "approved", "stage": "aligned", "lines_edited": 1, "transliteration_lines_edited": 0, "alignment": "realigned" } ``` `alignment` reports what happened to the timings, and is absent when no edit landed: | Value | Meaning | | - | - | | `realigned` | The edit was re-timed against the audio. | | `word_timings_dropped` | Re-alignment was unavailable, so the now-incorrect word-level track was removed rather than returned stale. Line timings are unchanged. | | `line_timings_unchanged` | The job had no word-level track to drop; line timings are unchanged. | **Already approved** — `200`. Not an error. ```json theme={null} { "job_id": "a1b2c3d4-…", "status": "approved", "already_approved": true, "stage": "transcript" } ``` The first approval wins, whichever door it came through. Retrying after a timeout is safe: nothing is applied twice, nothing is re-aligned, nothing is charged. ## Errors | Status | Code | Meaning | | - | - | - | | 400 | `APR_002` | `lines` or `transliterated_lines` was not an array of strings, or was empty | | 404 | `NOT_001` | No such job, or it belongs to another organisation | | 409 | `APR_001` | The job is not waiting for review | | 409 | `APR_003` | The job was submitted with `review_delivery: "link"`, so it can only be approved from the review page | | 409 | `APR_005` | `lines` and `transliterated_lines` would have different lengths | | 409 | `REV_001` | Line count changed at the aligned gate and the timings cannot be re-derived | | 502 | `APR_004` | The edits were saved but the job could not be released. Retry — the approval was rolled back | ## Rate limiting Counted against your **read** limit, not your submission limit. A reviewed job draws one submission when you create it, and approving it is the second half of that same submission rather than a new one. # POST /jobs/[id]/artist-link Source: https://docs.lyrcs.ai/api-reference/artist-link Give one of your artists their own link to order and make a lyric video ## Endpoint ``` POST https://lyrcs.ai/api/v1/jobs/{job_id}/artist-link ``` Returns a link that opens **one artist's own songs** on lyrcs.ai. There they can order a lyric video, style it, render it and download it. The artist needs no lyrcs.ai account, and you never share a login: the link is the artist's access, scoped to the songs you have attached to them. Call it when the artist clicks "make a video" in your product, and send them to the `url` it returns. Each call issues a fresh link. > [!NOTE] > > `studio_url` on [`GET /jobs/{id}`](/api-reference/jobs) is for your own team's > signed-in lyrcs.ai accounts. Artists cannot open it. Send artists the `url` from > this endpoint instead. ## Request ```bash theme={null} curl -X POST https://lyrcs.ai/api/v1/jobs/{job_id}/artist-link \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "end_user": { "external_id": "artist-123", "name": "Asha", "email": "asha@example.com" } }' ``` | Field | Type | Notes | | - | - | - | | `end_user` | `object` | Which of your artists this song belongs to. Optional when the job was submitted with an `end_user`. | | `end_user.external_id` | `string` | **Required** inside `end_user`. Your own id for the artist, up to 128 characters. | | `end_user.name` | `string` | Optional. | | `end_user.email` | `string` | Optional. Used for order receipts and "video ready" emails. | ### Which artist the link is for | The job… | You send… | Result | | - | - | - | | already has an `end_user` | nothing, or the same `external_id` | Link for that artist | | has no `end_user` | an `end_user` | The artist is attached to the job, then the link is issued | | has no `end_user` | nothing | `422 ART_001` | | belongs to a different `end_user` | another `external_id` | `409 ART_002` — a song never moves between artists | The link opens **every** song attached to that artist, not only this one. Use the same `external_id` for the same artist across all of their songs. ## Response `201 Created` ```json theme={null} { "job_id": "a1b2c3d4-…", "url": "https://lyrcs.ai/artist?token=ps_…", "expires_at": "2026-12-17T10:00:00.000Z", "end_user": { "external_id": "artist-123" }, "video": { "available": true, "payment": "prepaid" } } ``` | Field | Notes | | - | - | | `url` | Send the artist here. Treat it as a secret: anyone holding it can act as that artist. | | `expires_at` | 30 days from issue. The expiry extends while the artist keeps using the link. Ask for a new one any time. | | `video.available` | Whether the artist can order a video for this song right now. | | `video.payment` | `prepaid` — your account's video credits pay and the artist sees no price. `pay_on_site` — the artist pays at checkout. `null` when video is not enabled. | | `video.reason` | Present when `available` is `false`, see below. | ### When `video.available` is false The link is still issued. The artist can view their lyrics and downloads there. | `reason` | Meaning | | - | - | | `not_enabled` | Lyric videos are not enabled on your account. Contact us. | | `no_credits` | Your prepaid video credits are used up. Contact us to top up. | | `lyrics_not_ready` | The song is still being transcribed, timed or reviewed. The page shows progress, and the order button appears once lyrics are timed. | | `not_aligned` | The job was submitted as transcript-only, so it has no timings and never will on its own. Call [`POST /jobs/{id}/align`](/api-reference/align-job) first. | ## Errors | Status | Code | Meaning | | - | - | - | | `400` | `VAL_001` | `end_user` is malformed — for example, no `external_id`. | | `401` | `AUTH_001` | Missing or invalid API key. | | `404` | `NOT_001` | No such job on your account. | | `409` | `ART_002` | The job belongs to a different `end_user`. | | `409` | `ART_003` | The job failed. Resubmit the song. | | `422` | `ART_001` | The job has no `end_user` and you did not send one. | | `429` | `RATE_001` | Rate limit. Counts against the read limit, not submissions. | This endpoint never charges you. Charges happen only when the artist places an order. # Batch Source: https://docs.lyrcs.ai/api-reference/batch Submit up to 20 transcription jobs in a single request ## POST /api/v1/batch Submit a batch of jobs. All jobs are processed concurrently. A single `batch.complete` webhook fires when all jobs are done. ### Endpoint ``` POST https://lyrcs.ai/api/v1/batch ``` **JSON only** — file upload is not supported. Every job must use `audio_url`. ### Body — two accepted shapes **Shape A: plain array** ```json theme={null} [ { "audio_url": "https://cdn.example.com/song-1.mp3", "language": "Hindi" }, { "audio_url": "https://cdn.example.com/song-2.mp3", "language": "Tamil" }, { "audio_url": "https://cdn.example.com/song-3.mp3", "language": "Telugu", "align": false } ] ``` **Shape B: object with webhook** ```json theme={null} { "webhook_url": "https://api.example.com/webhooks/lyrcs", "jobs": [ { "audio_url": "https://cdn.example.com/song-1.mp3", "language": "Hindi", "external_id": "TRACK_001" }, { "audio_url": "https://cdn.example.com/song-2.mp3", "language": "Tamil", "external_id": "TRACK_002" } ] } ``` ### Per-job fields | Field | Type | Required | Default | | - | - | - | - | | `audio_url` | string | Yes | — | | `language` | string | Yes | — | | `external_id` | string | No | `null` | | `align` | boolean | No | `true` | | `word_align` | boolean | No | `true` | | `review` | boolean | No | `false` | | `review_stage` | `"transcript"` \| `"aligned"` | No | `"aligned"` | | `review_delivery` | `"both"` \| `"api"` \| `"link"` | No | `"both"` | | `isrc` | string | No | `null` | | `end_user` | object | No | `null` | `external_id` is an arbitrary string (max 255 characters) used to map each job back to a track in your own system. It is echoed back in `GET /api/v1/batch/{id}`, `GET /api/v1/jobs/{job_id}`, and the `job.complete` webhook payload for each job. `review_stage`, `review_delivery` and `end_user` behave exactly as on [`POST /transcribe`](/api-reference/transcribe), and both review fields require `review: true` on the **same job**. All of them are per job, not per batch — one batch can carry songs belonging to several of your customers, and a customer sent on twenty jobs produces one record, not twenty. ```json theme={null} { "jobs": [ { "audio_url": "https://cdn.example.com/song-1.mp3", "language": "Punjabi", "review": true, "review_stage": "transcript", "review_delivery": "api", "end_user": { "external_id": "cust_8842" } } ] } ``` ### Limits * Minimum 1 job, maximum **20 jobs** per request * Rate limit check is **pre-flight**: if submitting N jobs would push any window over the limit, the entire batch is rejected with `429` before any jobs are created. See [rate limit headers](/errors#rate-limit-headers). ### Response — 202 Accepted ```json theme={null} { "batch_id": "b1a2t3c4-...", "job_count": 5, "status": "queued", "message": "Batch queued. Use GET /api/v1/batch/{batch_id} to poll status.", "credits": { "plan": "alignment", "balance": 53, "other_balances": [] } } ``` `credits` is your balance **after** every song in the batch has been charged — the same block as [`GET /usage`](/api-reference/usage) and [`POST /transcribe`](/api-reference/transcribe#credits). On an idempotent replay it is your balance now, not at the original submission. *** ## Retrying safely Send an `Idempotency-Key` header and reuse it on every retry of the same batch. A retried batch would otherwise create duplicate jobs and duplicate charges for every song in it. The hash covers the whole job list, so re-sending the same batch replays the original `batch_id`, while a different list under a reused key is refused with `409 IDEM_002` rather than silently processed. See [POST /transcribe](/api-reference/transcribe) for the full behaviour table. ## GET /api/v1/batch/\[id] Poll for batch status and per-job results. ### Endpoint ``` GET https://lyrcs.ai/api/v1/batch/{batch_id} ``` ### Batch status values | Status | Meaning | | - | - | | `queued` | Received — coordinator not yet started | | `in_progress` | Jobs are fanning out and processing | | `complete` | All jobs finished successfully | | `partial` | Done — but at least one job failed or timed out | ### Per-job status Each entry in `jobs` carries the same `status` and `stage` as [`GET /jobs/{id}`](/api-reference/jobs), derived identically — the two endpoints never disagree about the same job. `processing` is the normal state for several minutes after submission, and on a large batch for considerably longer, since jobs queue behind one another. **A job in `processing` has not failed.** `failed` is returned only when the pipeline recorded a failure, and carries an `error` object saying which stage and why. > [!WARNING] > > Don't treat "not yet complete" as failure. A 20-song batch can take 15 minutes > or more end to end, and individual jobs move through `transcribing` and > `aligning` on their own schedule. Wait for the batch to reach `complete` or > `partial`, or use the `batch.complete` webhook. ### Response ```json theme={null} { "batch_id": "b1a2t3c4-...", "status": "complete", "job_count": 3, "completed": 2, "failed": 1, "pending": 0, "created_at": "2024-01-01T00:00:00.000Z", "completed_at": "2024-01-01T00:02:15.000Z", "jobs": [ { "job_id": "a1b2c3d4-...", "external_id": "TRACK_001", "language": "Hindi", "status": "complete", "align_requested": true, "review_required": false, "review_url": null, "review_approved_at": null, "completed_at": "2024-01-01T00:01:45.000Z", "studio_url": "https://lyrcs.ai/studio/a1b2c3d4-...", "downloads": { "lrc_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/original", "lrc_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/transliterated", "srt_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/original", "srt_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/transliterated", "words_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/words/original", "words_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/words/transliterated" }, "second_opinion": { "total_lines": 40, "agreed_lines": 27, "match_ratio": 0.763, "suggestion_count": 3, "section_count": 2, "hidden_count": 0 }, "alignment": { "method": "forced", "coverage": 0.998, "flagged_line_count": 2 } }, { "job_id": "b2c3d4e5-...", "external_id": "TRACK_002", "language": "Tamil", "status": "failed", "stage": "failed", "error": { "stage": "transcription", "message": "Transcript did not appear within 600s of job creation", "failed_at": "2024-01-01T00:10:04.000Z" }, "align_requested": true, "review_required": false, "review_url": null, "review_approved_at": null, "completed_at": null, "studio_url": "https://lyrcs.ai/studio/b2c3d4e5-..." } ] } ``` > [!NOTE] > > `downloads` is only present on jobs where `status === "complete"` AND `align_requested === true`. Failed jobs and `align=false` jobs do not include it. `words_original` and `words_transliterated` appear only when the job was submitted with `word_align=true`. ## Examples ```bash curl theme={null} # Submit batch curl -X POST https://lyrcs.ai/api/v1/batch \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "webhook_url": "https://api.example.com/webhooks/lyrcs", "jobs": [ { "audio_url": "https://cdn.example.com/song-1.mp3", "language": "Hindi" }, { "audio_url": "https://cdn.example.com/song-2.mp3", "language": "Tamil" }, { "audio_url": "https://cdn.example.com/song-3.mp3", "language": "Telugu" } ] }' # Poll batch status curl https://lyrcs.ai/api/v1/batch/b1a2t3c4-... \ -H "Authorization: Bearer $LYRCS_API_KEY" ``` ```javascript Node.js theme={null} // Submit const res = await fetch("https://lyrcs.ai/api/v1/batch", { method: "POST", headers: { Authorization: `Bearer ${process.env.LYRCS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ webhook_url: "https://api.example.com/webhooks/lyrcs", jobs: [ { audio_url: "https://cdn.example.com/song-1.mp3", language: "Hindi", external_id: "TRACK_001" }, { audio_url: "https://cdn.example.com/song-2.mp3", language: "Tamil", external_id: "TRACK_002" }, ], }), }); const { batch_id } = await res.json(); // Poll // A 20-song batch can legitimately take 15+ minutes. This deadline is a // safety net against a hung client, not a failure signal — the batch itself // reports `complete` or `partial` when it is genuinely done. async function waitForBatch(batchId, apiKey, { intervalMs = 15000, timeoutMs = 2_400_000 } = {}) { const deadline = Date.now() + timeoutMs; while (Date.now() < deadline) { const r = await fetch(`https://lyrcs.ai/api/v1/batch/${batchId}`, { headers: { Authorization: `Bearer ${apiKey}` }, }); const batch = await r.json(); if (batch.status === "complete" || batch.status === "partial") return batch; await new Promise((res) => setTimeout(res, intervalMs)); } throw new Error("Batch timed out"); } const batch = await waitForBatch(batch_id, process.env.LYRCS_API_KEY); const failed = batch.jobs.filter((j) => j.status === "failed"); if (failed.length) console.warn(`${failed.length} jobs failed`); ``` ```python Python theme={null} import os, time, requests api_key = os.environ["LYRCS_API_KEY"] headers = {"Authorization": f"Bearer {api_key}"} # Submit r = requests.post( "https://lyrcs.ai/api/v1/batch", headers=headers, json={ "webhook_url": "https://api.example.com/webhooks/lyrcs", "jobs": [ {"audio_url": "https://cdn.example.com/song-1.mp3", "language": "Hindi", "external_id": "TRACK_001"}, {"audio_url": "https://cdn.example.com/song-2.mp3", "language": "Tamil", "external_id": "TRACK_002"}, ], }, ) batch_id = r.json()["batch_id"] # Poll # A 20-song batch can legitimately take 15+ minutes. This deadline is a safety # net against a hung client, not a failure signal — the batch itself reports # "complete" or "partial" when it is genuinely done. def wait_for_batch(batch_id, interval=15, timeout=2400): deadline = time.time() + timeout while time.time() < deadline: r = requests.get(f"https://lyrcs.ai/api/v1/batch/{batch_id}", headers=headers) batch = r.json() if batch["status"] in ("complete", "partial"): return batch time.sleep(interval) raise TimeoutError("Batch timed out") batch = wait_for_batch(batch_id) failed = [j for j in batch["jobs"] if j["status"] == "failed"] if failed: print(f"{len(failed)} jobs failed") ``` See the [Batch Processing guide](/guides/batch-processing) for patterns on handling partial failures and polling strategy. ## Quality signals in a batch Each job carries a **summary** of the two quality blocks rather than the full detail returned by [`GET /jobs/{id}`](/api-reference/jobs). A batch is a triage view: the counts tell you which songs deserve a look, and you fetch those jobs individually to see what was actually found. | Field | Meaning | | - | - | | `second_opinion.suggestion_count` | Disagreements an independent listener raised | | `second_opinion.section_count` | Of those, how many are **possibly-missing passages** — the ones worth acting on. Sort your batch by this. | | `second_opinion.agreed_lines` / `total_lines` | How much the listener confirmed | | `alignment.method` | `forced`, `forced_rejected`, or `model` | | `alignment.flagged_line_count` | Lines whose audio does not match their text well | > [!WARNING] > > Both fields are `null` when the check did not run — which is **not** the same > as a zero count. A zero `suggestion_count` means the listener ran and agreed > with every line. See [Quality Signals](/guides/quality-signals) for the full > contract and for what the flags do and do not catch. # Download Source: https://docs.lyrcs.ai/api-reference/download Download LRC, SRT, and word-level JSON lyric files for a completed job Six download endpoints are available for each completed job where `align=true` (the default). All require authentication. ## LRC and SRT endpoints | Endpoint | Description | | - | - | | `GET /api/v1/jobs/{id}/download/lrc/original` | LRC file in the source language script | | `GET /api/v1/jobs/{id}/download/lrc/transliterated` | LRC file with romanised (transliterated) lyrics | | `GET /api/v1/jobs/{id}/download/srt/original` | SRT file in the source language script | | `GET /api/v1/jobs/{id}/download/srt/transliterated` | SRT file with romanised lyrics | | `GET /api/v1/jobs/{id}/download/lrc/translation` | LRC file with the translation, each line timed to its lyric line | | `GET /api/v1/jobs/{id}/download/srt/translation` | SRT file with the translation, each line timed to its lyric line | The `translation` files are available only on accounts with translation tools enabled, and only when the translation has exactly one line per lyric line. It inherits each lyric line's timing, so there is no word-level translation file. When the counts don't match, the endpoint returns `409` with code `JOB_003` and both counts (`translation_lines`, `lyric_lines`); fix the translation in review and download again. On accounts without translation tools, `translation` is an unknown type (`404`). ## Word-level JSON endpoints | Endpoint | Description | | - | - | | `GET /api/v1/jobs/{id}/download/words/original` | Per-word timestamps in the source language script | | `GET /api/v1/jobs/{id}/download/words/transliterated` | Per-word timestamps in romanised form | These endpoints are only available when the job was submitted with `word_align=true` (the default). They return a JSON array where each entry contains a single word and its start timestamp. **Response — 200 OK:** ```json theme={null} [ { "word": "நான்", "timestamp": "[00:12.34]" }, { "word": "உன்னை", "timestamp": "[00:12.71]" }, { "word": "நேசிக்கிறேன்", "timestamp": "[00:13.10]" } ] ``` * `Content-Type: application/json; charset=utf-8` * `Content-Disposition: attachment; filename="[_transliterated]_words.json"` **Not ready yet — 202:** If word-level alignment has not completed, the endpoint returns `202`: ```json theme={null} { "status": "processing", "stage": "aligning" } ``` Only fetch word-level downloads once `GET /api/v1/jobs/{id}` returns `status: "complete"` and `words_original` appears in `results.downloads`. If the job was not submitted with `word_align=true`, word-level timings are never produced and the endpoint returns `409` rather than `202` — see [Terminal responses](#terminal-responses) below. ## Response — 200 OK Returns a plain-text file with: * `Content-Type: text/plain; charset=utf-8` * `Content-Disposition: attachment; filename="[_transliterated]."` ## Not ready yet — 202 If the job exists but alignment has not completed, the endpoint returns `202` instead of `404`: ```json theme={null} { "status": "processing", "stage": "aligning" } ``` `202` always means *keep waiting* — the output is still coming. Poll `GET /api/v1/jobs/{id}` and fetch downloads once `status` is `"complete"`. ## Terminal responses A `409` means **stop polling** — this file is never going to exist. There are two reasons, distinguished by the `code`: **The job failed** (`JOB_001`): ```json theme={null} { "error": "job_failed", "message": "Alignment did not complete within 300s of dispatch", "code": "JOB_001", "status": "failed", "stage": "alignment" } ``` **The output was never requested** (`JOB_002`) — the job was submitted with `align=false`, or word-level timings were requested on a job with `word_align=false`: ```json theme={null} { "error": "alignment_not_requested", "message": "This job was submitted with align=false, so no LRC was generated.", "code": "JOB_002" } ``` > [!NOTE] > > These previously returned `202 { "status": "processing" }` indefinitely, which > gave a caller no way to tell "still working" from "never coming". Treat `202` > as retry and `409` as terminal. > [!NOTE] > > Download URLs are returned directly in `results.downloads` on the job response and in the `job.complete` webhook payload. You do not need to construct them manually. ## Examples ```bash curl theme={null} # Original script LRC curl https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/original \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -o song.lrc # Transliterated LRC curl https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/transliterated \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -o song_transliterated.lrc # Original script SRT curl https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/original \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -o song.srt ``` ```javascript Node.js theme={null} async function downloadLrc(jobId, type, apiKey) { // type: "original" | "transliterated" const res = await fetch( `https://lyrcs.ai/api/v1/jobs/${jobId}/download/lrc/${type}`, { headers: { Authorization: `Bearer ${apiKey}` } } ); if (res.status === 202) { throw new Error("LRC not ready yet — job still processing"); } if (!res.ok) throw new Error(`HTTP ${res.status}`); return res.text(); // standard LRC content } const lrcOriginal = await downloadLrc("a1b2c3d4-...", "original", process.env.LYRCS_API_KEY); const lrcTranslit = await downloadLrc("a1b2c3d4-...", "transliterated", process.env.LYRCS_API_KEY); ``` ```python Python theme={null} import os, requests def download_lrc(job_id, lrc_type, api_key): # lrc_type: "original" | "transliterated" r = requests.get( f"https://lyrcs.ai/api/v1/jobs/{job_id}/download/lrc/{lrc_type}", headers={"Authorization": f"Bearer {api_key}"}, ) if r.status_code == 202: raise RuntimeError("LRC not ready yet — job still processing") r.raise_for_status() return r.text lrc_original = download_lrc("a1b2c3d4-...", "original", os.environ["LYRCS_API_KEY"]) lrc_translit = download_lrc("a1b2c3d4-...", "transliterated", os.environ["LYRCS_API_KEY"]) ``` ## Download from webhook payload If you're using webhooks, the download URLs arrive in the `job.complete` payload: ```json theme={null} { "event": "job.complete", "job_id": "a1b2c3d4-...", "results": { "downloads": { "lrc_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/original", "lrc_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/transliterated", "srt_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/original", "srt_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/transliterated", "words_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/words/original", "words_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/words/transliterated" } } } ``` All four URLs require your API key in the `Authorization` header to fetch. See [LRC & SRT Formats](/guides/lrc-srt-formats) for a description of the file formats and when to use each. # GET /health Source: https://docs.lyrcs.ai/api-reference/health Check API availability ## Endpoint ``` GET https://lyrcs.ai/api/v1/health ``` **No authentication required.** Use this to verify the API is reachable before making authenticated calls, or as a liveness check in your infrastructure. ## Response — 200 OK ```json theme={null} { "status": "ok", "version": "1.0" } ``` ## Examples ```bash curl theme={null} curl https://lyrcs.ai/api/v1/health ``` ```javascript Node.js theme={null} const res = await fetch("https://lyrcs.ai/api/v1/health"); const { status } = await res.json(); if (status !== "ok") throw new Error("API unavailable"); ``` ```python Python theme={null} import requests r = requests.get("https://lyrcs.ai/api/v1/health") assert r.json()["status"] == "ok", "API unavailable" ``` # GET /jobs/[id] Source: https://docs.lyrcs.ai/api-reference/jobs Retrieve the status and results of a transcription job ## Endpoint ``` GET https://lyrcs.ai/api/v1/jobs/{job_id} ``` Returns the current status of a job and, once complete, the full results including transcript, transliteration, translation, and download URLs for LRC/SRT files. ## Job status values | Status | Terminal? | Meaning | | - | - | - | | `processing` | No | Still running. Keep polling. | | `complete` | **Yes** | Results are ready | | `failed` | **Yes** | The pipeline recorded a failure. See the `error` object for which stage and why. | `complete` and `failed` are both terminal — a job never leaves either state on its own, and never moves from `failed` back to `complete`. Once you see one of them you can stop polling. The single exception is your own request: calling [`POST /jobs/{id}/align`](/api-reference/align-job) on a transcript-only job returns it to `processing` while the timings are produced. Nothing we do server-side will move a job out of `complete`. `failed` is only ever returned when the pipeline actually recorded a failure. It is never inferred from how long a job has been running, so a slow job is `processing`, not `failed`. ### Stage Alongside `status`, every response carries a finer-grained `stage` so you can watch a job advance without inferring progress from elapsed time. | Stage | Meaning | | - | - | | `transcribing` | Audio is being transcribed | | `awaiting_review` | Held at the transcript gate, waiting for a human | | `aligning` | Transcript is ready; timestamps are being generated | | `done` | Everything requested has been produced | | `failed` | See the `error` object | A job submitted with `align=false` goes straight from `transcribing` to `done`. `awaiting_review` appears only for `review_stage: "transcript"` jobs, and means no machine work is queued — the job will not advance until someone approves it. A job held at the *aligned* gate reports `done` instead, because its pipeline work really has finished; use `review_approved_at` to tell whether a human has signed off. ## How long jobs take Measured end to end on production traffic, a 3-minute track takes roughly **90–130 seconds** of processing — about 0.4–0.8× the audio duration. Longer tracks and batches under load take longer. > [!WARNING] > > Do not set a client-side timeout of a few minutes and treat expiry as failure. > A job can legitimately stay in `processing` for **up to 15 minutes** — the > pipeline itself allows 10 minutes for transcription and a further 5 for > alignment before it gives up and records a failure. > > If a job genuinely fails or stalls, the API tells you so by returning > `failed`. You do not need your own timeout to detect it, and adding one will > make healthy jobs look broken. > [!TIP] > > Prefer [webhooks](/guides/webhooks) over polling. Webhooks only fire on > terminal states, so there is no in-flight ambiguity to interpret. If you do > poll, every 10–15 seconds is plenty. ## Response shapes ### Processing ```json theme={null} { "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "external_id": "CATALOG_76007488", "status": "processing", "stage": "aligning", "language": "Tamil", "align_requested": true, "word_align_requested": true, "created_at": "2024-01-01T00:00:00.000Z", "transcript_completed_at": "2024-01-01T00:00:38.000Z", "completed_at": null, "second_opinion": null, "alignment": null } ``` `transcript_completed_at` is stamped when the transcript is ready, which is before alignment finishes. `completed_at` means the whole job is done. Use `status` rather than either timestamp to decide whether a job has finished. ### Complete — align=true, word_align=true (default) ```json theme={null} { "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "external_id": "CATALOG_76007488", "status": "complete", "language": "Tamil", "align_requested": true, "word_align_requested": true, "created_at": "2024-01-01T00:00:00.000Z", "completed_at": "2024-01-01T00:01:32.000Z", "duration_seconds": 214, "studio_url": "https://lyrcs.ai/studio/a1b2c3d4-...", "results": { "transcript": "நான் உன்னை நேசிக்கிறேன்\nதெரியாமல் போனேன்...", "transliteration": "Naan unnai nesikirein\nTheriyaamal ponein...", "translation": "I love you\nI didn't know...", "cultural_notes": null, "downloads": { "lrc_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/original", "lrc_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/transliterated", "srt_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/original", "srt_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/transliterated", "words_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/words/original", "words_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/words/transliterated" } }, "second_opinion": null, "alignment": { "method": "forced", "coverage": 0.998, "line_flags": [] } } ``` > [!NOTE] > > `words_original` and `words_transliterated` are only present when `word_align_requested: true` and alignment is complete. Jobs submitted with `word_align=false` include only `lrc_*` and `srt_*` in `downloads`. ### Complete — align=false When `align=false` was passed at submission, `downloads` is omitted from the response. ```json theme={null} { "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "external_id": "CATALOG_76007488", "status": "complete", "language": "Telugu", "align_requested": false, "word_align_requested": true, "created_at": "2024-01-01T00:00:00.000Z", "completed_at": "2024-01-01T00:01:02.000Z", "duration_seconds": 187, "studio_url": "https://lyrcs.ai/studio/a1b2c3d4-...", "results": { "transcript": "...", "transliteration": "...", "translation": "...", "cultural_notes": null } } ``` ### Failed ```json theme={null} { "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "external_id": "CATALOG_76007488", "status": "failed", "stage": "failed", "language": "Tamil", "align_requested": true, "word_align_requested": true, "created_at": "2024-01-01T00:00:00.000Z", "transcript_completed_at": null, "completed_at": null, "error": { "stage": "transcription", "message": "Transcript did not appear within 600s of job creation", "failed_at": "2024-01-01T00:10:04.000Z" } } ``` `error.stage` is the pipeline stage that failed — `transcription` or `alignment`. A job that failed at `alignment` still has a usable transcript in `results`; one that failed at `transcription` has nothing. ## Additional fields ### Review fields Present when `review=true` was passed at submission: ```json theme={null} { "review_required": true, "review_url": "https://lyrcs.ai/review/a1b2c3d4-...?token=...", "review_expires_at": "2024-01-02T00:00:00.000Z", "review_approved_at": null, "review_delivery": "both" } ``` `review_url` is `null` until the job reaches its gate and the token is generated — and permanently `null` when the job was submitted with `review_delivery: "api"`. `review_approved_at` is `null` until someone approves. ### The review block Present **only while the job is held**, and gone once it is approved. It carries the lyrics the reviewer is being asked to accept, as an array of lines: ```json theme={null} { "review": { "stage": "transcript", "delivery": "api", "lines": [ { "index": 0, "text": "…", "transliteration": "…", "timestamp": null, "flagged": false } ] } } ``` | Field | Meaning | | - | - | | `stage` | `"transcript"` or `"aligned"` — which gate this is | | `delivery` | `"both"`, `"api"` or `"link"` | | `lines[].timestamp` | `[mm:ss.xx]`, or `null` at the transcript gate where alignment has not run | | `lines[].flagged` | This line's audio does not match its words. Always `false` at the transcript gate | This exists because `results` is only filled once a job is `complete`, and a held job is not — so without it there is no way to read the lyrics you are being asked to approve. It is what makes it possible to run the review inside your own product: see [Running Review In Your Own Product](/guides/partner-review), and [`POST /jobs/{id}/approve`](/api-reference/approve) for approving one. The existing `results.transcript` string is unchanged; this is additive. ### second_opinion and alignment Present on every response. Both are `null` when the corresponding check did not run — see [Quality Signals](/guides/quality-signals) for the full field reference. ```json theme={null} { "second_opinion": { "total_lines": 59, "agreed_lines": 47, "match_ratio": 0.79, "suggestions": [], "hidden_count": 0 }, "alignment": { "method": "forced", "coverage": 0.998, "line_flags": [] } } ``` > [!WARNING] > > `null` means the check did not run. An empty `suggestions` array means it ran > and agreed with every line — the opposite signal. Do not collapse the two into > a single falsy test. `second_opinion` is available as soon as the transcript is, so it is readable while a job is still `aligning`. `alignment` is `null` until alignment completes, and on jobs submitted with `align=false`. ### external_id Present on all jobs. Contains the value passed at submission, or `null` if not provided. ```json theme={null} { "external_id": "CATALOG_76007488" } ``` Use this to map a job back to a track in your own system without maintaining a separate `job_id` → track lookup. ### end_user Present when `end_user` was supplied at submission, absent otherwise. ```json theme={null} { "end_user": { "id": "2fc0df07-…", "external_id": "cust_8842", "email": "artist@example.com", "name": "Asha R." } } ``` List rows carry `id` and `external_id` only. Either can be used with `GET /v1/jobs?end_user_id=`. ### Audio URL field Present when the job was submitted via `audio_url` mode: ```json theme={null} { "audio_url": "https://cdn.example.com/songs/song-123.mp3" } ``` ### studio_url A link to the lyrcs.ai Studio where the transcript can be edited and reviewed. Requires a lyrcs.ai user account to view. Not intended for end-users — this is an internal review tool for distributors. To send an **artist** to their song — to order and make a lyric video, or to download their files — use [`POST /jobs/{id}/artist-link`](/api-reference/artist-link), which returns a link that needs no account. ## Results fields | Field | Type | Notes | | - | - | - | | `transcript` | string | Original lyrics in the source script | | `transliteration` | string | Phonetic romanisation of the lyrics | | `translation` | string | English translation | | `cultural_notes` | string \| null | Contextual notes on cultural references, idioms, or wordplay. May be null if none are detected. | | `downloads` | object | Present only when `align_requested: true` and job is complete. Includes `lrc_translation` and `srt_translation` when translation tools are enabled and the translation lines up. | | `translation_status` | object | Accounts with translation tools only. `paired` is `true` when the translation has exactly one line per lyric line; `translation_lines` and `lyric_lines` give both counts. Translation files are offered only when `paired` is `true`. | ## Top-level quality fields | Field | Type | Notes | | - | - | - | | `second_opinion` | object \| null | An independent listener's read of the transcript. `null` means not checked. See [Quality Signals](/guides/quality-signals). | | `alignment` | object \| null | How the timings were produced, and which lines look suspect. `null` until alignment completes. | ## Examples ```bash curl theme={null} curl https://lyrcs.ai/api/v1/jobs/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \ -H "Authorization: Bearer $LYRCS_API_KEY" ``` ```javascript Node.js theme={null} async function waitForJob(jobId, apiKey, { intervalMs = 10000, timeoutMs = 180000 } = {}) { const deadline = Date.now() + timeoutMs; while (Date.now() < deadline) { const res = await fetch(`https://lyrcs.ai/api/v1/jobs/${jobId}`, { headers: { Authorization: `Bearer ${apiKey}` }, }); if (!res.ok) throw new Error(`HTTP ${res.status}`); const job = await res.json(); if (job.status === "complete") return job; if (job.status === "failed") throw new Error(`Job failed: ${jobId}`); await new Promise((r) => setTimeout(r, intervalMs)); } throw new Error("Job timed out"); } const job = await waitForJob("a1b2c3d4-...", process.env.LYRCS_API_KEY); console.log("Transcript:", job.results.transcript); console.log("LRC URL:", job.results.downloads?.lrc_original); ``` ```python Python theme={null} import os, time, requests def wait_for_job(job_id, api_key, interval=10, timeout=180): headers = {"Authorization": f"Bearer {api_key}"} deadline = time.time() + timeout while time.time() < deadline: r = requests.get( f"https://lyrcs.ai/api/v1/jobs/{job_id}", headers=headers, ) r.raise_for_status() job = r.json() if job["status"] == "complete": return job if job["status"] == "failed": raise RuntimeError(f"Job failed: {job_id}") time.sleep(interval) raise TimeoutError("Job timed out") job = wait_for_job("a1b2c3d4-...", os.environ["LYRCS_API_KEY"]) print("Transcript:", job["results"]["transcript"]) print("LRC URL:", job["results"].get("downloads", {}).get("lrc_original")) ``` # GET /jobs Source: https://docs.lyrcs.ai/api-reference/jobs-list List and sync jobs — the efficient way to track work at catalogue scale ## Endpoint ``` GET https://lyrcs.ai/api/v1/jobs ``` Returns a page of your organisation's jobs, oldest change first. This is the endpoint to build a catalogue integration on: instead of polling `GET /jobs/{id}` once per song, you ask once per sweep for everything that has changed since you last looked. > [!NOTE] > > Jobs are always scoped to the organisation that owns the API key. There is no > parameter that widens that scope. ## Syncing with `updated_since` Every job carries an `updated_at` timestamp that moves whenever the job actually changes. The sync loop is: 1. Call `GET /jobs?updated_since={your last high-water mark}`. 2. Process the returned jobs. 3. Store the highest `updated_at` you saw as the new high-water mark. ```bash theme={null} curl -H "Authorization: Bearer $LYRCS_API_KEY" \ "https://lyrcs.ai/api/v1/jobs?updated_since=2026-09-01T00:00:00Z&limit=100" ``` `updated_since` is exclusive, so passing back the newest `updated_at` you received will not return that job again. Results are ordered by `updated_at` **ascending** — oldest change first. That is deliberate, and it is what makes the loop safe to interrupt: your watermark only ever advances over jobs you have actually processed, so a sweep that dies half way through resumes exactly where it stopped. Descending order would break this. The first page would already contain the newest timestamp, so storing it and then failing would skip every older job you had not yet reached — permanently, because those jobs never become newer than your watermark again. ## Query parameters | Parameter | Type | Default | Description | | - | - | - | - | | `updated_since` | ISO 8601 timestamp | — | Only jobs changed strictly after this time | | `status` | `processing` \| `complete` \| `failed` | — | Filter by job status | | `external_id` | string | — | Exact match on your own identifier | | `isrc` | string | — | Exact match on the recording's ISRC (hyphens accepted) | | `end_user_id` | string | — | Only jobs belonging to one of your customers. Takes your own `external_id` or the `id` we return | | `batch_id` | UUID | — | Only jobs belonging to this batch | | `limit` | integer 1–100 | `50` | Page size | | `cursor` | string | — | Continue from a previous page — see below | ## Pagination When more results exist, `has_more` is `true` and `next_cursor` carries an opaque cursor. Pass it back as `cursor` to fetch the next page. ```bash theme={null} curl -H "Authorization: Bearer $LYRCS_API_KEY" \ "https://lyrcs.ai/api/v1/jobs?limit=100&cursor=MjAyNi0wOS0wMVQwMDowMDowMC4wMDBafGFiYw" ``` Keep every other parameter identical while paging. The cursor encodes a position in the result order, not a filter. Because rows are ascending, it is safe to advance your stored watermark page by page as you go rather than waiting for the last page. > [!WARNING] > > Treat `next_cursor` as opaque. Its encoding is not part of the contract and may > change. Do not construct one yourself. ## Response ```json theme={null} { "jobs": [ { "job_id": "a1b2c3d4-...", "external_id": "TRACK_12345", "isrc": "USSKG2400001", "language": "Tamil", "status": "complete", "stage": "done", "end_user": { "id": "2fc0df07-...", "external_id": "cust_8842" }, "align_requested": true, "review_required": false, "review_url": null, "review_approved_at": null, "created_at": "2026-09-01T09:12:00.000Z", "updated_at": "2026-09-01T09:13:41.000Z", "completed_at": "2026-09-01T09:13:41.000Z", "studio_url": "https://lyrcs.ai/studio/a1b2c3d4-...", "downloads": { "lrc_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/original", "lrc_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/transliterated", "srt_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/original", "srt_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/transliterated" }, "second_opinion": { "match_ratio": 0.92, "suggestion_count": 3 }, "alignment": { "method": "forced", "flagged_lines": 0 } } ], "has_more": true, "next_cursor": "MjAyNi0wOS0wMVQwOToxMzo0MS4wMDBafGExYjJjM2Q0" } ``` Each row carries the same fields as a job in `GET /batch/{id}`, plus `created_at` and `updated_at`. Rows held at the transcript review gate report `stage: "awaiting_review"`, which is the cheapest way to find everything waiting on a human across a whole catalogue. `status` and `stage` mean exactly what they mean on [`GET /jobs/{id}`](/api-reference/jobs). `second_opinion` and `alignment` are **summaries** here rather than the full blocks — a page of suggestion text would be large and mostly unread. Fetch the individual job for the detail. As everywhere else, `null` means the check did not run, and is never the same as a clean result. The full transcript and lyrics are **not** included in list rows. Use `GET /jobs/{id}` or the download URLs for content. ## Rate limits Two fields appear only when they apply: `end_user` is present when the job was submitted with one, and `review_delivery` is present when `review_required` is `true`. `external_id` and `isrc` are always present, and `null` when unset. This endpoint draws on the **read** meter, not the submit meter, so polling never consumes the budget that submits songs. Defaults are 120/minute, 2,000/hour and 20,000/day; your organisation may carry higher limits. For scale, a 50,000-song catalogue swept at `limit=100` costs about 500 requests per full pass, against roughly 600,000 for per-job polling. ## Errors | Status | Code | Cause | | - | - | - | | 400 | `VAL_001` | Invalid `limit`, `status`, `updated_since`, `batch_id` or `cursor` | | 401 | `AUTH_001` | Missing, invalid, or expired API key | | 429 | `RATE_001` | Read rate limit exceeded — see `Retry-After` | # GET /languages Source: https://docs.lyrcs.ai/api-reference/languages List all supported transcription languages ## Endpoint ``` GET https://lyrcs.ai/api/v1/languages ``` **No authentication required.** Returns the complete list of supported languages with name and language family. ## Response ```json theme={null} { "languages": [ { "name": "Hindi", "family": "Indo-Aryan" }, { "name": "Tamil", "family": "Dravidian" } ], "total": 48 } ``` ## Using language values The `name` field is the value to pass as `language` in `POST /transcribe` and `POST /batch`. > [!WARNING] > > Language values are **case-sensitive**. `"Tamil"` is accepted. `"tamil"` and `"TAMIL"` both return `400 validation_error`. Always use the exact strings from this endpoint. ## Full language reference ### Indian Languages — 30 | Language | Family | | - | - | | Hindi | Indo-Aryan | | Bengali | Indo-Aryan | | Marathi | Indo-Aryan | | Telugu | Dravidian | | Tamil | Dravidian | | Gujarati | Indo-Aryan | | Urdu | Indo-Aryan | | Kannada | Dravidian | | Odia | Indo-Aryan | | Malayalam | Dravidian | | Punjabi | Indo-Aryan | | Assamese | Indo-Aryan | | Maithili | Indo-Aryan | | Santali | Austroasiatic | | Kashmiri | Indo-Aryan | | Nepali | Indo-Aryan | | Sindhi | Indo-Aryan | | Konkani | Indo-Aryan | | Dogri | Indo-Aryan | | Manipuri | Sino-Tibetan | | Bodo | Sino-Tibetan | | Sanskrit | Indo-Aryan | | Haryanvi | Indo-Aryan | | Bhojpuri | Indo-Aryan | | Magahi | Indo-Aryan | | Chhattisgarhi | Indo-Aryan | | Rajasthani | Indo-Aryan | | Tulu | Dravidian | | Gondi | Dravidian | | Saurashtra | Indo-Aryan | ### Global Languages — 18 | Language | Family | | - | - | | English | Germanic | | Spanish | Romance | | Mandarin Chinese | Sino-Tibetan | | French | Romance | | Arabic | Semitic | | Portuguese | Romance | | Russian | Slavic | | Japanese | Japonic | | German | Germanic | | Korean | Koreanic | | Italian | Romance | | Turkish | Turkic | | Dutch | Germanic | | Indonesian | Austronesian | | Thai | Tai-Kadai | | Yoruba | Niger-Congo | | Swahili | Niger-Congo | | Zulu | Niger-Congo | ## Examples ```bash curl theme={null} curl https://lyrcs.ai/api/v1/languages ``` ```javascript Node.js theme={null} const res = await fetch("https://lyrcs.ai/api/v1/languages"); const { languages } = await res.json(); // Get all Indian language names const indianLangs = languages .filter((l) => ["Indo-Aryan", "Dravidian", "Austroasiatic", "Sino-Tibetan"].includes(l.family)) .map((l) => l.name); ``` ```python Python theme={null} import requests r = requests.get("https://lyrcs.ai/api/v1/languages") languages = r.json()["languages"] # Get all language names as a set for validation valid_languages = {lang["name"] for lang in languages} ``` # Review Source: https://docs.lyrcs.ai/api-reference/review Human approval flow for jobs submitted with review=true When a job is submitted with `review=true`, it stops for a human before delivery. A `job.awaiting_review` event carries a `review_url`; `job.complete` follows once someone approves. `review_stage` decides **where** it stops. See [POST /transcribe](/api-reference/transcribe) for the parameter itself. | `review_stage` | Stops | The reviewer sees | On approval | | - | - | - | - | | `"aligned"` (default) | After alignment | Time-synced lines | The job is finalised | | `"transcript"` | Before alignment | Untimed lyrics | Alignment runs on the approved text | ## What "awaiting review" does and does not hold back The **`job.complete` webhook** is held until approval. Nothing else is. `GET /api/v1/jobs/{id}` reports the job's real pipeline state throughout, and once a stage has produced output that output is readable — so an aligned-stage job returns `status: "complete"` with download URLs before anyone has approved. Approval is recorded in `review_approved_at`. > [!WARNING] > > If your workflow requires that nothing is consumed before sign-off, gate on > `review_approved_at` yourself — do not treat `status: "complete"` as approval. > For a hard gate, use `review_stage: "transcript"`: alignment has not run, so > there are no timed outputs to read early. ## Review URL ``` https://lyrcs.ai/review/{job_id}?token={token} ``` It is delivered in the `job.awaiting_review` webhook, and is also returned by `GET /api/v1/jobs/{id}` and `GET /api/v1/jobs` under `review_url`. **A webhook endpoint is not required** — a polling consumer can run the whole flow. `review_url` is `null` until the job reaches its gate and a token is minted — after transcription for `review_stage: "transcript"`, after alignment for `"aligned"`. Poll until it is non-null rather than caching a null. A job submitted with `review_delivery: "api"` mints no token at all, so its `review_url` stays `null` permanently and our review page cannot be opened for it. That is deliberate: the link's security *is* the token. The token is valid for **7 days** and may be used more than once — a reviewer can open the link, leave, and come back. It cannot be used after `review_expires_at`; contact [support@lyrcs.ai](mailto:support@lyrcs.ai) for a new one. ## Two ways to approve | | Door A — our review page | Door B — your own product | | - | - | - | | Who builds the screen | We do | You do | | How approval happens | The reviewer clicks approve at `review_url` | Your server calls [`POST /jobs/{id}/approve`](/api-reference/approve) | Both converge on the same approval and the same outputs; nothing downstream distinguishes them, and the first approval wins whichever door it came through. `review_delivery` at submission decides which doors a job opens — see [Running Review In Your Own Product](/guides/partner-review). ## Approving The reviewer approves in the browser at `review_url`. Corrections made there are saved with the approval. **Corrections are re-aligned.** On an aligned-stage job, editing a line invalidates the word-level timings that were derived from the old text, so approval re-runs alignment over the corrected lines. Where re-alignment is unavailable for your organisation, the word-level track is **removed** rather than returned describing text that is no longer there; the line-level LRC and SRT are unaffected. The approval response reports which happened: | `alignment` | Meaning | | - | - | | absent | Nothing was edited; timings untouched | | `"realigned"` | Edits were re-timed against the audio | | `"word_timings_dropped"` | Edits could not be re-timed; word-level output removed | ## Webhook payloads **job.awaiting_review** — fires when the job reaches its gate: ```json theme={null} { "event": "job.awaiting_review", "job_id": "a1b2c3d4-...", "language": "Punjabi", "review_stage": "transcript", "review_url": "https://lyrcs.ai/review/a1b2c3d4-...?token=...", "expires_at": "2024-01-02T00:00:00.000Z", "studio_url": "https://lyrcs.ai/studio/a1b2c3d4-..." } ``` `review_stage` tells you which gate fired — the same event name is used at both, and what the reviewer is being asked to check differs between them. **job.complete** — fires after approval, carrying the same fields as a non-review job: ```json theme={null} { "event": "job.complete", "job_id": "a1b2c3d4-...", "external_id": "your-own-id", "language": "Punjabi", "results": { "transcript": "...", "transliteration": "...", "translation": "...", "cultural_notes": null, "downloads": { "lrc_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/original", "lrc_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/transliterated", "srt_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/original", "srt_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/transliterated" } } } ``` Word-level download URLs appear only when the job was submitted with `word_align=true` and the timings survived review. ## Review fields on the job response ```json theme={null} { "review_required": true, "review_url": "https://lyrcs.ai/review/a1b2c3d4-...?token=...", "review_expires_at": "2024-01-02T00:00:00.000Z", "review_approved_at": null } ``` `review_approved_at` is `null` until approval, then an ISO timestamp. It is the only field that tells you a human has signed off. ## Known limitations * The `job.complete` webhook fired after approval is **single-attempt** — it does not retry, unlike the standard flow which retries at +1 min, +5 min and +30 min. If you miss it, poll `GET /jobs/{id}`; `review_approved_at` will be set and the results are available. * A `review_stage: "transcript"` job waits up to **8 days**. If nobody approves, it is marked `failed` with stage `review` rather than remaining `processing` indefinitely. * Adding or removing lines requires that the timings can be re-derived. At the aligned gate for an organisation without re-alignment, only the wording of existing lines can change; an attempt to alter the line count is refused with `409 REV_001`. See the [Review Flow guide](/guides/review-flow) for a full end-to-end walkthrough. # POST /transcribe Source: https://docs.lyrcs.ai/api-reference/transcribe Submit an audio file for transcription, transliteration, translation, and alignment ## Endpoint ``` POST https://lyrcs.ai/api/v1/transcribe ``` Accepts `multipart/form-data` (for file uploads) or `application/json` (for URL-based jobs). Returns `202 Accepted` immediately — processing is asynchronous. ## Parameters ### `language` — required The source language of the audio. Must be the exact full name as returned by `GET /api/v1/languages`. Values are **case-sensitive**. ``` "Tamil" ✓ "Hindi" ✓ "tamil" ✗ → 400 validation_error "HINDI" ✗ → 400 validation_error ``` ### `file` — required if `audio_url` absent Audio file, submitted as `multipart/form-data`. Accepted formats: **mp3, wav, flac, m4a, aac, ogg, webm**. > [!WARNING] > > The Vercel serverless body limit is \~4.5 MB. For larger files — most production audio — use `audio_url` instead, which is supported up to **100 MB**. ### `audio_url` — required if `file` absent An HTTPS URL pointing to the audio file. Must use `https://` — HTTP URLs are rejected. * Supported up to **100 MB**. We probe the URL with a `HEAD` before creating the job and reject anything larger with `413 VAL_002`. The probe is best-effort: if your host refuses `HEAD` or omits `Content-Length`, the job is created anyway and an oversized file fails later during transcription instead. Sizing the file yourself is more reliable than relying on the probe. * The URL must stay reachable until transcription has fetched it — in practice the first minute or two after submission. We then convert the audio and keep our own copy, so **the URL does not need to outlive that**: alignment, re-alignment and downloads all read our copy, and a job held at a review gate for days never touches your URL again. * **Strictly one-time-use URLs will not work.** We make up to three requests: a `HEAD` to check the size when the job is submitted, then a `HEAD` and a `GET` during transcription. A retried step can add more. Time-limited presigned URLs are fine as long as the window covers transcription. ### `align` — optional, default `true` Controls whether time-alignment runs after transcription. | Value | Output | Time | | - | - | - | | `true` (default) | Transcript + transliteration + translation + LRC + SRT + word-level JSON | \~90s | | `false` | Transcript + transliteration + translation only | \~60s | When `false`, the `downloads` object is **omitted** from the job response and webhook payload. ### `word_align` — optional, default `true` Controls whether word-level timestamps are generated in addition to line-level LRC/SRT. Only takes effect when `align=true`. | Value | Output | | - | - | | `true` (default) | Line-level LRC + SRT, **plus** per-word JSON timestamps | | `false` | Line-level LRC + SRT only | When `true`, `words_original` and `words_transliterated` are added to `results.downloads` on completion. When `false`, those keys are absent. > [!NOTE] > > **`word_align=false` is no longer meaningfully cheaper or faster.** On accounts > using forced alignment, word timings come back from the same pass that produces > the line timings, so turning them off saves nothing. Choose `false` only if > per-word data would be noise in your pipeline — not to reduce cost or latency. If you are rendering karaoke-style or word-by-word lyric video, you want `true`. Line timings alone cannot drive per-word highlighting. ### `isrc` — optional The recording's International Standard Recording Code. **Optional, and it will stay optional** — ISRCs are assigned at release, so unreleased material, demos and pre-release masters often have none, and a distributor getting lyrics approved before release may not have one yet. Send it when you have it. It is the only identifier that means the same thing to us and to your catalogue system, which is what makes "have we already processed this recording?" answerable. `external_id` cannot do that job — it is opaque to us — and a file hash cannot either, because a delivery master and an artist's earlier upload are different encodes of the same recording. Hyphens and lower case are accepted and normalised, so the form you have in a delivery sheet works as-is: ```json theme={null} { "isrc": "US-SKG-24-00001" } // stored and returned as "USSKG2400001" ``` A value that is not a valid ISRC is rejected with `400`. That is deliberate: a malformed ISRC is worse than none, because it looks like a join key and silently fails to match. It is echoed on `GET /jobs/{id}`, in list rows, and in webhook payloads, and can be used as a filter: `GET /v1/jobs?isrc=USSKG2400001`. ## Retrying safely — `Idempotency-Key` If a submission times out you cannot tell whether it arrived. Retrying risks a duplicate job and a **duplicate charge**; not retrying risks the song silently never being processed. Send an `Idempotency-Key` header — any unique string, one per song — and reuse it on every retry of that same submission: ```bash theme={null} curl -X POST https://lyrcs.ai/api/v1/transcribe \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -H "Idempotency-Key: 8f14e45f-ea3d-4b1a-9f2c-77b0c1d3a901" \ -H "Content-Type: application/json" \ -d '{"audio_url": "https://cdn.example.com/song.mp3", "language": "Tamil"}' ``` The first request creates the job. Every repeat returns **the same `job_id`**, with an `Idempotent-Replay: true` header, without creating or charging for anything. | Situation | Response | | - | - | | First use of the key | Normal `202` | | Retry, same request | The original `202`, replayed — except `credits`, which is current | | Retry while the first is still running | `409` `IDEM_001` — wait a moment and retry | | Same key, **different** request | `409` `IDEM_002` — use a new key | | Request was rejected (4xx) | Key is released; safe to reuse once fixed | Keys are scoped to your organisation and last 24 hours. The header is optional and changes nothing if omitted — but for any automated integration it is strongly recommended, and it is the only thing that prevents being billed twice for one song. `POST /batch` accepts the same header, covering the whole job list. ### `review` — optional, default `false` When `true`, the job stops for a human before it is delivered. A `job.awaiting_review` event carries a `review_url`; `job.complete` follows once someone approves. You do **not** need a `webhook_url`. The `review_url` also appears on `GET /jobs/{id}` and `GET /jobs`, so a polling consumer reaches the gate perfectly well without receiving webhooks. ### `review_stage` — optional, default `"aligned"` Where the review gate sits. Requires `review: true`; sending it alone is a validation error. | Value | The reviewer sees | Alignment runs | | - | - | - | | `"aligned"` | Time-synced lines | Before review — approval finalises the job | | `"transcript"` | Untimed lyrics | **After** review, on the text they approved | Use `"transcript"` when corrections should reach the aligner. An edit at the aligned gate changes the words but cannot move the timings that were already produced from the old ones; an edit at the transcript gate is aligned from scratch. `"aligned"` is the default so existing integrations are unaffected. ```json theme={null} { "audio_url": "https://cdn.example.com/song.mp3", "language": "Punjabi", "review": true, "review_stage": "transcript" } ``` > [!NOTE] > > A `review_stage: "transcript"` job waits up to 8 days for approval. If nobody > approves, it is marked `failed` with stage `review` rather than sitting in > `processing` forever. ### `review_delivery` — optional, default `"both"` Which ways a held job can be approved. Requires `review: true`. | Value | Effect | | - | - | | `"both"` | **Default.** A review link is created *and* `POST /jobs/{id}/approve` works. | | `"api"` | No review link is created. `review_url` is `null` and our review page cannot be opened for this job at all. | | `"link"` | A review link is created; API approval is refused with `409 APR_003`. | `"api"` is for running the review inside your own product — see [Running Review In Your Own Product](/guides/partner-review). It is a structural guarantee rather than a convention: the link's security *is* its token, and for these jobs no token exists. Leave it unset unless you need a door shut. `"both"` lets you fall back to forwarding `review_url` for a song your own reviewer cannot handle. ### `end_user` — optional The customer of yours this song belongs to. Useful when the artist never touches lyrcs.ai, so a job would otherwise carry no trace of whose song it is. ```json theme={null} { "end_user": { "external_id": "cust_8842", "email": "artist@example.com", "name": "Asha R." } } ``` `external_id` is required within the object and is **your** identifier — send the same one and you get the same record. `email` and `name` are optional; a later submit fills a missing one but never overwrites an existing value, and records are never merged on email. Echoed on the submission response, `GET /jobs/{id}` and list rows, and filterable: `GET /v1/jobs?end_user_id=cust_8842`. In `multipart/form-data`, send it as a JSON-encoded string in an `end_user` field. > [!NOTE] > > These are not lyrcs.ai accounts and cannot sign in anywhere. The record exists > so that "which of your customers is this job?" has an answer on both sides. ### `webhook_url` — optional An HTTPS URL where event payloads will be delivered. Accepted in both the JSON body and `multipart/form-data`. Webhook events: `job.complete`, `job.awaiting_review`, `job.degraded`, `job.failed`. See the [Webhooks guide](/guides/webhooks) for payload shapes and retry behaviour. ### `external_id` — optional An arbitrary string (max 255 characters) that you can use to map the job back to a track in your own system. Accepted in both the JSON body and `multipart/form-data`. When provided, `external_id` is echoed back in: * The `202` submission response * `GET /api/v1/jobs/{job_id}` * The `job.complete` webhook payload When omitted, the field is present but `null` in all responses. ## Response — 202 Accepted ```json theme={null} { "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "external_id": "TRACK_12345", "status": "queued", "language": "Tamil", "created_at": "2024-01-01T00:00:00.000Z", "review_required": false, "align_requested": true, "word_align_requested": true, "credits": { "plan": "alignment", "balance": 57, "other_balances": [] } } ``` Use `job_id` to poll `GET /api/v1/jobs/{job_id}` for status and results. ### `credits` Your balance **after** this job's charge, in the same shape as [`GET /usage`](/api-reference/usage). An automated integration can watch `credits.balance` and pause or alert before it reaches 0, rather than finding out from a `402 PAY_001` partway through a run. * If you submit in parallel, responses can arrive out of order. Treat the **lowest** `balance` you have seen as current. * A `parked` job (one waiting on an artist's payment) is not charged, so the balance does not drop for it. * On an idempotent replay, `credits` is your balance **now**, not at the time of the original submission. Everything else in the body is the original response. ## Examples ### Basic file upload ```bash curl theme={null} curl -X POST https://lyrcs.ai/api/v1/transcribe \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -F "file=@song.mp3" \ -F "language=Tamil" ``` ```javascript Node.js theme={null} import { readFileSync } from "fs"; const form = new FormData(); form.append("file", new Blob([readFileSync("song.mp3")], { type: "audio/mpeg" }), "song.mp3"); form.append("language", "Tamil"); const response = await fetch("https://lyrcs.ai/api/v1/transcribe", { method: "POST", headers: { Authorization: `Bearer ${process.env.LYRCS_API_KEY}` }, body: form, }); const { job_id } = await response.json(); ``` ```python Python theme={null} import os, requests with open("song.mp3", "rb") as f: response = requests.post( "https://lyrcs.ai/api/v1/transcribe", headers={"Authorization": f"Bearer {os.environ['LYRCS_API_KEY']}"}, files={"file": ("song.mp3", f, "audio/mpeg")}, data={"language": "Tamil"}, ) job_id = response.json()["job_id"] ``` ### audio_url mode (recommended for production) ```bash curl theme={null} curl -X POST https://lyrcs.ai/api/v1/transcribe \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "audio_url": "https://cdn.example.com/songs/song-123.mp3", "language": "Hindi", "webhook_url": "https://api.example.com/webhooks/lyrcs" }' ``` ```javascript Node.js theme={null} const response = await fetch("https://lyrcs.ai/api/v1/transcribe", { method: "POST", headers: { Authorization: `Bearer ${process.env.LYRCS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ audio_url: "https://cdn.example.com/songs/song-123.mp3", language: "Hindi", webhook_url: "https://api.example.com/webhooks/lyrcs", }), }); ``` ```python Python theme={null} import os, requests response = requests.post( "https://lyrcs.ai/api/v1/transcribe", headers={"Authorization": f"Bearer {os.environ['LYRCS_API_KEY']}"}, json={ "audio_url": "https://cdn.example.com/songs/song-123.mp3", "language": "Hindi", "webhook_url": "https://api.example.com/webhooks/lyrcs", }, ) ``` ### Transcript only — align=false Use when you need metadata (lyrics text) but not time-synced files. Faster and sufficient for streaming store metadata delivery or liner notes. ```bash curl theme={null} curl -X POST https://lyrcs.ai/api/v1/transcribe \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "audio_url": "https://cdn.example.com/songs/song-123.mp3", "language": "Telugu", "align": false }' ``` ```javascript Node.js theme={null} const response = await fetch("https://lyrcs.ai/api/v1/transcribe", { method: "POST", headers: { Authorization: `Bearer ${process.env.LYRCS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ audio_url: "https://cdn.example.com/songs/song-123.mp3", language: "Telugu", align: false, }), }); ``` ```python Python theme={null} import os, requests response = requests.post( "https://lyrcs.ai/api/v1/transcribe", headers={"Authorization": f"Bearer {os.environ['LYRCS_API_KEY']}"}, json={ "audio_url": "https://cdn.example.com/songs/song-123.mp3", "language": "Telugu", "align": False, }, ) ``` ### With external_id for track mapping ```bash curl theme={null} curl -X POST https://lyrcs.ai/api/v1/transcribe \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "audio_url": "https://cdn.example.com/songs/song-123.mp3", "language": "Hindi", "external_id": "CATALOG_76007488", "align": false }' ``` ```javascript Node.js theme={null} const response = await fetch("https://lyrcs.ai/api/v1/transcribe", { method: "POST", headers: { Authorization: `Bearer ${process.env.LYRCS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ audio_url: "https://cdn.example.com/songs/song-123.mp3", language: "Hindi", external_id: "CATALOG_76007488", align: false, }), }); const { job_id, external_id } = await response.json(); // external_id === "CATALOG_76007488" ``` ```python Python theme={null} import os, requests response = requests.post( "https://lyrcs.ai/api/v1/transcribe", headers={"Authorization": f"Bearer {os.environ['LYRCS_API_KEY']}"}, json={ "audio_url": "https://cdn.example.com/songs/song-123.mp3", "language": "Hindi", "external_id": "CATALOG_76007488", "align": False, }, ) data = response.json() # data["external_id"] == "CATALOG_76007488" ``` ### With artist review gate — review=true Use when results must be approved by the artist before delivery. ```bash curl theme={null} curl -X POST https://lyrcs.ai/api/v1/transcribe \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "audio_url": "https://cdn.example.com/songs/song-123.mp3", "language": "Punjabi", "review": true, "webhook_url": "https://api.example.com/webhooks/lyrcs" }' ``` ```javascript Node.js theme={null} const response = await fetch("https://lyrcs.ai/api/v1/transcribe", { method: "POST", headers: { Authorization: `Bearer ${process.env.LYRCS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ audio_url: "https://cdn.example.com/songs/song-123.mp3", language: "Punjabi", review: true, webhook_url: "https://api.example.com/webhooks/lyrcs", }), }); ``` ```python Python theme={null} import os, requests response = requests.post( "https://lyrcs.ai/api/v1/transcribe", headers={"Authorization": f"Bearer {os.environ['LYRCS_API_KEY']}"}, json={ "audio_url": "https://cdn.example.com/songs/song-123.mp3", "language": "Punjabi", "review": True, "webhook_url": "https://api.example.com/webhooks/lyrcs", }, ) ``` # GET /usage Source: https://docs.lyrcs.ai/api-reference/usage Retrieve your credit balance and all-time usage statistics for your organisation ## Endpoint ``` GET https://lyrcs.ai/api/v1/usage ``` Returns your current credit balance, plus job counts, total audio duration processed, a breakdown by language, and total API call count for your organisation. Check `credits.balance` before submitting a batch: each song charges one credit when processing starts, and a submission made at a balance of 0 is refused with `402` / `PAY_001`. Once you are submitting, every `202` from [`POST /transcribe`](/api-reference/transcribe#credits) and [`POST /batch`](/api-reference/batch) carries the same `credits` block, updated after its charge, so there is no need to poll this endpoint during a run. ## Response ```json theme={null} { "org_id": "org_abc123", "period": "all_time", "total_jobs": 142, "completed_jobs": 138, "total_duration_seconds": 49320, "jobs_by_language": { "Hindi": 58, "Tamil": 44, "Telugu": 22, "Punjabi": 18 }, "api_calls": 612, "credits": { "plan": "alignment", "balance": 58, "other_balances": [] } } ``` ## Response fields | Field | Type | Description | | - | - | - | | `org_id` | string | Your organisation ID | | `period` | string | Always `"all_time"` — no date filtering currently | | `total_jobs` | number | Total jobs submitted via API | | `completed_jobs` | number | Jobs where both transcript and LRC are present | | `total_duration_seconds` | number | Sum of audio duration across all API jobs | | `jobs_by_language` | object | Job count keyed by language name | | `api_calls` | number | Total API requests made by this organisation | | `credits.plan` | string \| null | Your plan's credit type: `transcription`, `alignment`, `video-basic` or `video-pro`. `null` if no plan is set and you hold no credits | | `credits.balance` | number | Credits remaining on your plan. This is the balance every API job draws on, and the one checked before a job is accepted. Current, not all-time | | `credits.other_balances` | array | Credits of any other type, as `{ "credit_type", "balance" }`. Only types with a positive balance are listed. API jobs never draw on these, so they do not add to `balance` — ask your administrator if you expected them to | ## Examples ```bash curl theme={null} curl https://lyrcs.ai/api/v1/usage \ -H "Authorization: Bearer $LYRCS_API_KEY" ``` ```javascript Node.js theme={null} const res = await fetch("https://lyrcs.ai/api/v1/usage", { headers: { Authorization: `Bearer ${process.env.LYRCS_API_KEY}` }, }); const usage = await res.json(); console.log(`${usage.credits.balance} credits remaining`); const hours = (usage.total_duration_seconds / 3600).toFixed(1); console.log(`Processed ${hours} hours of audio`); console.log(`Success rate: ${((usage.completed_jobs / usage.total_jobs) * 100).toFixed(1)}%`); ``` ```python Python theme={null} import os, requests r = requests.get( "https://lyrcs.ai/api/v1/usage", headers={"Authorization": f"Bearer {os.environ['LYRCS_API_KEY']}"}, ) usage = r.json() print(f"{usage['credits']['balance']} credits remaining") hours = usage["total_duration_seconds"] / 3600 print(f"Processed {hours:.1f} hours of audio") ``` # Webhook recovery Source: https://docs.lyrcs.ai/api-reference/webhook-recovery See what we tried to send, and send it again Webhook delivery is retried four times over about 36 minutes, and the `job.complete` that follows a review approval is sent once. After that the event is gone. These endpoints exist so that being unreachable for an hour is recoverable rather than permanent. Three tools, in the order you reach for them: **dead letters** are the short, actionable list of events that ran out of retries and were never delivered — the "what did I miss?" answer; **deliveries** is the full attempt-by-attempt log for diagnosing *why*; and **replay** sends an event again. ## GET /webhooks/dead-letters Every event that exhausted all four attempts and was never delivered, newest first. This is the list to reconcile against after an outage — one entry per lost event, not one per attempt. Outstanding entries only by default; a later successful delivery (including a replay) clears an entry automatically, so an empty list means nothing is outstanding. ```bash theme={null} curl -H "Authorization: Bearer $LYRCS_API_KEY" \ "https://lyrcs.ai/api/v1/webhooks/dead-letters" ``` | Parameter | Type | Description | | - | - | - | | `resolved` | `true` | Include cleared entries too. Default shows only outstanding ones | | `job_id` | UUID | Dead letters for one job | | `limit` | 1–200 | Page size, default 50 | | `cursor` | string | From `next_cursor` | ```json theme={null} { "dead_letters": [ { "id": "…", "job_id": "a1b2c3d4-…", "event": "job.complete", "webhook_url": "https://api.example.com/webhooks/lyrcs", "attempts": 4, "last_status_code": 503, "last_error": null, "created_at": "2026-08-20T15:45:36.482Z", "resolved_at": null, "resolved_via": null } ], "has_more": false, "next_cursor": null } ``` ## POST /webhooks/dead-letters/\[id]/replay Resend one dead-lettered event. ```bash theme={null} curl -X POST https://lyrcs.ai/api/v1/webhooks/dead-letters/{id}/replay \ -H "Authorization: Bearer $LYRCS_API_KEY" ``` ```json theme={null} { "dead_letter_id": "…", "job_id": "a1b2c3d4-…", "event": "job.complete", "delivered": true, "status_code": 200, "error": null, "resolved": true } ``` Unlike the per-job replay below, this resends the **exact bytes we stored** when the event was dead-lettered — precisely the message you missed, not one rebuilt from the job's current state. A successful resend clears the entry (`resolved_via: "replay"`); a resend that fails again leaves it outstanding, and replaying an already-cleared entry returns `409`. ## GET /webhooks/deliveries Every delivery attempt we have made for your organisation, newest first. ```bash theme={null} curl -H "Authorization: Bearer $LYRCS_API_KEY" \ "https://lyrcs.ai/api/v1/webhooks/deliveries?success=false&since=2026-09-01T00:00:00Z" ``` | Parameter | Type | Description | | - | - | - | | `job_id` | UUID | Attempts for one job | | `event` | string | `job.complete`, `job.awaiting_review`, `job.failed`, `job.degraded` | | `success` | `true` \| `false` | Filter by outcome — `false` is the one you want after an outage | | `since` | ISO 8601 | Attempts after this time | | `limit` | 1–200 | Page size, default 50 | | `cursor` | string | From `next_cursor` | ```json theme={null} { "deliveries": [ { "id": "…", "job_id": "a1b2c3d4-…", "event": "job.awaiting_review", "webhook_url": "https://api.example.com/webhooks/lyrcs", "attempt": 4, "status_code": 404, "success": false, "error": null, "delivered_at": "2026-08-20T15:45:36.482Z" } ], "has_more": false, "next_cursor": null } ``` > [!NOTE] > > **`status_code` and `error` tell you different things.** A `status_code` means > your endpoint answered and rejected it — the problem is in your handler. An > `error` with no status code means we never got a reply at all — a timeout, DNS, > or TLS failure — and the problem is in front of your handler. Ordered newest-first, unlike [`GET /jobs`](/api-reference/jobs-list). That endpoint is a sync feed where ascending order keeps a watermark safe; this is a log you read when something has just broken, so the recent end is the useful one. ## POST /jobs/\[id]/replay-webhook Send a webhook again for one job. ```bash theme={null} curl -X POST https://lyrcs.ai/api/v1/jobs/{job_id}/replay-webhook \ -H "Authorization: Bearer $LYRCS_API_KEY" ``` Optionally name the event; otherwise we pick the one the job's current state warrants — `job.awaiting_review` if it is waiting for a reviewer, `job.complete` if it has finished. ```json theme={null} { "event": "job.complete" } ``` Response: ```json theme={null} { "job_id": "a1b2c3d4-…", "event": "job.complete", "delivered": true, "status_code": 200, "webhook_url": "https://api.example.com/webhooks/lyrcs" } ``` You always get `200` if the replay ran; **`delivered` reports what your endpoint did with it.** Those are different failures and conflating them would be unhelpful on the one endpoint you reach for when things are already broken. ### It rebuilds the payload The delivery log records what happened to each attempt, not the bytes we sent, so a replay reconstructs the payload from the job **as it stands now**. Normally that is what you want — current truth rather than a stale copy — but a replayed `job.complete` can differ from the one you missed if the job changed in between, for example because a reviewer corrected a line and the timings were re-derived. ### The destination cannot be changed Replay always sends to the `webhook_url` the job was submitted with. There is no parameter to redirect it — accepting one would turn an authenticated recovery tool into a way to point our servers at an arbitrary host. To change where a job's webhooks go, submit the next job with the new URL. ### Cost None. No transcription, no alignment, no vendor call — one database read and one outbound request. Replay draws on the read rate limit, not the submit limit. ## Errors | HTTP | `code` | Meaning | | - | - | - | | 404 | `NOT_001` | Job not found, or belongs to another organisation | | 409 | `HOOK_001` | The job was submitted without a `webhook_url` — poll instead | | 409 | `HOOK_002` | The job is not complete, so there is no `job.complete` to replay | | 409 | `HOOK_003` | No review link on this job to replay | | 409 | `HOOK_004` | The review link has expired — contact [support@lyrcs.ai](mailto:support@lyrcs.ai) | | 404 | `HOOK_005` | No dead letter with that id, or it belongs to another organisation | | 409 | `HOOK_006` | That dead letter has already been cleared | # Changelog Source: https://docs.lyrcs.ai/changelog/overview Product updates and improvements to lyrcs.ai **November 17, 2026** ## New **Send your artists to make their own lyric video** `studio_url` opens our studio for signed-in lyrcs.ai accounts, so an artist following it hit a login page. The only link an artist could open, `artist_url`, arrived in the `job.awaiting_review` webhook — never for a partner who polls, and never for a job that was not held for review. `POST /api/v1/jobs/{id}/artist-link` returns that link on demand. It opens the artist's own songs, where they order, style, render and download a lyric video with no lyrcs.ai account. If the job was submitted without an `end_user`, name the artist in the request and they are attached to it; a job that already belongs to a different artist is refused. The response's `video` block says whether a video can be ordered yet, and why not if it cannot. The call never charges. This is additive — existing integrations are unaffected. See [`POST /jobs/{id}/artist-link`](/api-reference/artist-link). **October 15, 2026** ## New **See your credit balance from the API** There was no way to read your balance through the API: `GET /usage` reported activity only, and the first sign of running out was a `402 PAY_001` on the next submission — for a bulk sender, partway through a run. `GET /usage` now returns a `credits` block, and every `202` from `POST /transcribe` and `POST /batch` carries the same block, read after that submission's charge. An integration can pause or alert as `credits.balance` runs low without polling anything. `balance` is the number every API job draws on; credits of any other type are listed separately in `other_balances`, because API jobs never spend them. On an idempotent replay, `credits` is your balance now rather than at the original submission; everything else in the body is replayed as before. This is additive — existing integrations are unaffected. See [`GET /usage`](/api-reference/usage) and [`POST /transcribe`](/api-reference/transcribe#credits). **September 2, 2026** ## New **Run the lyric review inside your own product** A job held for review can now be approved by your own server, with your API key, through `POST /api/v1/jobs/{id}/approve` — no review link, no browser, no visit to lyrcs.ai. If the artist is already signed in to your app, the hand-off to a second website disappears. This is not a new mode. It is a second door into the same held job: alignment, the outputs and the `job.complete` webhook are identical whichever door is used, the first approval wins, and you can choose per job. Our review page is unchanged and remains the right answer if you would rather not build a lyrics editor. See [Running Review In Your Own Product](/guides/partner-review). **The lyrics of a held job are now readable, as lines** `GET /jobs/{id}` carries a `review` block while a job is held, with each line's text, transliteration, timestamp and quality flag. Previously `results` was only filled once a job was `complete` — and a held job is not — so there was no way to obtain the very thing you were being asked to approve except by opening our page. An array rather than the newline-joined string, because line identity is what makes per-line playback and the per-line quality signals usable. The existing `results.transcript` is unchanged; this is additive. **`review_delivery` — choose which doors a job opens** Optional at submission, default `"both"`, so nothing existing changes. `"api"` mints no review token at all, so `review_url` is `null` and our review page cannot be opened for that job by anyone. `"link"` refuses API approval. If your compliance requires every approval to originate inside your own system, `"api"` gives you that structurally rather than by convention. **`end_user` — tell us whose song it is** Optional at submission. When the artist never touches lyrcs.ai, a job would otherwise carry no trace of who it belongs to, and "which of your customers is job `8f3a`?" has no answer on either side. Send your own identifier and we store, echo and filter on it: `GET /v1/jobs?end_user_id=cust_8842`. Your `external_id` is the key; email and name are optional attributes. We never merge records on email — addresses change, get shared, and one artist can arrive under two. These are not lyrcs.ai accounts and cannot sign in anywhere. ## Fixed **A failed release no longer strands an approved job** Approving at the transcript gate marks the job approved and then releases alignment. If that release failed, the job was left approved but never released: it sat until its 8-day budget expired, and every retry answered "already approved" and did nothing. The approval is now rolled back when the release fails, and the request returns `502 APR_004` — retry it, and the retry is a clean repeat rather than a no-op. Edit counts are now measured against the model's original output rather than the current text, so a retried approval records the same numbers instead of overwriting them with zero. **Uneven line counts between the two scripts are now refused** The original and transliteration are position-parallel, and alignment inherits each transliteration's timing from its original by index. Sending `lines` on its own with a different length did not fail — it produced a blank transliterated line, and a deletion shifted every remaining pair onto the wrong original for the rest of the song. Now refused with `409 APR_005`. Editing wording without changing the count is unaffected, and approving unchanged is never refused. **August 20, 2026** ## Withdrawn **`POST /api/v1/align` has been withdrawn and now returns `410 Gone`** The standalone alignment endpoint — supply your own audio URL and lyrics, skip transcription — never worked. Reviewing it ahead of a related change, we found three faults stacked in front of each other, including a mismatch between the parameter names in our own documentation and the ones the endpoint actually read. A request written from the published reference was rejected before anything else ran, and because validation failures were not logged, nobody trying it left a trace we could see. There is no successful call to it in the history of the API. We have withdrawn it rather than leave it published while we settle on a replacement. Alignment is unaffected everywhere else: `POST /transcribe` transcribes and time-aligns in a single job, which is how every working integration already does it. If you hold lyrics already and want them timed, that gap is now unfilled and we would rather say so. The replacement we intend to build aligns an **existing** job after your own review step — one job, one charge, audio we already hold. If that is your workflow, tell us. ## Updates **Quality signals on every job** Job responses and webhooks now carry two new fields, `second_opinion` and `alignment`. The first is an independent listener's read of the transcript — which lines it agreed with, and which passages it heard differently. The second reports how the timings were produced and flags individual lines whose audio does not match their text well. Both help you decide what to check before publishing. See [Quality Signals](/guides/quality-signals). Both are `null` when the check did not run, which is **not** the same as an empty result. An empty `suggestions` array means an independent listener agreed with every line. Please do not collapse the two into one falsy test. Both features are enabled per account and off by default. The fields are present and `null` until then, so you can build against them now. ## Fixes **Review now works together with word-level timestamps** A job submitted with both `review=true` and `word_align=true` skipped the review step entirely — no `review_url`, no `job.awaiting_review` webhook, straight to `job.complete`. Jobs asking for review without word timestamps were unaffected. Both combinations now behave the same. **`external_id` is returned on word-alignment jobs** Jobs with `word_align=true` returned `external_id: null` in the `job.complete` webhook even when one was supplied, so the same account got its identifier back or not depending on which options it chose. It is also now included in the `job.complete` sent after a review is approved, along with the word-level download links, which that message was missing. **Results are no longer sent before every check has finished** On jobs with `align=false`, results could be delivered while the second-listener check was still running, so its findings landed after the message meant to carry them. Delivery now waits for the whole transcription job. **August 10, 2026** ## Fixes **Job status now reports failure only when a job has actually failed** `GET /jobs/{id}` and `GET /batch/{id}` could report `failed` for a job that was still running normally, and then report `complete` for that same job minutes later. A client treating `failed` as final — the only reasonable reading — would mark healthy jobs as dead. Both endpoints now derive status identically and only report `failed` when the pipeline has recorded an actual failure. `failed` is terminal and a job never leaves it. The reverse also happened: a job that genuinely failed during transcription reported `processing` indefinitely on `GET /jobs/{id}`. Those now correctly report `failed`. **If you set your own polling timeout, please remove it.** A job can legitimately stay in `processing` for up to 15 minutes, and a batch considerably longer. The API now tells you when a job has failed, so a client-side timeout can only produce false negatives. Our previous documentation suggested a 3-minute timeout; that advice was wrong and has been corrected. ## Updates **New `stage` field on job responses** Alongside `status`, responses now carry `stage` — `transcribing`, `aligning`, `done` or `failed` — so you can watch a job advance without inferring progress from elapsed time. **Failed jobs now explain themselves** The `error` field was the bare string `"processing_failed"`. It is now an object with `stage` (`transcription` or `alignment`), a human-readable `message`, and `failed_at`. A job that failed at `alignment` still has a usable transcript. **Download endpoints no longer poll forever** Requesting an LRC, SRT or word-level file for a failed job, or for a job that never requested that output (`align=false`, `word_align=false`), returned `202 processing` indefinitely. These now return `409` with code `JOB_001` or `JOB_002`. `202` means retry; `409` means stop. **New `transcript_completed_at` timestamp** `completed_at` was stamped both when the transcript finished and again when the whole job did. `transcript_completed_at` now marks the first of those, so the two are no longer ambiguous. **July 31, 2026** ## New features **Motion presets for lyric videos** Six motion presets shape how each lyric line enters and leaves the frame — Fade, Gentle (fade with a breathing hold), Rise, Cascade (words appear one by one), Evaporate (words drift up and dissolve), and Dream (defocus blur with a breathing hold). Every preset loops live in the studio preview before you render. Presets support songs up to 12 minutes (Dream up to 8); longer songs render without motion. **Smarter instrumental breaks** Lyrics no longer sit frozen through instrumentals. On breaks of four seconds or more, the line clears shortly after the singing stops, and the next line fades in right on the vocal. An optional ♪ marker keeps time through long breaks. **Phonetic line styling** The transliteration line in dual-script videos now has its own colour picker and its own font — choose from seven display fonts alongside the default. **Karaoke word effects** Two new effects for word-level karaoke: Pop enlarges the active word as the highlight moves, and Wipe fills each word progressively as it's sung. **Word-sync check before you render** For karaoke modes, the studio now checks your word-level sync before you spend a render and tells you what it found. If sync looks weak it recommends Static mode and pre-selects it. A preview prompt lets you play the song with live word highlighting first — and if you try to render karaoke without previewing, a single confirmation asks whether you'd like to listen first. ## Updates **Redesigned script style chooser** Static modes now lead the grid with Recommended and Popular badges, every card states its trade-off, and modes carry clearer names — Static + Roman, Static Original, Static Roman, Karaoke Original, Karaoke Roman, Karaoke Both. The settings summary is now clickable, so you can change your script style or background at any point before rendering. **Faster video renders** Frame encoding is several times faster, cutting typical render times significantly — a six-minute song with the heaviest motion preset renders in about six and a half minutes. **Video options appear without a refresh** While word-level timestamps are still processing after alignment, the studio now shows a progress indicator and the JSON download and Generate Video options appear automatically the moment they're ready. ## Bug fixes * Karaoke videos no longer drift progressively behind the audio on long songs — the video timeline is now locked to absolute word timestamps. * The phonetic line in dual-script videos no longer shifts words across line boundaries; it now shows exactly the transliteration you approved in review. * Montserrat and other variable fonts now render in their correct weight in videos instead of silently falling back to a default font. * Background scene descriptions no longer intermittently fail to generate on the first attempt. **May 29, 2026** ## New features **Higher transcription accuracy** An automated second review pass now checks transcribed lyrics and corrects common errors before they reach you, with the transliteration regenerated to match. Tuned individually for 11 languages for higher accuracy across global repertoire. **Clearer job history** Failed jobs are now clearly flagged in your history view along with the reason, so you can see at a glance why a job didn't complete. ## Updates **Native script enforcement** Transcription now enforces native script output for Korean, Japanese, Arabic, and Thai, so the `lyrics` field stays in the original writing system instead of occasionally returning romanised text. **More reliable word-level alignment** Word alignment is more robust on long songs and songs with repeated refrains, and transient processing errors now retry automatically instead of failing the job. ## Bug fixes * Transient processing errors are now surfaced with a clear error state and retry option instead of silently failing. * Resolved intermittent timeout failures in the transcription and alignment pipeline. * Studio now polls for word-level alignment when it isn't ready at phase entry, eliminating a race that left jobs stuck. * Fixed an edge case where undefined lyrics lines could break the alignment map. **May 18, 2026** ## New features **Word-level alignment** Jobs now return word-by-word timestamps in addition to line-level timing — enabling true word-highlight karaoke and tighter sync use cases. Word timing is on by default; pass `word_align=false` to opt out. See the [`/transcribe`](/api-reference/transcribe) and webhook payloads for the new `words_original` and `words_transliterated` fields. **New `/align` endpoint** A dedicated endpoint for distributors who already have lyrics and only need timestamps added. `POST /api/v1/align` skips transcription entirely, cutting cost and latency. Read the full reference at [`POST /align`](/api-reference/align). > [!WARNING] > > **Superseded — this endpoint was withdrawn on 20 August 2026 and never > worked.** See the entry at the top of this changelog. The announcement below is > left in place as a record of what was published. **Word-level alignment in transliterated tab** Genuine word-level timestamps are now generated for the transliterated lyrics tab, so romanised playback stays in sync word-for-word with the original. **Free trial page at `lyrcs.ai/try`** Anyone can now run a song through the full karaoke pipeline at [lyrcs.ai/try](https://lyrcs.ai/try) without signing up — a quick way for prospects to evaluate output quality before requesting API access. ## Updates **Studio rename** The word-level alignment experiment has graduated. What was `/studio_word` is now simply **Studio** — the production word-level alignment workspace with a sticky audio player across the alignment and review screens. **Telugu transcription quality** Improved transcription accuracy for Telugu lyrics, with cleaner, diacritic-free romanisation. **Cleaner transcription line breaks** Line breaks in transcription output are now more consistent, reducing the amount of manual cleanup needed in the review step. **Support email** The contact address has moved from `api@lyrcs.ai` to `support@lyrcs.ai`. Existing integrations are unaffected — please update any saved contacts. ## Bug fixes * Renamed `/align` response fields to `lyrics` and `lyrics_transliterated` for consistency with the rest of the API. * Fixed the word-level karaoke layout and the word mapping on the transliterated tab. # Errors Source: https://docs.lyrcs.ai/errors HTTP status codes, error strings, and rate limit headers All error responses follow a consistent JSON shape: ```json theme={null} { "error": "validation_error", "message": "language field is required", "code": "VAL_001" } ``` ## Error reference | HTTP | `error` | `code` | Trigger | | - | - | - | - | | 400 | `validation_error` | `VAL_001` | Missing required field, unsupported language, invalid `audio_url`, batch with 0 or >20 jobs, malformed JSON body | | 401 | `unauthorized` | `AUTH_001` | Missing or malformed `Authorization` header, invalid API key, inactive key, expired key | | 402 | `insufficient_credits` | `PAY_001` | Organisation credit balance is 0 or below — contact your administrator | | 402 | `insufficient_credits` | `PAY_002` | Your plan does not include alignment. Submit with `align=false` for transcript-only output, or ask your administrator to upgrade | | 404 | `not_found` | `NOT_001` | Job or batch not found; job belongs to a different organisation; unknown LRC/SRT type in download URL | | 413 | `payload_too_large` | `VAL_002` | The uploaded audio exceeds the request body limit. Use `audio_url` instead — see below | | 409 | `idempotency_in_progress` | `IDEM_001` | A request with this `Idempotency-Key` is still being processed. Retryable after a short wait | | 409 | `idempotency_key_reused` | `IDEM_002` | This `Idempotency-Key` was already used for a *different* request. Use a new key | | 409 | `not_transcribed` | `ALN_001` | `POST /jobs/{id}/align` before transcription finished | | 409 | `awaiting_review` | `ALN_002` | `POST /jobs/{id}/align` on a job held at the transcript review gate. Approve it instead | | 409 | `realign_failed` | `ALN_003` | Re-alignment unavailable or produced no usable result. Existing timings are unchanged | | 409 | `alignment_in_progress` | `ALN_004` | Alignment is already running for this job | | 422 | `no_audio` | `ALN_005` | The job has no stored audio to align against | | 409 | `not_held_for_review` | `APR_001` | `POST /jobs/{id}/approve` on a job that is not waiting for review | | 400 | `invalid_request` | `APR_002` | `lines` / `transliterated_lines` was not an array of strings, or was empty | | 409 | `api_approval_disabled` | `APR_003` | The job was submitted with `review_delivery: "link"`; approve it from the review page | | 409 | `scripts_out_of_sync` | `APR_005` | `lines` and `transliterated_lines` would have different lengths. The scripts are position-parallel — send both | | 502 | `release_failed` | `APR_004` | Edits saved but the job could not be released. **Retry** — the approval was rolled back | | 409 | `no_webhook_url` | `HOOK_001` | Replay requested for a job submitted without a `webhook_url` | | 409 | `not_complete` | `HOOK_002` | `job.complete` replay requested before the job finished | | 409 | `no_review_pending` | `HOOK_003` | `job.awaiting_review` replay requested for a job with no review link | | 409 | `review_expired` | `HOOK_004` | The review link has expired; contact support for a new one | | 404 | `not_found` | `HOOK_005` | Dead-letter replay requested for an id that does not exist or belongs to another organisation | | 409 | `already_resolved` | `HOOK_006` | Dead-letter replay requested for an entry already cleared | | 409 | `line_count_locked` | `REV_001` | Lines cannot be added or removed on this job, because its timings cannot be re-derived | | 429 | `rate_limit_exceeded` | `RATE_001` | Any rate limit window exhausted | | 410 | `endpoint_withdrawn` | `GONE_001` | The endpoint has been withdrawn. The message names what to use instead | | 500 | `storage_error` | `SRV_001` | We could not store your audio. Retryable | > [!WARNING] > > **`VAL_002` is the most common first-integration failure.** A direct file > upload is capped at roughly 4.5 MB by the serverless request body limit, which > most real audio exceeds. Submit `audio_url` instead — there is no size limit on > that path, because we fetch the file server-side. > [!NOTE] > > **`PAY_001` and `PAY_002` are different problems.** `PAY_001` means you are out > of credits. `PAY_002` means your plan does not cover the feature you asked for, > and buying credits will not fix it. ### Retired codes | Code | Status | | - | - | | `AUTH_002` | No longer returned. Its only source was `POST /v1/align`, which has been [withdrawn](/api-reference/align). Existing handling for it is harmless and can be removed. | > [!NOTE] > > 404 is returned for cross-organisation access attempts as well as genuinely > missing resources. This prevents enumeration of other organisations' job IDs. Of these, `RATE_001`, `SRV_001` and `IDEM_001` are worth retrying automatically. Everything else describes something a retry cannot change. > [!NOTE] > > **`IDEM_002` is a bug in your code, not a transient failure.** It means one > `Idempotency-Key` was sent with two different request bodies. Retrying will not > help; generate a fresh key per submission. We refuse rather than replaying the > first result, because replaying would silently drop the second song. ## Rate limit errors — 429 Standard (single job): ```json theme={null} { "error": "rate_limit_exceeded", "message": "Rate limit exceeded: minute limit reached", "code": "RATE_001", "retry_after": 60 } ``` Batch variant — includes `jobs_requested`: ```json theme={null} { "error": "rate_limit_exceeded", "message": "Rate limit exceeded: minute limit would be exceeded by this batch", "code": "RATE_001", "retry_after": 60, "jobs_requested": 15 } ``` The `retry_after` field is the number of seconds to wait before retrying. A `Retry-After` header with the same value is also included. ## Rate limit headers Every authenticated response includes the rate limit state **for the budget that request drew from**. Submissions and reads are metered separately, so the numbers differ depending on which you called. | Header | Value | | - | - | | `X-RateLimit-Meter` | `submit` or `read` — which budget this request used | | `X-RateLimit-Limit-Minute` | Ceiling for that meter this minute | | `X-RateLimit-Limit-Hour` | Ceiling for that meter this hour | | `X-RateLimit-Limit-Day` | Ceiling for that meter today | | `X-RateLimit-Remaining-Minute` | Remaining in the current minute | | `X-RateLimit-Remaining-Hour` | Remaining in the current hour | | `X-RateLimit-Remaining-Day` | Remaining today | `X-RateLimit-Meter` tells you which set of numbers you are looking at. A `GET /jobs/{id}` reports your read headroom; only a submission reports the budget that governs how many songs you can send. See [Default rate limits](/api-access#default-rate-limits) for the ceilings. Check `X-RateLimit-Remaining-Minute` on a submission before sending a large batch to confirm you have enough headroom. Rejected requests do not consume quota. ## Validation errors — 400 Common triggers for `VAL_001`: * `language` field missing or not matching any entry in `GET /api/v1/languages` (case-sensitive) * Neither `file` nor `audio_url` provided to `POST /transcribe` * `audio_url` is not a valid HTTPS URL * Batch body is not an array or `{ jobs: [...] }` object * Batch `jobs` array has 0 or more than 20 entries * Individual batch job missing `audio_url` or `language` * Invalid audio MIME type or file extension on file upload ## 402 — Insufficient Credits ```json theme={null} { "error": "insufficient_credits", "message": "No credits remaining — contact your administrator", "code": "PAY_001" } ``` Contact your account administrator or email [support@lyrcs.ai](mailto:support@lyrcs.ai) to add credits. To see your balance before you run out, call [`GET /usage`](/api-reference/usage) and read `credits.balance`. ## Download endpoints — 202, 409 and 404 The download endpoints (`/download/lrc/*`, `/download/srt/*`, `/download/words/*`) distinguish three cases, and the difference is what tells a client whether to retry: | Code | Meaning | What to do | | - | - | - | | `202` | The job is still running | Retry later | | `409` | The file will never exist — the job failed, or the output was never requested | **Stop polling** | | `404` | The job doesn't exist, or belongs to another account | Stop | ```json theme={null} { "status": "processing", "stage": "aligning" } ``` `409` responses carry a `code`: `JOB_001` for a failed job (with `stage` and `message` describing what went wrong), `JOB_002` for output that was never requested, such as calling an LRC download on an `align=false` job, and `JOB_003` for a translation file whose translation doesn't line up with the lyrics. Prefer polling `GET /jobs/{id}` and fetching downloads once it reports `status: "complete"`. ## Job failure codes | Code | HTTP | Meaning | | - | - | - | | `JOB_001` | 409 | The job failed. `stage` is `transcription` or `alignment`. | | `JOB_002` | 409 | The requested output was never generated because it wasn't requested at submission. | | `JOB_003` | 409 | The translation doesn't have exactly one line per lyric line, so no translation file can be timed. The response carries `translation_lines` and `lyric_lines`. | `JOB_001` and `JOB_002` aren't retryable on the same job. `JOB_001` at the `transcription` stage may be worth resubmitting; `JOB_002` means resubmitting with different flags. `JOB_003` clears once the translation is fixed in review (replaced or regenerated line by line); download again after that. # Authentication Source: https://docs.lyrcs.ai/getting-started/authentication All API requests require a Bearer token in the Authorization header Every request to the lyrcs.ai API (except `GET /health` and `GET /languages`) must include an `Authorization` header with your API key. ```http theme={null} Authorization: Bearer lyrcs_live_... ``` ## Key format Keys are prefixed with `lyrcs_live_` and are scoped to your organisation. All jobs, usage stats, and webhooks are isolated to the org that owns the key. ## How to get a key lyrcs.ai API access is available to music distributors, streaming platforms, and rights management companies. To request a key, email **[support@lyrcs.ai](mailto:support@lyrcs.ai)** with: * Your company name * Your use case (e.g. "deliver LRC files to DSPs for Indian language catalog") * Expected monthly volume (number of tracks) * Languages you primarily work with We'll respond within 2 business days with your key and webhook secret. > [!NOTE] > > Keys are per-organisation and include a separate `webhook_secret` used to verify HMAC-SHA256 signatures on webhook deliveries. Keep both values secure. ## Example usage ```bash curl theme={null} curl https://lyrcs.ai/api/v1/usage \ -H "Authorization: Bearer lyrcs_live_..." ``` ```javascript Node.js theme={null} const response = await fetch("https://lyrcs.ai/api/v1/usage", { headers: { Authorization: "Bearer lyrcs_live_...", }, }); ``` ```python Python theme={null} import requests response = requests.get( "https://lyrcs.ai/api/v1/usage", headers={"Authorization": "Bearer lyrcs_live_..."}, ) ``` ## Security > [!WARNING] > > Never expose your API key in client-side code, public repositories, or logs. If a key is compromised, contact [support@lyrcs.ai](mailto:support@lyrcs.ai) immediately. * Store keys in environment variables, not in source code * Rotate keys if you suspect exposure * Do not share keys across organisations # Introduction Source: https://docs.lyrcs.ai/getting-started/introduction AI-powered lyrics transcription and alignment for music — specialising in Indian languages lyrcs.ai is a REST API that takes an audio file and returns machine-readable lyrics: the original script, a phonetic transliteration, an English translation, and time-synced LRC and SRT files ready for delivery to streaming platforms, karaoke systems, or rights management databases. > [card] 48 languages > > 30 Indian languages including all 22 scheduled languages, plus 18 global languages. Indian language audio has additional prompt layers and correction dictionaries for higher accuracy. > [card] Three output modes > > Transcript-only for metadata workflows (\~60s), full pipeline with LRC/SRT (\~90s), or full pipeline with an artist review gate before delivery. > [card] Webhook delivery > > Five event types — `job.complete`, `job.awaiting_review`, `job.degraded`, `job.failed`, `batch.complete` — with HMAC-SHA256 signature verification and automatic retry. > [card] Batch processing > > Submit up to 20 jobs in a single request. A single `batch.complete` webhook fires when all jobs are done. ## Who it's for lyrcs.ai is built for organisations that handle music at scale: * **Music distributors** — deliver time-synced lyrics to DSPs alongside audio * **Music labels** — process catalog at scale across multiple artists and languages, with optional artist approval workflows * **Regional streaming platforms** — power lyric display and karaoke features without building transcription infrastructure * **Rights management companies** — generate structured lyric metadata for sync licensing and catalog databases * **Lyrics and metadata providers** — supply accurate, time-synced lyrics data for Indian language catalogs at scale * **Karaoke providers** — produce LRC files from raw audio ## API modes Every transcription job runs in one of four modes. Choose based on what you need delivered and how fast. | Mode | Parameters | Output | Time | | - | - | - | - | | Transcript only | `align=false` | Transcript + transliteration + translation | \~60s | | Full pipeline | `align=true` (default) | All of above + LRC + SRT | \~90s | | Review after alignment | `review=true` | All of above, `job.complete` sent after approval | \~90s + review | | Review before alignment | `review=true` + `review_stage=transcript` | All of above, aligned from approved text | \~60s + review + \~30s | | Review in your own product | `review=true` + `review_delivery="api"` | All of above, approved by your server via `POST /jobs/{id}/approve` | \~60s + review + \~30s | The last two differ only in **where the human is**. In the first, the artist opens a lyrcs.ai review link you forward. In the second they never leave your product, and your server approves on their behalf. Everything downstream is identical — see [Running Review In Your Own Product](/guides/partner-review). See the [API Modes guide](/guides/three-api-modes) for a full breakdown. ## Next steps > [card] [Quickstart](/getting-started/quickstart) > > Submit your first job and download an LRC file in under 5 minutes. > [card] [Authentication](/getting-started/authentication) > > Learn how API keys work and how to request access. # Quickstart Source: https://docs.lyrcs.ai/getting-started/quickstart Submit your first transcription job and download an LRC file in under 5 minutes ## Prerequisites You'll need an API key. See [Authentication](/getting-started/authentication) for how to request one. Set your key as an environment variable: ```bash theme={null} export LYRCS_API_KEY="lyrcs_live_..." ``` *** ## Step 1: Submit a transcription job Send an audio URL and the source language. The API returns a `job_id` immediately — processing happens asynchronously. ```bash curl theme={null} curl -X POST https://lyrcs.ai/api/v1/transcribe \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "audio_url": "https://example.com/song.mp3", "language": "Tamil" }' ``` ```javascript Node.js theme={null} const response = await fetch("https://lyrcs.ai/api/v1/transcribe", { method: "POST", headers: { Authorization: `Bearer ${process.env.LYRCS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ audio_url: "https://example.com/song.mp3", language: "Tamil", }), }); const { job_id } = await response.json(); console.log("Job queued:", job_id); ``` ```python Python theme={null} import os, requests response = requests.post( "https://lyrcs.ai/api/v1/transcribe", headers={"Authorization": f"Bearer {os.environ['LYRCS_API_KEY']}"}, json={ "audio_url": "https://example.com/song.mp3", "language": "Tamil", }, ) job_id = response.json()["job_id"] print("Job queued:", job_id) ``` **Response:** ```json theme={null} { "job_id": "a1b2c3d4-...", "status": "queued", "language": "Tamil", "created_at": "2024-01-01T00:00:00.000Z", "review_required": false, "align_requested": true, "word_align_requested": true } ``` > [!TIP] > > Use `GET /api/v1/languages` to see the exact accepted language name strings. Values are case-sensitive — `"Tamil"` works, `"tamil"` does not. *** ## Step 2: Poll for completion Poll `GET /api/v1/jobs/{job_id}` until `status` is `"complete"` or `"failed"`. Jobs typically complete within 60–90 seconds. > [!WARNING] > > **This loop is for jobs without a review gate.** A job submitted with > `review: true` waits for a human, which can take days — the timeout below would > expire long before it finishes, and the job is not stuck. > > For those, poll `review_approved_at` rather than a deadline, and read > [Review Flow](/guides/review-flow) — or > [Running Review In Your Own Product](/guides/partner-review) if the artist > should approve inside your own app rather than on a lyrcs.ai link. ```bash curl theme={null} curl https://lyrcs.ai/api/v1/jobs/a1b2c3d4-... \ -H "Authorization: Bearer $LYRCS_API_KEY" ``` ```javascript Node.js theme={null} async function waitForJob(jobId, apiKey, { intervalMs = 10000, timeoutMs = 180000 } = {}) { const deadline = Date.now() + timeoutMs; while (Date.now() < deadline) { const res = await fetch(`https://lyrcs.ai/api/v1/jobs/${jobId}`, { headers: { Authorization: `Bearer ${apiKey}` }, }); const job = await res.json(); if (job.status === "complete") return job; if (job.status === "failed") throw new Error("Job failed: " + jobId); await new Promise((r) => setTimeout(r, intervalMs)); } throw new Error("Job timed out after 3 minutes"); } const job = await waitForJob("a1b2c3d4-...", process.env.LYRCS_API_KEY); console.log("Transcript:", job.results.transcript); ``` ```python Python theme={null} import os, time, requests def wait_for_job(job_id, api_key, interval=10, timeout=180): headers = {"Authorization": f"Bearer {api_key}"} deadline = time.time() + timeout while time.time() < deadline: r = requests.get( f"https://lyrcs.ai/api/v1/jobs/{job_id}", headers=headers, ) job = r.json() if job["status"] == "complete": return job if job["status"] == "failed": raise RuntimeError(f"Job failed: {job_id}") time.sleep(interval) raise TimeoutError("Job timed out after 3 minutes") job = wait_for_job("a1b2c3d4-...", os.environ["LYRCS_API_KEY"]) print("Transcript:", job["results"]["transcript"]) ``` **Response when complete:** ```json theme={null} { "job_id": "a1b2c3d4-...", "status": "complete", "language": "Tamil", "align_requested": true, "word_align_requested": true, "created_at": "2024-01-01T00:00:00.000Z", "completed_at": "2024-01-01T00:01:32.000Z", "duration_seconds": 214, "studio_url": "https://lyrcs.ai/studio/a1b2c3d4-...", "results": { "transcript": "...", "transliteration": "...", "translation": "...", "cultural_notes": null, "downloads": { "lrc_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/original", "lrc_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/transliterated", "srt_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/original", "srt_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/transliterated", "words_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/words/original", "words_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/words/transliterated" } } } ``` *** ## Step 3: Download lyric files Use any of the download URLs from `results.downloads`. Authentication is required. In addition to LRC and SRT, `words_original` and `words_transliterated` contain per-word timestamps as a JSON array — useful for word-by-word karaoke highlight. ```bash curl theme={null} curl https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/original \ -H "Authorization: Bearer $LYRCS_API_KEY" \ -o song.lrc ``` ```javascript Node.js theme={null} const lrcUrl = job.results.downloads.lrc_original; const res = await fetch(lrcUrl, { headers: { Authorization: `Bearer ${process.env.LYRCS_API_KEY}` }, }); const lrcText = await res.text(); // lrcText is a standard LRC file ready for delivery ``` ```python Python theme={null} lrc_url = job["results"]["downloads"]["lrc_original"] r = requests.get( lrc_url, headers={"Authorization": f"Bearer {os.environ['LYRCS_API_KEY']}"}, ) with open("song.lrc", "w") as f: f.write(r.text) ``` The response is a plain-text `.lrc` file with `Content-Disposition: attachment`. *** ## What's next > [card] [API Modes](/guides/three-api-modes) > > When to use align=false, review=true, or the default pipeline. > [card] [Webhooks](/guides/webhooks) > > Receive events instead of polling. Covers all 5 event types and signature verification. > [card] [Batch Processing](/guides/batch-processing) > > Submit up to 20 jobs at once with a single webhook on completion. > [card] [Error Reference](/errors) > > All error codes, HTTP statuses, and rate limit headers. # Batch Processing Source: https://docs.lyrcs.ai/guides/batch-processing Submit up to 20 jobs at once and receive a single webhook on completion Batch processing lets you submit multiple audio files in a single API call. All jobs process concurrently. A single `batch.complete` webhook fires when every job is done — regardless of whether individual jobs succeeded or failed. ## When to use batch vs individual jobs | Use case | Recommendation | | - | - | | Releasing a multi-track album | Batch — one request, one webhook | | Processing a catalog of 100+ songs | Batch in groups of 20 | | Single track with a webhook | Individual job | | Real-time single track (need result ASAP) | Individual job | | Metadata-only for a set of tracks | Batch with `align=false` per job | ## Submitting a batch Batches are JSON-only — every job must use `audio_url`. File uploads are not supported. ```json theme={null} POST /api/v1/batch { "webhook_url": "https://api.example.com/webhooks/lyrcs", "jobs": [ { "audio_url": "https://cdn.example.com/track-1.mp3", "language": "Hindi" }, { "audio_url": "https://cdn.example.com/track-2.mp3", "language": "Tamil" }, { "audio_url": "https://cdn.example.com/track-3.mp3", "language": "Telugu", "align": false } ] } ``` * Minimum 1 job, maximum **20 jobs** per request * Per-job fields: `audio_url` (required), `language` (required), `align` (optional, default `true`), `review` (optional, default `false`) ## Rate limit pre-flight The rate limit check is performed **before** any jobs are created. If submitting N jobs would push any window over the limit, the entire batch is rejected with `429` and no jobs are queued. ```json theme={null} { "error": "rate_limit_exceeded", "message": "Rate limit exceeded: minute limit would be exceeded by this batch", "code": "RATE_001", "retry_after": 60, "jobs_requested": 15 } ``` Check the `X-RateLimit-Remaining-*` headers on any previous response to know how much headroom you have before submitting a large batch. ## Polling GET /batch/\[id] The batch status progresses through: ``` queued → in_progress → complete (or partial) ``` Poll every 15–30 seconds. For a 20-job batch, expect 2–3 minutes total. The batch finalizes as soon as the last job finishes — it does not wait the full polling budget. ```javascript theme={null} async function waitForBatch(batchId, apiKey, { intervalMs = 15000, timeoutMs = 600000 } = {}) { const deadline = Date.now() + timeoutMs; while (Date.now() < deadline) { const res = await fetch(`https://lyrcs.ai/api/v1/batch/${batchId}`, { headers: { Authorization: `Bearer ${apiKey}` }, }); const batch = await res.json(); if (batch.status === "complete" || batch.status === "partial") return batch; await new Promise((r) => setTimeout(r, intervalMs)); } throw new Error("Batch timed out"); } ``` ## Handling partial failures A `batch.complete` webhook with `status: "partial"` means at least one job failed. The `failed` field tells you how many. Individual job entries in `jobs[]` have their own `status` field. ```javascript theme={null} // From a batch.complete webhook payload const failed = payload.jobs.filter((j) => j.status === "failed"); for (const job of failed) { console.error(`Job ${job.job_id} (${job.language}) failed — resubmit individually`); // Resubmit as an individual job via POST /transcribe } const completed = payload.jobs.filter((j) => j.status === "complete"); for (const job of completed) { const lrcUrl = job.downloads?.lrc_original; if (lrcUrl) { // Download and deliver } } ``` > [!TIP] > > Failed jobs should be resubmitted individually via `POST /transcribe`. The batch endpoint requires at least 1 job and you may only have 1 to retry. ## Metadata-only batch (align=false) For catalog workflows where you need lyrics text but not LRC files, set `align=false` per job. Processing is faster (\~60s per job) and the batch completes sooner. ```json theme={null} { "webhook_url": "https://api.example.com/webhooks/lyrcs", "jobs": [ { "audio_url": "https://cdn.example.com/track-1.mp3", "language": "Hindi", "align": false }, { "audio_url": "https://cdn.example.com/track-2.mp3", "language": "Marathi", "align": false } ] } ``` Jobs submitted with `align=false` will not include `downloads` in the `batch.complete` payload or in `GET /batch/{id}` responses. ## Processing large catalogs The rate limit is 1,000 jobs per day. For a catalog larger than 1,000 tracks, spread submissions across multiple days or contact [support@lyrcs.ai](mailto:support@lyrcs.ai) to discuss higher limits. For 1,000 tracks: * 50 batches of 20 jobs each * All within the daily limit * Each batch submitted when the previous `batch.complete` fires (or use a queue) # Languages Source: https://docs.lyrcs.ai/guides/languages Full language reference and quality notes lyrcs.ai supports 48 languages across two tiers. Indian languages have additional quality layers not present for global languages. ## Indian languages — enhanced accuracy All 30 Indian languages benefit from: * **Language-specific prompt layers** — additional context and instructions tuned for each language's linguistic characteristics, script conventions, and common lyric patterns * **Correction dictionaries** — post-processing filters for common transcription errors specific to each language * **Transliteration standards** — romanisation follows consistent, widely-understood conventions (e.g. ITRANS-style for Hindi/Sanskrit, ISO 15919 influenced for Dravidian languages) Indian languages include all 22 of India's officially scheduled languages plus additional widely-spoken regional languages. ## Global languages The 18 global languages use the base transcription pipeline without language-specific correction layers. Quality is high for well-resourced languages (English, Spanish, French, Mandarin Chinese) and good for others. ## Full language table ### Indian Languages — 30 | Language | Family | Script | | - | - | - | | Hindi | Indo-Aryan | Devanagari | | Bengali | Indo-Aryan | Bengali | | Marathi | Indo-Aryan | Devanagari | | Telugu | Dravidian | Telugu | | Tamil | Dravidian | Tamil | | Gujarati | Indo-Aryan | Gujarati | | Urdu | Indo-Aryan | Nastaliq (Perso-Arabic) | | Kannada | Dravidian | Kannada | | Odia | Indo-Aryan | Odia | | Malayalam | Dravidian | Malayalam | | Punjabi | Indo-Aryan | Gurmukhi | | Assamese | Indo-Aryan | Assamese (Bengali variant) | | Maithili | Indo-Aryan | Devanagari / Tirhuta | | Santali | Austroasiatic | Ol Chiki | | Kashmiri | Indo-Aryan | Perso-Arabic / Devanagari | | Nepali | Indo-Aryan | Devanagari | | Sindhi | Indo-Aryan | Perso-Arabic / Devanagari | | Konkani | Indo-Aryan | Devanagari / Latin | | Dogri | Indo-Aryan | Devanagari | | Manipuri | Sino-Tibetan | Meitei Mayek / Bengali | | Bodo | Sino-Tibetan | Devanagari | | Sanskrit | Indo-Aryan | Devanagari | | Haryanvi | Indo-Aryan | Devanagari | | Bhojpuri | Indo-Aryan | Devanagari | | Magahi | Indo-Aryan | Devanagari | | Chhattisgarhi | Indo-Aryan | Devanagari | | Rajasthani | Indo-Aryan | Devanagari | | Tulu | Dravidian | Kannada / Tigalari | | Gondi | Dravidian | Devanagari / Gondi | | Saurashtra | Indo-Aryan | Saurashtra / Latin | ### Global Languages — 18 | Language | Family | | - | - | | English | Germanic | | Spanish | Romance | | Mandarin Chinese | Sino-Tibetan | | French | Romance | | Arabic | Semitic | | Portuguese | Romance | | Russian | Slavic | | Japanese | Japonic | | German | Germanic | | Korean | Koreanic | | Italian | Romance | | Turkish | Turkic | | Dutch | Germanic | | Indonesian | Austronesian | | Thai | Tai-Kadai | | Yoruba | Niger-Congo | | Swahili | Niger-Congo | | Zulu | Niger-Congo | > [!NOTE] > > The `script` field is **not** returned by `GET /api/v1/languages` — only `name` and `family`. The script column above is for reference only. The transcript output uses whatever script the audio contains, as recognised by the model. ## Using language values Always use the exact `name` strings from `GET /api/v1/languages`. Values are case-sensitive. ```bash theme={null} # Correct "language": "Mandarin Chinese" # Wrong — will return 400 "language": "mandarin chinese" "language": "Chinese" "language": "zh" ``` ## Known limitations * **WAV/FLAC duration reporting:** Audio submitted as WAV or FLAC may show `duration_seconds: 0` in job responses. This is a metadata extraction issue and does not affect transcript or alignment quality. * **Script variation:** For languages with multiple scripts (e.g. Kashmiri in Perso-Arabic vs Devanagari), the output script is determined by what the model detects in the audio and context. If you need a specific script, contact [support@lyrcs.ai](mailto:support@lyrcs.ai). # LRC & SRT Formats Source: https://docs.lyrcs.ai/guides/lrc-srt-formats Understanding the time-synced lyric file formats returned by the API When `align=true` (the default), lyrcs.ai generates four downloadable files per job: two LRC files and two SRT files. Each format comes in an **original** variant (source language script) and a **transliterated** variant (romanised phonetic form). ## LRC format LRC (Lyric) is a plain-text format where each line is prefixed with a timestamp in `[MM:SS.ss]` format. ``` [00:12.34]நான் உன்னை நேசிக்கிறேன் [00:16.80]தெரியாமல் போனேன் [00:21.15]உன் கண்களில் காணும் [00:25.50]என் மனசு தொலைந்தது ``` LRC files are supported natively by most music players and karaoke apps and are the standard format for lyric display on streaming platforms. ## SRT format SRT (SubRip Subtitle) uses a numbered block format with start → end timecodes. It is the standard for video subtitles and is widely supported by video players and editing tools. ``` 1 00:00:12,340 --> 00:00:16,800 நான் உன்னை நேசிக்கிறேன் 2 00:00:16,800 --> 00:00:21,150 தெரியாமல் போனேன் 3 00:00:21,150 --> 00:00:25,500 உன் கண்களில் காணும் ``` ## Original vs transliterated | Variant | Content | Use case | | - | - | - | | `_original` | Source language script (e.g. Tamil script, Devanagari) | Audiences who read the source script; DSP lyric display in source language | | `_transliterated` | Phonetic romanisation | Audiences who can't read the script; karaoke sing-along; lyric apps for non-native listeners | The transliterated variant uses the same timestamps as the original — the timing is identical, only the text differs. ## Download URLs Both variants are available via the `downloads` object on a completed job: ```json theme={null} "downloads": { "lrc_original": "https://lyrcs.ai/api/v1/jobs/{id}/download/lrc/original", "lrc_transliterated": "https://lyrcs.ai/api/v1/jobs/{id}/download/lrc/transliterated", "srt_original": "https://lyrcs.ai/api/v1/jobs/{id}/download/srt/original", "srt_transliterated": "https://lyrcs.ai/api/v1/jobs/{id}/download/srt/transliterated" } ``` All four URLs require `Authorization: Bearer `. ## When to use which format | Scenario | Recommended format | | - | - | | Spotify / Apple Music lyric delivery | `lrc_original` | | Karaoke app (source script display) | `lrc_original` | | Karaoke app (romanised sing-along) | `lrc_transliterated` | | Music video subtitles | `srt_original` | | Subtitle track for non-native audience | `srt_transliterated` | | Lyrics editor / DAW import | Either SRT | ## Not available for align=false jobs If a job was submitted with `align=false`, no LRC or SRT files are generated. The `downloads` key is omitted from the job response. Use `align=true` (the default) if you need time-synced files. ## Word-level JSON format When `word_align=true` (the default), lyrcs.ai also generates per-word timestamps alongside the line-level LRC and SRT files. These are returned as a JSON array — one entry per word — from `GET /api/v1/jobs/{id}/download/words/original` and `.../download/words/transliterated`. Each entry contains the word text and its start timestamp in `[MM:SS.XX]` format: ```json theme={null} [ { "word": "मैं", "timestamp": "[00:08.12]" }, { "word": "तेरे", "timestamp": "[00:08.54]" }, { "word": "बिना", "timestamp": "[00:08.91]" }, { "word": "जी", "timestamp": "[00:09.40]" }, { "word": "नहीं", "timestamp": "[00:09.72]" }, { "word": "सकता", "timestamp": "[00:10.15]" } ] ``` The `words_transliterated` variant uses the same timestamps mapped to the Roman script words: ```json theme={null} [ { "word": "main", "timestamp": "[00:08.12]" }, { "word": "tere", "timestamp": "[00:08.54]" }, { "word": "bina", "timestamp": "[00:08.91]" }, { "word": "ji", "timestamp": "[00:09.40]" }, { "word": "nahin", "timestamp": "[00:09.72]" }, { "word": "sakta", "timestamp": "[00:10.15]" } ] ``` **Use cases for word-level timestamps:** * Karaoke with word-by-word highlight (bouncing ball) * Accessibility features requiring word-precise sync * Custom lyric renderers that need sub-line granularity **Already have lyrics?** There is currently no way to time lyrics you already hold against audio we have not transcribed — the endpoint that offered this has been [withdrawn](/api-reference/align). Alignment runs as part of `POST /transcribe`. ## Known limitations Audio files in WAV or FLAC format may report `duration_seconds: 0` in the job response. This is a known issue related to ffmpeg metadata extraction and does not affect the quality of the transcript or alignment output. MP3 and M4A files report accurate durations. # Running Review In Your Own Product Source: https://docs.lyrcs.ai/guides/partner-review Build the lyric review step inside your product, instead of sending the artist to lyrcs.ai A job submitted with `review: true` stops and waits for a human to say the lyrics are right. There are two ways to reach that human, and they are two doors into the same held job — not two modes. | | Door A — review on lyrcs.ai | Door B — review in your product | | - | - | - | | Who builds the screen | We do | You do | | How the artist gets there | You forward `review_url` | They are already signed in to your app | | How approval happens | They click approve on our page | Your server calls `POST /v1/jobs/{id}/approve` | | Artist needs a lyrcs.ai link | Yes | No | Nothing downstream knows or cares which door was used. Alignment, the outputs and the `job.complete` webhook are identical either way, the first approval wins whichever door it came through, and you choose per job. Door A needs no work beyond forwarding a URL and is covered in [Review Flow](/guides/review-flow). This guide is Door B. ## When Door B is worth building Choose it when the artist is already inside your product and a hand-off to a second website would be the odd step in an otherwise finished flow — or when your compliance requires that every approval originate from your own system. Choose Door A when you would rather not build and maintain a lyrics editor. Our page has an audio player, per-line playback, line editing and the quality signals already rendered. Matching it is a real piece of front-end work, and a worse reviewer catches fewer errors — which is the thing the review step exists for. ## The shape of it ``` submit (review: true) POST /v1/transcribe │ ▼ transcription runs (~60s) │ ▼ job held at the gate GET /v1/jobs/{id} → review.lines[] │ ← your reviewer screen ▼ artist accepts POST /v1/jobs/{id}/approve │ ▼ alignment runs (~30s) │ ▼ LRC · SRT · word timings GET /v1/jobs/{id} → results.downloads ``` Three calls. Everything else is your UI. ## 1 · Submit ```json theme={null} POST /api/v1/transcribe { "audio_url": "https://cdn.example.com/song.mp3", "language": "Punjabi", "review": true, "review_stage": "transcript", "review_delivery": "api", "external_id": "TRACK_12345", "end_user": { "external_id": "cust_8842", "email": "artist@example.com" } } ``` `review_stage: "transcript"` holds the job **before** any timing work, so corrections reach the aligner. That is almost always what you want here — see [choosing a stage](/guides/review-flow#choosing-a-stage). `review_delivery: "api"` is optional and shuts Door A for this job. Leave it out if you want the option of falling back to forwarding `review_url`. ## 2 · Read the held job ``` GET /api/v1/jobs/{id} ``` While a job is held, the response carries everything your screen needs. This is the whole shape, once: ```json theme={null} { "job_id": "a1b2c3d4-…", "external_id": "TRACK_12345", "status": "processing", "stage": "awaiting_review", "language": "Punjabi", "end_user": { "id": "2fc0df07-…", "external_id": "cust_8842", "email": "artist@example.com", "name": null }, "review_required": true, "review_approved_at": null, "review_delivery": "api", "review_url": null, "review": { "stage": "transcript", "delivery": "api", "lines": [ { "index": 0, "text": "…", "transliteration": "…", "timestamp": null, "flagged": false }, { "index": 1, "text": "…", "transliteration": "…", "timestamp": null, "flagged": false } ] }, "second_opinion": { "total_lines": 24, "agreed_lines": 21, "match_ratio": 0.875, "hidden_count": 0, "suggestions": [ { "kind": "line", "current": "…", "heard": "…", "occurrences": [ { "line_index": 7, "at_seconds": 41.2 } ] }, { "kind": "section", "current": null, "heard": "…", "occurrences": [ { "line_index": 18, "at_seconds": 96.4 } ] } ] }, "alignment": null, "audio_url": "https://cdn.example.com/song.mp3" } ``` The `review` block is present **only while the job is held** and disappears on approval — from then on `results` is the authoritative copy. > [!NOTE] > > `review.lines` is an array rather than the newline-joined `results.transcript` > string on purpose. Line identity is what makes per-line playback and every > per-line signal below usable. `results.transcript` is unchanged and still there. ## 3 · Approve ```json theme={null} POST /api/v1/jobs/{id}/approve { "lines": ["first line", "second line corrected", "third line"], "transliterated_lines": ["…", "…", "…"] } ``` Both fields are optional; omit them to approve unchanged. Send **text only** — no timestamps. You have not run the aligner, so you have no measured timings to send, and anything an edit invalidates is re-derived from the audio. At the transcript gate this releases alignment and `job.complete` arrives later. At the aligned gate it finalises the job, re-timing the corrected text. > [!NOTE] > > Approval is **idempotent**. The first one wins; a retry, or an approval through > the other door, returns `already_approved: true` and changes nothing. Retrying > after a timeout is safe. ## A complete integration Poll, render, approve. This is the whole server side. ```typescript TypeScript theme={null} const API = "https://lyrcs.ai/api/v1"; const headers = { Authorization: `Bearer ${process.env.LYRCS_API_KEY}`, "Content-Type": "application/json", }; async function submit(audioUrl: string, language: string, customerId: string) { const res = await fetch(`${API}/transcribe`, { method: "POST", headers, body: JSON.stringify({ audio_url: audioUrl, language, review: true, review_stage: "transcript", review_delivery: "api", end_user: { external_id: customerId }, }), }); if (!res.ok) throw new Error(`submit failed: ${res.status}`); return (await res.json()).job_id as string; } // Find everything waiting on a human, in one call, without polling job by job. async function jobsAwaitingReview(since: string) { const res = await fetch( `${API}/jobs?updated_since=${encodeURIComponent(since)}&limit=100`, { headers } ); const { jobs } = await res.json(); return jobs.filter( (j: any) => j.review_required && j.review_approved_at === null ); } async function getHeldJob(jobId: string) { const res = await fetch(`${API}/jobs/${jobId}`, { headers }); const job = await res.json(); if (!job.review) return null; // not held — already approved, or not there yet return job; } async function approve( jobId: string, lines?: string[], transliteratedLines?: string[] ) { const res = await fetch(`${API}/jobs/${jobId}/approve`, { method: "POST", headers, body: JSON.stringify({ ...(lines ? { lines } : {}), ...(transliteratedLines ? { transliterated_lines: transliteratedLines } : {}), }), }); const body = await res.json(); // 502 APR_004 means the edits saved but the release failed. The approval was // rolled back, so retrying is a clean repeat rather than a no-op. if (res.status === 502 && body.code === "APR_004") { return approve(jobId, lines, transliteratedLines); } if (!res.ok) throw new Error(`${body.code}: ${body.message}`); return body; } ``` ```python Python theme={null} import os, requests API = "https://lyrcs.ai/api/v1" HEADERS = { "Authorization": f"Bearer {os.environ['LYRCS_API_KEY']}", "Content-Type": "application/json", } def submit(audio_url, language, customer_id): r = requests.post(f"{API}/transcribe", headers=HEADERS, json={ "audio_url": audio_url, "language": language, "review": True, "review_stage": "transcript", "review_delivery": "api", "end_user": {"external_id": customer_id}, }) r.raise_for_status() return r.json()["job_id"] def jobs_awaiting_review(since): r = requests.get(f"{API}/jobs", headers=HEADERS, params={"updated_since": since, "limit": 100}) r.raise_for_status() return [j for j in r.json()["jobs"] if j["review_required"] and j["review_approved_at"] is None] def get_held_job(job_id): job = requests.get(f"{API}/jobs/{job_id}", headers=HEADERS).json() return job if job.get("review") else None def approve(job_id, lines=None, transliterated_lines=None): payload = {} if lines is not None: payload["lines"] = lines if transliterated_lines is not None: payload["transliterated_lines"] = transliterated_lines r = requests.post(f"{API}/jobs/{job_id}/approve", headers=HEADERS, json=payload) body = r.json() # 502 APR_004: edits saved, release failed, approval rolled back. Retry. if r.status_code == 502 and body.get("code") == "APR_004": return approve(job_id, lines, transliterated_lines) r.raise_for_status() return body ``` ## Building a reviewer worth having If you build the screen, the quality of the review becomes the quality of your UI. A textarea containing the joined lyrics technically works and catches almost nothing. These are the things that make the difference, in the order they are worth building. ### 1. Per-line rows, not a text box One editable row per `review.lines[]` entry, keyed by `index`. Everything else here attaches to a line, and none of it can be shown against a blob of text. Show `transliteration` beside `text` where it exists. A reviewer who cannot read the source script can still catch errors in the romanisation. ### 2. Audio, seekable per line Play `audio_url` — the same URL you submitted. Give each row a play button that seeks to that line's moment: * At the **aligned** gate, `lines[].timestamp` is `[mm:ss.xx]`. * At the **transcript** gate there are no timings yet, but `second_opinion.suggestions[].occurrences[].at_seconds` gives you a seek target for exactly the lines that are in dispute — which are the ones worth hearing. A reviewer who can hear the line corrects it. One who cannot, guesses. ### 3. The quality signals, rendered All of these are already in the response and all of them are easy to ignore. | Signal | What a good reviewer does with it | | - | - | | `review.lines[].flagged` | Highlight the row. Its audio does not match its words. | | `alignment.line_flags[]` | The same lines with a `ratio` — how much worse than their peers. Aligned gate only. | | `second_opinion.suggestions[]`, `kind: "line"` | Show `heard` as a one-click alternative to `current` on that row. | | `second_opinion.suggestions[]`, `kind: "section"` | Prompt to **add** a line near `occurrences[].line_index`. | | `occurrences[].at_seconds` | Seek the player straight to the disputed moment. | | `second_opinion.hidden_count` | Say "and N more" — the list is not the whole set. | | `second_opinion.match_ratio` | A one-glance "how much of this is in dispute" for the top of the screen. | > [!WARNING] > > `kind: "section"` means **lyrics may be missing altogether** — an independent > listener heard a passage where the transcript has nothing, so `current` is > `null` and there is no line to correct. Handled as a line replacement it does > nothing at all; handled as "add a line here" it catches a whole missed verse. > > It is the single highest-value case to get right in a custom reviewer, and the > one most likely to be dropped by code that assumes every suggestion replaces > something. ### 4. Add and delete lines, not just retyping Transcription gets line *boundaries* wrong as well as words: a line missed entirely, two sung lines merged into one, one split across two. If your reviewer can only retype existing rows, none of those can be fixed. Send the array you want. Its length may differ from what you received. ### 5. Reading `null` correctly On `second_opinion` and `alignment`, `null` means **the check did not run** — not that it found nothing. An empty `suggestions` array is the good news: it ran and agreed with every line. Collapsing the two into one falsy value throws that away and lets silence read as a clean transcript. See [Quality Signals](/guides/quality-signals). ## The two scripts move together `transliterated_lines` is **position-parallel** to `lines`: index 3 of one is the romanisation of index 3 of the other. Alignment inherits each transliteration's timing from its original by index. So when you add or remove a line, send **both** arrays. Sending `lines` alone with a different length is refused with `409 APR_005`: ```json theme={null} { "error": "scripts_out_of_sync", "message": "lines has 4 entries but transliterated_lines would have 3. The two scripts are position-parallel — send both arrays when you add or remove a line.", "code": "APR_005" } ``` That refusal exists because the alternative is silent. An uneven pair does not fail alignment — it produces one blank transliterated line, and a *deletion* shifts every remaining pair onto the wrong original for the rest of the song. Editing wording without changing the count is unaffected, and a job with no transliteration at all has nothing to keep in step. ### Line count at the aligned gate At the **transcript** gate, send whatever array you want. Alignment has not run, so there is nothing to invalidate. At the **aligned** gate, a change in line count needs the timings re-derived from the audio. Where that is not available for your organisation the request is refused with `409 REV_001` rather than given a timestamp nobody measured. ## Common mistakes ### Treating `status: "complete"` as approved At the **aligned** gate a held job reports `status: "complete"` and has working download URLs before anyone has signed off — only the `job.complete` webhook waits for approval. `review_approved_at` is the only field that means a human approved. If you need results to be genuinely unavailable before approval, use `review_stage: "transcript"`: alignment has not run, so there is nothing timed to fetch early. ### Rendering `results.transcript` instead of `review.lines` `results` is only filled once a job is `complete`, and a transcript-gate job is `processing` — so on the jobs you most want to review, it is empty. Read `review.lines` while the job is held. ### Ignoring `kind: "section"` suggestions Code written as `replace(current, heard)` silently does nothing for these, because `current` is `null`. They are the ones that catch a missing verse. ### Sending timestamps back There is no timestamp field on the approve request. If your client is carrying timings around to send them back, it is carrying them for nothing — the server takes them from the job and re-derives anything an edit changes. ### Polling each job individually `GET /jobs?updated_since=` finds every job that changed since your last sweep, in one call, with a resumable cursor. Polling job by job is what the read rate limit is there to stop. ### Caching a null `review_url` On a `review_delivery: "both"` job, `review_url` is `null` until the job reaches its gate. Poll until it is non-null rather than caching the null. On an `"api"` job it is null permanently and by design. ### Treating `502 APR_004` as a failure It means the edits saved but the job could not be released — and the approval was rolled back, so the retry is a clean repeat, not a no-op. Retry it. Everything else in the 4xx range is a request to fix, not to retry. ## Choosing which doors a job opens `review_delivery` is optional on submit and requires `review: true`. | Value | Effect | | - | - | | `"both"` | **Default.** A review link is created and the API approve endpoint works. | | `"api"` | No review link is created. `review_url` is `null` and our review page cannot be opened for this job at all. | | `"link"` | A review link is created; API approval is refused with `409 APR_003`. | `"api"` is a structural guarantee, not a convention: the link's security *is* its token, and for these jobs no token is ever minted. There is nothing to leak and nothing to remember not to forward. Leave it unset unless you need a door shut. `"both"` lets you fall back to forwarding `review_url` for a song your own reviewer cannot handle. ## Telling us whose song it is In Door B the artist never touches lyrcs.ai, so a job would otherwise arrive with no trace of who it belongs to. `end_user` fixes that, and it is optional. ```json theme={null} "end_user": { "external_id": "cust_8842", "email": "artist@example.com", "name": "Asha R." } ``` `external_id` is **your** identifier and is the key — send the same one and you get the same record, however many jobs it appears on. Email and name are optional attributes; a later submit fills one that was missing, but never overwrites a value already recorded. We never merge records on email. Addresses change, get shared between an artist and their manager, and one person can arrive under two — merging on email would splice two catalogues together. Every job echoes the record — on `GET /jobs/{id}`, on list rows, and in the `job.complete` webhook — and you can list a customer's whole catalogue: ``` GET /api/v1/jobs?end_user_id=cust_8842 ``` That filter takes your `external_id` or the `id` we return. An identifier we have never seen is an empty page, not an error. > [!NOTE] > > These are not lyrcs.ai accounts and cannot sign in anywhere. The record exists > so that "which of your customers is job `8f3a`?" has an answer on both sides > when something goes wrong — you are the only one who can reach the person > affected. ## Webhooks Optional. Everything below is on the job, so polling [`GET /jobs`](/api-reference/jobs-list) with `updated_since` finds every job waiting on a human in one sweep. If you set `webhook_url`, `job.awaiting_review` tells you a job reached its gate: ```json theme={null} { "event": "job.awaiting_review", "job_id": "a1b2c3d4-…", "language": "Punjabi", "review_stage": "transcript", "review_delivery": "api", "review_url": null, "expires_at": null, "approve_url": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-…/approve", "studio_url": "https://lyrcs.ai/studio/a1b2c3d4-…", "artist_url": "https://lyrcs.ai/artist?token=ps_…" } ``` `review_url` and `expires_at` are `null` exactly when `review_delivery` is `"api"`, so you do not have to remember what you configured to know which route to take. `artist_url` is the one link to hand your artist. When a submission carried an `end_user`, this is a durable, catalogue-wide session for that person — their own page listing every song you have submitted for them, where they review lyrics, download the files, and order a video. Unlike `review_url` (one job, seven days), it covers the whole catalogue and slides its expiry as they use it, so a link mailed weeks ago still works. It is `null` when the job had no `end_user`. Present even on `review_delivery: "api"`, because it is the artist's door, not a review-page door — withholding the review link does not withhold the artist's own page. ## Testing your integration Worth proving before you go live, in roughly this order: **1. A held job renders** Submit with `review: true, review_stage: "transcript"`. Poll until `review` appears, and check your screen shows one row per line with transliterations beside them. **2. Approving unchanged works** `POST /approve` with an empty body `{}`. Expect `200` with `lines_edited: 0`, then the job to finish on its own. **3. An edit reaches the output** Change one line, approve, wait for `job.complete`, and confirm your change is in the LRC download. This is the whole point of the transcript gate. **4. Adding a line is refused when the scripts disagree** Send `lines` with one extra entry and no `transliterated_lines`. Expect `409 APR_005`. Then send both and expect `200`. **5. Retrying is safe** Approve the same job twice. Expect `already_approved: true` on the second, and confirm the second call's `lines` were not applied. **6. A section suggestion renders as 'add a line'** Hardest to arrange deliberately — but check your code path for `current: null` rather than waiting to meet it in production. ## Errors | Status | Code | Meaning | | - | - | - | | 400 | `APR_002` | `lines` or `transliterated_lines` was not an array of strings, or was empty. Omit the field to approve unchanged. | | 404 | `NOT_001` | No such job, or it belongs to another organisation. | | 409 | `APR_001` | The job is not waiting for review. Submit with `review: true`. | | 409 | `APR_003` | The job was submitted with `review_delivery: "link"`. | | 409 | `APR_005` | `lines` and `transliterated_lines` would have different lengths. Send both. | | 409 | `REV_001` | Line count changed at the aligned gate and the timings cannot be re-derived. | | 502 | `APR_004` | The edits were saved but the job could not be released. **Retry** — the approval was rolled back, so the retry is a clean repeat. | ## Limits * A transcript-gate job that is never approved is marked `failed` with stage `review` after **8 days**. * The `job.complete` webhook fired on approval is **single-attempt**. If you miss it, poll the job or use [webhook recovery](/api-reference/webhook-recovery). * Approving is counted against your **read** limit, not your submission limit. The job was charged when you created it; approving it is the second half of that same submission. # Quality Signals Source: https://docs.lyrcs.ai/guides/quality-signals Two independent checks that tell you which lines to look at before you publish Every job can return two blocks of evidence alongside its results: what a second, independent listener made of the transcript, and how the timings were produced. Neither changes the output. They tell you **where to look** if you want to check something before it goes live — which matters most on the API, where no one from your team sees the lyrics unless you route them somewhere yourself. Both appear on `GET /api/v1/jobs/{job_id}` and in the `job.complete` webhook payload. [`GET /api/v1/batch/{batch_id}`](/api-reference/batch) carries a **summary** of each — counts rather than the findings themselves — because a batch is for deciding which songs to look at, not for reading every finding. > [!NOTE] > > The `job.awaiting_review` webhook does **not** carry them — it is a short > notification with the review link and nothing else. The second opinion is > stored well before that webhook fires, so fetch the job to read the findings > before you route a review to an artist. ## null means "not checked", not "nothing found" This is the one thing to get right. | Value | Meaning | | - | - | | `null` | The check did not run | | `{ "suggestions": [] }` | It ran, and agreed with every line | An empty `suggestions` array is the **strongest positive signal** the pipeline produces — an independent listener heard the same words we transcribed. `null` tells you nothing at all about the lyrics. > [!WARNING] > > Do not write `if (!job.second_opinion)` and treat both cases the same. That > reads "we never checked" as "the transcript is clean", which is the opposite of > what it means. Test for `null` explicitly. Both blocks are `null` when the feature is not enabled for your account, and `second_opinion` is additionally `null` for languages the second listener does not cover, and on jobs created before this feature existed. ## second_opinion A second speech engine listens to the song independently and its transcript is compared against ours, line by line. It does not see our lyrics first, so where the two agree, two systems reached the same words separately. ```json theme={null} { "second_opinion": { "total_lines": 59, "agreed_lines": 47, "match_ratio": 0.79, "suggestions": [ { "kind": "line", "current": "तेरे नैना", "heard": "तेरी नैना", "occurrences": [ { "line_index": 12, "at_seconds": 48 }, { "line_index": 30, "at_seconds": 121 } ] }, { "kind": "section", "current": null, "heard": "हा हा हा", "occurrences": [{ "line_index": 25, "at_seconds": 96 }] } ], "hidden_count": 0 } } ``` | Field | Type | Notes | | - | - | - | | `total_lines` | number | Lines in the transcript | | `agreed_lines` | number | Lines no suggestion touches | | `match_ratio` | number | Share of transcript words the listener also heard, `0`–`1` | | `suggestions` | array | Disagreements worth a look. Empty means full agreement. | | `hidden_count` | number | Found but not returned. Non-zero means `suggestions` is not the full set. | ### The two kinds are not equally important > [!NOTE] > > **`section` findings deserve more of your attention than `line` findings.** > A `line` finding is usually a spelling or vowel-length difference. A `section` > finding means the listener heard singing where our transcript has nothing — > which can mean a whole verse or chorus is missing. | `kind` | What it means | `current` | | - | - | - | | `line` | This line was heard differently. Both `current` and `heard` are whole lines, so acting on it is a straight line replacement. | the current line | | `section` | Words were heard where the transcript has none — possibly missing lyrics. | `null` | `occurrences` lists every place the same change applies. `at_seconds` is approximate — accurate enough to seek a player to the right part of the song, not a timestamp for publishing. Use the LRC or word-level downloads for that. ### Expect disagreements on clean transcripts Sung material produces genuine disagreement between any two engines: held vowels, ad-libs, backing vocals, and compound words that one system splits and the other joins. A handful of `line` suggestions on a correct transcript is normal and does not mean the lyrics are wrong. The check is deliberately tuned to over-report rather than under-report, because a missed verse is expensive and a spurious spelling suggestion is not. ## alignment How the timings on this job were produced, and which lines look suspect. ```json theme={null} { "alignment": { "method": "forced", "coverage": 0.998, "line_flags": [ { "line_index": 25, "text": "साथ चलेंगे हम", "ratio": 4.1 } ] } } ``` | `method` | Meaning | | - | - | | `forced` | Timings came from direct audio-to-text alignment. The most accurate method available. | | `forced_rejected` | Forced alignment ran but its result failed our quality gate, so model-generated timings were delivered instead. Worth checking this job. | | `model` | Model-generated timings. Forced alignment was not attempted for this job. | `coverage` is the share of the transcript that received a timing, and is `null` unless forced alignment produced the result. ### line_flags Lines whose audio matches their text far worse than the other lines in the same song. In practice this is a short list — often empty — and each entry is worth thirty seconds of listening. | Field | Notes | | - | - | | `line_index` | Zero-based index into the transcript | | `text` | The line as transcribed | | `ratio` | How many times worse this line scores than similar-length lines in the same song. Higher is more suspect. | > [!NOTE] > > **What this catches:** a line placed where its words are not sung. Forced > alignment must place every line it is given, so a long instrumental break can > pull the following line in early. It also catches transcription errors large > enough to matter against the line's length. > > **What it does not catch:** a wrong word that still sounds close to what was > sung. An empty `line_flags` is not a guarantee of correctness — it means > nothing stood out against the rest of this song. ## A reasonable way to use these **1. Treat section findings as blocking** Any `kind: "section"` finding is worth a human listen before publishing. This is the case where lyrics may simply be absent. **2. Check every flagged line** `line_flags` is short by design. Seek to the line and listen. **3. Watch for forced_rejected** It means this specific job fell back to a less accurate timing method. **4. Let line findings inform, not block** A few `kind: "line"` suggestions are normal on correct transcripts. ## Availability Both are enabled per account and are off by default. Contact us if you would like either turned on — the second listener adds a small per-song cost, forced alignment does not. When neither is enabled, both fields are present and `null` on every response, so you can write your integration against them before they are switched on. # Review Flow Source: https://docs.lyrcs.ai/guides/review-flow End-to-end guide to the human approval workflow The review flow puts a human between transcription and delivery. You choose where that human sits with `review_stage`, and the choice changes what they can affect. There are two ways to reach that human, and they are two doors into the same held job rather than two modes: the artist reviews on **our** page via `review_url` (this guide), or inside **your** product via [`POST /jobs/{id}/approve`](/api-reference/approve). Both converge on the same approval, and you can choose per job with `review_delivery`. If the artist is already signed in to your app, read [Running Review In Your Own Product](/guides/partner-review) instead. ## Choosing a stage **`review_stage: "transcript"`** — the job stops as soon as the lyrics exist, before any timing work. The reviewer checks words; alignment then runs on the text they approved. Use this when corrections should reach the aligner. It is the right default for distributor workflows where an artist confirms wording. **`review_stage: "aligned"`** (the default) — the job aligns first and stops with finished, time-synced lines. The reviewer can hear each line in place. Use this for QC on timing. Corrections are still accepted, and are re-timed against the audio on approval. > [!NOTE] > > `"aligned"` is the default so that integrations built before `review_stage` > existed are unaffected. ## End-to-end: review before alignment **1. Submit with review_stage=transcript** ```json theme={null} POST /api/v1/transcribe { "audio_url": "https://cdn.example.com/song.mp3", "language": "Punjabi", "review": true, "review_stage": "transcript", "webhook_url": "https://api.example.com/webhooks/lyrcs" } ``` Returns `202 { "job_id": "...", "status": "queued", "review_required": true, "review_stage": "transcript" }`. `webhook_url` is optional — see **Without webhooks** below. **2. Transcription runs (\~60 seconds)** Lyrics, transliteration and translation are produced. No alignment yet. **3. job.awaiting_review fires** ```json theme={null} { "event": "job.awaiting_review", "job_id": "a1b2c3d4-...", "language": "Punjabi", "review_stage": "transcript", "review_url": "https://lyrcs.ai/review/a1b2c3d4-...?token=abc123", "expires_at": "2024-01-08T00:00:00.000Z", "studio_url": "https://lyrcs.ai/studio/a1b2c3d4-..." } ``` **4. Route review_url to the artist** Forward it by email, SMS, or your own platform. The artist does not need a lyrcs.ai account. **5. The artist reviews and approves** They see the lyrics without timestamps — timings do not exist yet — and can correct any line before approving. **6. Alignment runs on the approved text (\~30 seconds)** This is the point of the transcript gate: the aligner receives the corrected words, not the original ones. **7. job.complete fires with full results** Transcript, transliteration, translation and download URLs for LRC, SRT and — when requested — word-level JSON. ## End-to-end: review after alignment Identical, with two differences: the gate fires after alignment (\~90s rather than \~60s), the reviewer sees time-synced lines and can click any timestamp to hear it, and approval finalises the job rather than starting alignment. If they correct a line, approval re-runs alignment over the corrected text so the word-level timings continue to describe the words actually present. Where re-alignment is unavailable for your organisation, the word-level track is removed instead of being returned stale — the approval response says which happened via its `alignment` field. ## What is held back, precisely Only the **`job.complete` webhook** waits for approval. `GET /api/v1/jobs/{id}` reports the pipeline's real state throughout, and output that exists is readable. On an aligned-stage job that means `status: "complete"` and working download URLs before anyone has approved. > [!WARNING] > > Do not treat `status: "complete"` as sign-off. `review_approved_at` is the only > field that means a human approved. If you need results to be genuinely > unavailable before approval, use `review_stage: "transcript"` — alignment has > not run, so there is nothing timed to fetch early. ## Without webhooks A webhook endpoint is convenient but not required. Every field the flow needs is on the job: ```json theme={null} { "job_id": "a1b2c3d4-...", "status": "processing", "review_required": true, "review_url": "https://lyrcs.ai/review/a1b2c3d4-...?token=abc123", "review_expires_at": "2024-01-08T00:00:00.000Z", "review_approved_at": null } ``` Poll until `review_url` is non-null to get the link, then until `review_approved_at` is non-null to learn approval happened. A transcript-stage job also reports `stage: "awaiting_review"` while it waits, so you can find everything pending in one sweep. At scale, poll [`GET /jobs`](/api-reference/jobs-list) with `updated_since` rather than each job individually. `review_url` is `null` until the job reaches its gate — after transcription for the transcript stage, after alignment for the aligned stage. Do not cache a null value. ## Tokens and expiry Review tokens are valid for **7 days** and may be used more than once, so a reviewer can open the link, leave, and return. After `review_expires_at` the link stops working; contact [support@lyrcs.ai](mailto:support@lyrcs.ai) for a new one. A `review_stage: "transcript"` job that is never approved is marked `failed` with stage `review` after 8 days, rather than sitting in `processing` forever. ## Review in batch jobs Batch jobs support both parameters per job: ```json theme={null} { "webhook_url": "https://api.example.com/webhooks/lyrcs", "jobs": [ { "audio_url": "https://cdn.example.com/song.mp3", "language": "Punjabi", "review": true, "review_stage": "transcript" } ] } ``` Each job's `review_url` appears in `GET /api/v1/batch/{id}` once that job reaches its gate. > [!WARNING] > > `batch.complete` counts a review job as done when its pipeline work finishes, > not when a human approves — so it can fire before every artist has signed off. > Individual `job.complete` webhooks still fire per approval. Track approvals > through `review_approved_at`, not through `batch.complete`. ## What a reviewer can change They can retype any line, and — where the timings can be produced afresh — add, delete and reorder lines. That matters because transcription gets line *boundaries* wrong as well as words: a line can be missed entirely, two sung lines merged into one, or one split across two. Adding and removing lines is offered when the job is held at the **transcript** gate, where alignment has not run yet, and at the **aligned** gate only where re-alignment is available. Where it is not, the wording of existing lines can still be corrected — but a new line could only be given a timestamp nobody measured, so the control is not offered and an attempt is refused with `409 REV_001`. Line operations apply to both scripts together. Transliteration is position-mapped to the original, so inserting into one alone would misalign every pair below it. ### Heavy edits are recorded Every approval records how many lines changed on each script, and keeps a write-once snapshot of what the model originally produced. An edit that changes most of the lyric is additionally flagged as a replacement. Nothing is blocked. A genuinely poor transcript deserves a heavy correction, and refusing one would punish a reviewer for our error. The flag exists so that wholesale replacement is visible rather than invisible. ## Other limitations * The `job.complete` webhook fired after approval is **single-attempt** and does not retry. If you miss it, poll the job. # API Modes Source: https://docs.lyrcs.ai/guides/three-api-modes Choose the right pipeline mode for your workflow Every transcription job runs in one of four modes, selected by combining the `align`, `review` and `review_stage` parameters. The mode determines what output is produced, how long it takes, and when results are delivered. ## Mode comparison | Mode | Parameters | Output | Approx. time | Best for | | - | - | - | - | - | | Transcript only | `align=false` | Transcript + transliteration + translation + cultural notes | \~60s | Metadata, liner notes, sync licensing | | Full pipeline | `align=true` (default) | All of above + LRC + SRT + word-level JSON | \~90s | Karaoke, lyric display, DSP delivery | | Review after alignment | `review=true` | All of above, `job.complete` sent after approval | \~90s + review | QC on finished timings | | Review before alignment | `review=true` + `review_stage=transcript` | All of above, aligned from approved text | \~60s + review + \~30s | Artist approval, distributor workflows | | Review in your own product | `review=true` + `review_delivery="api"` | All of above, approved by your server | \~60s + review + \~30s | Distributors whose artists never leave their app | *** ## Mode 1 — Transcript only Set `align=false` to skip time-alignment entirely. lyrcs.ai transcribes the audio and returns the lyrics as structured text. No LRC or SRT files are generated. ```json theme={null} { "audio_url": "https://cdn.example.com/song.mp3", "language": "Hindi", "align": false } ``` **Output fields:** * `results.transcript` — lyrics in the original script * `results.transliteration` — phonetic romanisation * `results.translation` — English translation * `results.cultural_notes` — contextual notes (may be null) **What's missing:** `results.downloads` is not present. No LRC or SRT files. **Use cases:** * Delivering lyric metadata to streaming stores (Spotify, Apple Music, Amazon) * Generating liner notes for releases * Populating sync licensing databases with searchable lyrics * Any workflow where timing is not needed *** ## Mode 2 — Full pipeline The default. Transcription runs first, then alignment maps each lyric line to a timestamp in the audio. ```json theme={null} { "audio_url": "https://cdn.example.com/song.mp3", "language": "Tamil" } ``` **Output fields:** * Everything from Mode 1, plus: * `results.downloads.lrc_original` — time-synced LRC in original script * `results.downloads.lrc_transliterated` — time-synced LRC in romanised form * `results.downloads.srt_original` — SRT in original script * `results.downloads.srt_transliterated` — SRT in romanised form * `results.downloads.words_original` — per-word timestamps in original script (JSON) * `results.downloads.words_transliterated` — per-word timestamps in romanised form (JSON) Word-level JSON is included by default with all aligned jobs (`word_align=true`). Set `word_align=false` to skip it and receive only LRC and SRT. **Use cases:** * Karaoke and sing-along applications * Lyric display synced to audio playback on streaming platforms * Subtitle tracks for music videos * Live lyric scrolling on DSPs *** ## Mode 3 — Review after alignment The default review order. Alignment completes first, then a `job.awaiting_review` event fires with a `review_url`. `job.complete` follows once the reviewer approves. The reviewer sees finished, time-synced lines, which makes this the right choice for QC on timing. Its limit is that corrections arrive after the timings exist: changing a word does not re-time the line it sits on. ```json theme={null} { "audio_url": "https://cdn.example.com/song.mp3", "language": "Punjabi", "review": true, "webhook_url": "https://api.example.com/webhooks/lyrcs" } ``` **Delivery sequence:** 1. Transcription + alignment completes (\~90s) 2. `job.awaiting_review` fires → contains `review_url` 3. Distributor forwards `review_url` to artist 4. Artist approves in lyrcs.ai Studio 5. `job.complete` fires → full results + downloads **Use cases:** * Artist approval required before public lyric delivery * Quality control for high-profile releases * Markets where lyrics are legally sensitive and must be approved by rights holders *** ## Mode 4 — Review before alignment Set `review_stage: "transcript"` alongside `review: true`. The job stops as soon as the lyrics exist, before any timing work. The reviewer sees untimed words; alignment then runs on the text they approved. ```json theme={null} { "audio_url": "https://cdn.example.com/song.mp3", "language": "Punjabi", "review": true, "review_stage": "transcript" } ``` **Delivery sequence:** 1. Transcription completes (\~60s) 2. `job.awaiting_review` fires with `review_stage: "transcript"` 3. The reviewer corrects and approves 4. Alignment runs on the approved text (\~30s) 5. `job.complete` fires **Use cases:** * Distributor workflows where the artist confirms wording before anything is timed * Any catalogue where corrections must reach the aligner rather than sit beside it ## Mode 5 — Review inside your own product The same held job as Mode 3 or 4, reached through a different door. Instead of forwarding a `review_url`, you read the lyrics from `GET /jobs/{id}` and approve with `POST /jobs/{id}/approve` using your API key — the artist never leaves your app and never sees a lyrcs.ai link. ```json theme={null} { "audio_url": "https://cdn.example.com/song.mp3", "language": "Punjabi", "review": true, "review_stage": "transcript", "review_delivery": "api" } ``` `review_delivery` is optional and defaults to `"both"`, which keeps the link working as well. `"api"` mints no review link at all, so approval can only come from your own system. **Delivery sequence:** 1. Transcription completes (\~60s) 2. The job reports `stage: "awaiting_review"`, and `GET /jobs/{id}` carries a `review` block with the lyrics as an array of lines 3. Your UI shows them; the artist corrects and accepts 4. Your server calls `POST /jobs/{id}/approve` 5. Alignment runs on the approved text (\~30s), then `job.complete` fires This is not a different pipeline. Steps 4 and 5 are identical to Mode 4, and nothing downstream can tell which door was used — so supporting both costs one door's worth of work. Full detail in [Running Review In Your Own Product](/guides/partner-review). **Use cases:** * Distributors whose artists are already signed in to their own platform * Anyone whose compliance requires approvals to originate from their own system ## Decision guide ``` Do you need time-synced lyrics (LRC/SRT)? ├── No → align=false (Mode 1, ~60s, faster) └── Yes → Does a human check the lyrics first? ├── No → default (Mode 2, ~90s) └── Yes → Should their corrections be aligned? ├── No → review=true (Mode 3) └── Yes → review=true + review_stage=transcript (Mode 4) └── Should they review inside YOUR product, rather than on a lyrcs.ai link? └── Yes → add review_delivery="api" (Mode 5) ``` > [!NOTE] > > A `webhook_url` is convenient but not required for review. The `review_url` is > also returned by `GET /jobs/{id}` and `GET /jobs`, and `review_approved_at` > tells you when approval happened — so a polling consumer can run either review > mode without receiving webhooks at all. # Webhooks Source: https://docs.lyrcs.ai/guides/webhooks Receive event notifications instead of polling for job status Webhooks deliver event payloads to your server as jobs complete. Pass a `webhook_url` when submitting a job or batch — lyrcs.ai will POST the event payload to that URL. > [!TIP] > > **Webhooks are the recommended way to consume the API.** They fire only on > terminal outcomes, so there is no in-flight state to interpret and no need to > decide how long is too long. Polling works, but it puts the burden of judging > "is this job stuck?" on your client — and that judgement is the single most > common source of integration bugs. > > If you do poll, see [job status](/api-reference/jobs) for how long jobs > legitimately take, and don't impose a shorter timeout of your own. ## Events | Event | Fired when | | - | - | | `job.complete` | Job finishes successfully (or after artist approval if `review=true`) | | `job.awaiting_review` | Alignment done and `review=true` — results held pending artist approval | | `job.degraded` | First upstream (Gemini 503) retry — job is still processing | | `job.failed` | Job fails permanently | | `batch.complete` | All jobs in a batch finish (whether complete or failed) | ## Retry schedule lyrcs.ai retries failed webhook deliveries (non-2xx or timeout) on this schedule: | Attempt | Delay | | - | - | | 1 | Immediate | | 2 | +1 minute | | 3 | +5 minutes | | 4 | +30 minutes | Your endpoint must return a `2xx` response within **10 seconds** or the delivery is counted as failed. > [!NOTE] > > The `job.complete` webhook fired after artist approval in the review flow uses **single-attempt delivery** — it does not retry. Ensure your review webhook endpoint is reliable. ## Delivery headers Every delivery carries these: | Header | Value | | - | - | | `X-Lyrcs-Event` | The event name, e.g. `job.complete`. Lets you route without parsing the body. | | `X-Lyrcs-Job-Id` | The job this delivery concerns. | | `X-Lyrcs-Timestamp` | Unix seconds at send time. | | `X-Lyrcs-Signature` | `sha256=` — present only when your key has a `webhook_secret`. | ## Signature verification Every webhook delivery includes an `X-Lyrcs-Signature` header containing an HMAC-SHA256 signature of the raw request body, keyed with your `webhook_secret`. The header value is **prefixed**, in the form `sha256=`. Strip the prefix before comparing — passing the whole header to a hex decoder yields a buffer of the wrong length, and `timingSafeEqual` throws rather than returning `false`. Verify the signature before processing the payload to confirm the request came from lyrcs.ai. ```javascript Node.js — signature verification theme={null} import crypto from "crypto"; export function verifyLyrcsSignature(rawBody, signature, webhookSecret) { const expected = crypto .createHmac("sha256", webhookSecret) .update(rawBody) .digest("hex"); // "sha256=abc123…" → "abc123…" const received = String(signature ?? "").replace(/^sha256=/, ""); // Length check first: timingSafeEqual throws on a length mismatch, so a // malformed or missing header would crash the handler instead of being // rejected. A wrong length is already a failed verification. if (received.length !== expected.length) return false; return crypto.timingSafeEqual( Buffer.from(received, "hex"), Buffer.from(expected, "hex") ); } // In your webhook handler (e.g. Express): app.post("/webhooks/lyrcs", express.raw({ type: "application/json" }), (req, res) => { const signature = req.headers["x-lyrcs-signature"]; if (!verifyLyrcsSignature(req.body, signature, process.env.LYRCS_WEBHOOK_SECRET)) { return res.status(401).send("Invalid signature"); } const event = JSON.parse(req.body.toString()); // handle event... res.sendStatus(200); }); ``` *** ## Event payloads ### job.complete Fires when a job completes successfully. `downloads` is omitted when `align=false` was set. `cultural_notes` may be `null`. `end_user` is present only when the job was submitted with one. ```json theme={null} { "event": "job.complete", "job_id": "a1b2c3d4-...", "external_id": "CATALOG_76007488", "isrc": "USSKG2400001", "end_user": { "id": "2fc0df07-...", "external_id": "cust_8842" }, "created_at": "2024-01-01T00:00:00.000Z", "language": "Tamil", "duration_seconds": 214, "studio_url": "https://lyrcs.ai/studio/a1b2c3d4-...", "results": { "transcript": "நான் உன்னை நேசிக்கிறேன்...", "transliteration": "Naan unnai nesikirein...", "translation": "I love you...", "cultural_notes": null, "downloads": { "lrc_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/original", "lrc_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/transliterated", "srt_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/original", "srt_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/transliterated", "words_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/words/original", "words_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/words/transliterated" } }, "second_opinion": { "total_lines": 59, "agreed_lines": 47, "match_ratio": 0.79, "suggestions": [], "hidden_count": 0 }, "alignment": { "method": "forced", "coverage": 0.998, "line_flags": [] } } ``` Download URLs in the payload still require your API key in the `Authorization` header to fetch. > [!NOTE] > > `words_original` and `words_transliterated` are present when `word_align_requested: true` (the default). Jobs submitted with `word_align=false` include only `lrc_*` and `srt_*` in `downloads`. > [!WARNING] > > `second_opinion` and `alignment` are always present and may be `null`, which > means the check did not run. An empty `suggestions` array is the opposite > signal — it ran and agreed with every line. See > [Quality Signals](/guides/quality-signals). *** ### job.awaiting_review Fires instead of `job.complete` when `review=true` and the job reaches its review gate. No `results` block — the `job.complete` webhook is what waits for approval. The gate is after transcription when `review_stage` is `"transcript"`, and after alignment when it is `"aligned"` (the default). The payload's `review_stage` field says which, since the same event fires at both. Note that only this webhook is deferred: `GET /jobs/{id}` continues to report the job's real state, and on an aligned-stage job the results are readable before approval. `review_approved_at` is the field that means a human signed off. `review_url` and `expires_at` are `null` when the job was submitted with `review_delivery: "api"` — no review link is created for those jobs by design. Approve them at `approve_url`; see [Running Review In Your Own Product](/guides/partner-review). ```json theme={null} { "event": "job.awaiting_review", "job_id": "a1b2c3d4-...", "language": "Punjabi", "review_stage": "transcript", "review_delivery": "both", "review_url": "https://lyrcs.ai/review/a1b2c3d4-...?token=abc123", "expires_at": "2024-01-02T00:00:00.000Z", "approve_url": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../approve", "studio_url": "https://lyrcs.ai/studio/a1b2c3d4-...", "artist_url": "https://lyrcs.ai/artist?token=ps_..." } ``` Forward `review_url` to the artist. When they approve, `job.complete` fires with the full payload. `artist_url` is a durable, catalogue-wide link for a submission that carried an [`end_user`](/guides/partner-review) — it opens that artist's own page (their songs, review, downloads, and video ordering) and slides its own expiry, so it keeps working for weeks. It is `null` when the job had no `end_user`. See [Running Review In Your Own Product](/guides/partner-review). *** ### job.degraded Fires on the **first** Gemini 503 retry only. The job is still processing — this is informational. Do not assume the job has failed. ```json theme={null} { "event": "job.degraded", "job_id": "a1b2c3d4-...", "language": "Hindi", "reason": "gemini_503", "attempt": 1, "retrying_in_ms": 7243, "message": "Transcription delayed due to upstream capacity. Job is retrying automatically." } ``` | Field | Value | | - | - | | `reason` | Always `"gemini_503"` | | `attempt` | Always `1` — only fires on the first retry | | `retrying_in_ms` | Milliseconds until the retry fires (includes jitter) | *** ### job.failed Fires when a job fails permanently after all retries are exhausted. ```json theme={null} { "event": "job.failed", "job_id": "a1b2c3d4-...", "created_at": "2024-01-01T00:00:00.000Z", "language": "Tamil", "error": "processing_failed" } ``` *** ### batch.complete Fires when all jobs in a batch have finished — whether complete or failed. `status` is `"complete"` if all jobs succeeded, `"partial"` if any failed or timed out. `downloads` is included per job only when `status === "complete"` AND `align_requested === true` for that job. ```json theme={null} { "event": "batch.complete", "batch_id": "b1a2t3c4-...", "status": "partial", "job_count": 3, "completed": 2, "failed": 1, "jobs": [ { "job_id": "a1b2c3d4-...", "external_id": "TRACK_001", "language": "Hindi", "status": "complete", "review_required": false, "review_url": null, "review_approved_at": null, "studio_url": "https://lyrcs.ai/studio/a1b2c3d4-...", "downloads": { "lrc_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/original", "lrc_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/lrc/transliterated", "srt_original": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/original", "srt_transliterated": "https://lyrcs.ai/api/v1/jobs/a1b2c3d4-.../download/srt/transliterated" } }, { "job_id": "b2c3d4e5-...", "external_id": "TRACK_002", "language": "Tamil", "status": "failed", "review_required": false, "review_url": null, "review_approved_at": null, "studio_url": "https://lyrcs.ai/studio/b2c3d4e5-..." } ] } ```