Pre-recorded (batch) transcription job life cycle and error codes
A pre-recorded job runs in the background: POST /v2/pre-recorded answers as soon as the job is
accepted, long before the file is transcribed. Knowing what happens in between tells you how to wait for
the result, which failures to retry, and why sending the same file again is almost never the fix.
The statuses
Section titled “The statuses”POST /v2/pre-recorded ── 201 ──▶ queued ──▶ processing ──▶ done │ │ └────────────┴──────▶ errorstatus |
what it means | what you do |
|---|---|---|
queued |
Accepted and waiting for its turn in your workspace’s queue. | Wait. |
processing |
A transcription host has it. | Wait. |
done |
result holds the transcript and the add-ons. |
Read it. |
error |
The job failed: error_code and post_session_metadata.error say why. |
See The error codes. |
done and error are final: a job never leaves them. List the jobs still running, newest first
(repeat status for several):
curl "https://eu1.api.gladia.io/v2/pre-recorded?status=queued&status=processing" \ -H "x-gladia-key: $GLADIA_API_KEY"Accepted means accepted
Section titled “Accepted means accepted”A 201 with an id is the promise that the job will end, done or error. Keep the id and wait for that
end; never send the same file again because a job is still queued or processing: a second
POST creates a second job, billed on its own, that waits in the same queue as the first.
POST /v2/pre-recorded answered |
the job | what you do |
|---|---|---|
201 |
accepted | Wait for its end (below). |
400 |
none: the request is wrong, or an option is not served on this cluster | Fix the request; the same one fails again. |
413, 422 |
none: no host of the cluster takes a file this long (413) or in this format (422) |
Split or convert the file. |
402 |
none: your workspace has no credits left (insufficient_credits) |
Add credits, then send it again. |
429 |
none: your workspace has the maximum of jobs waiting, or created too many this minute | Wait (Retry-After when there is one), then send it again (Pre-recorded limits). |
503, a timeout, no answer |
none was created when the answer is 503; after a timeout, maybe |
Send it again with a backoff. After a timeout, first look for the job in GET /v2/pre-recorded (filter on your custom_metadata). |
An uploaded file can serve several jobs: each POST with the same audio_url of POST /v2/upload is a new job,
billed on its own. Use it to run the file again on purpose, with other options; deleting one of these jobs
keeps the file for the others.
Polling or a callback
Section titled “Polling or a callback”Both give you the same result; choose one.
- Polling: read
GET /v2/pre-recorded/{id}untilstatusisdoneorerror. Every few seconds is enough: a file is transcribed in a fraction of its duration. The official SDK polls for you (interval, Transcribe a file). - A callback: give
callback_config.urlwhen you create the job, and Gladia Enterprise POSTs the end to your server:transcription.successwith the result, ortranscription.errorwith{code, message}(Callbacks). Nothing to poll, and nothing is sent while the job runs.
Good to know:
- There is no
transcription.createdevent. Gladia’s cloud API sends one when it accepts a job; here the201is the acceptance. The callback is sent once, at the end. - A callback is tried 3 times, each time for up to 5 seconds. Your server answering a
5xx, or not at all, gets the next try after a short backoff; a4xxis not tried again. A missed callback loses nothing: the job keeps its result, read it withGET /v2/pre-recorded/{id}. A server that may be down for a while should poll the jobs it has not heard of. - The callback carries the result as it was made:
processing_timeandrtfxare only in a read of the job.
How long it takes
Section titled “How long it takes”A job’s time is its wait in the queue plus its transcription:
- The queue: up to 25 jobs of your workspace are transcribed at once; the others wait their turn,
queued. Up to 300 can wait: one more is refused with429(Pre-recorded limits). The workspaces take their turns round-robin: another workspace’s backlog does not hold your jobs until it is drained. - The transcription: Gladia Enterprise expects a file to take its duration divided by the hosts’ measured speed (their real-time factor), plus about 30 seconds. One hour of audio at 60× takes about 90 seconds.
- What it took: a done job’s
result.metadatagivesprocessing_time(from its creation to its end, the queue included),transcription_timeandrtfx(How long it took).
What Gladia Enterprise retries for you
Section titled “What Gladia Enterprise retries for you”You do not need to retry a job that is queued or processing: Gladia Enterprise retries it.
- A host that cannot be reached, fails with a server error or loses the job: the job is sent again, up to 3 attempts, 2 seconds apart, then up to a minute apart.
- Every host busy: the job waits for one, asking again every 15 seconds, for up to 15 minutes. That wait is not an attempt.
- A slow host: past twice the expected time, a second attempt starts on another host; the first one to end wins.
- Too slow: past ten times the expected time, the job fails (
500, “the transcription took too long”). - A job that never ends: a job still running 24 hours after its creation fails (
504). - After the transcription: storing the result, metering it and sending your callback are each retried on their own. A step that still fails fails the job; it is not billed.
A job the host refuses (an unreadable file, an option it does not serve) is never tried again: it ends
with the host’s 4xx.
The error codes
Section titled “The error codes”A failed job has status: "error", its error_code and a message (post_session_metadata.error, and the
transcription.error callback’s error). A failed job is not billed.
error_code |
what happened | what to do |
|---|---|---|
400 |
The host refused an option of the job. | Read the message, fix the option, send a new job. |
413 |
The file is longer than the host takes. | Split the file, then send each part. |
422 |
The file could not be transcribed: an unreadable or unsupported file, or a live session’s recording that never came (from_session_id). |
Check or convert the file; sending it again as it is fails again. |
410 |
Your workspace was deleted while the job ran. | Nothing: the job’s data is gone with the workspace. |
500 |
The transcription failed, took too long, or a step after it failed past its retries. | Send a new job, with a backoff. If it fails again, contact support with the job’s id. |
503 |
Every host stayed busy past the wait. | Send a new job later. |
504 |
The job did not end within 24 hours. | Send a new job; contact support with the job’s id. |
5xx codes are ours: a new job of the same file can succeed. 4xx codes are the file’s or the request’s: a new
job of the same file and options fails the same way.
Deletion
Section titled “Deletion”DELETE /v2/pre-recorded/{id} answers 202 and deletes the job, its result, its rating and its uploaded file at
once. A job still running is stopped: it is not finished, not billed, and no callback is sent. A second
DELETE answers 404. A 503 means part of it could not be deleted yet: send the DELETE again, it deletes the
rest.
Watch your key’s traffic
Section titled “Watch your key’s traffic”Jobs slower than usual, or a live integration that feels laggy? GET /v2/queue/monitoring tells you what is
happening on the API key you call with: its pre-recorded queue now, and its jobs and real-time sessions of the
last 30 minutes.
curl "https://eu1.api.gladia.io/v2/queue/monitoring" \ -H "x-gladia-key: $GLADIA_API_KEY"{ "queued": 3, "processing": 2, "blocked": 0, "avg_seconds": 42.5, "p90_seconds": 71.0, "window_minutes": 30, "computed_at": "2026-11-11T12:00:00+00:00", "cache_seconds": 60, "prerecorded": { "queued": 3, "processing": 2, "oldest_queued_seconds": 12.5, "created": 40, "done": 35, "failed": 1, "avg_seconds": 42.5, "p90_seconds": 71.0, "avg_wait_seconds": 4.2, "avg_processing_seconds": 30.1 }, "live": { "active": 4, "started": 12, "ended": 7, "failed": 1, "final_latency": {"transcripts": 812, "mean_ms": 640, "p50_ms": 600, "p95_ms": 1100, "max_ms": 2300}, "partial_latency": {"transcripts": 4100, "mean_ms": 310, "max_ms": 900} }}| field | what it tells you |
|---|---|
queued, processing |
Your key’s jobs waiting and running now. |
prerecorded.oldest_queued_seconds |
How long the oldest waiting job has waited: a large value means a backlog, not a lost job. |
prerecorded.created, done, failed |
Your key’s jobs created in the window, and how many of them are done or failed. |
avg_seconds, p90_seconds |
Mean and 90th percentile of a done job’s time from creation to result. |
prerecorded.avg_wait_seconds, avg_processing_seconds |
That time split: waiting in the queue, then processing. |
live.active |
Your key’s real-time sessions connected now. |
live.started, ended, failed |
Its sessions created in the window, and how many of them ended or failed. |
live.final_latency |
How long a final transcript took, from its audio reaching Gladia to the transcript sent back: mean, median (p50_ms), 95th percentile (p95_ms) and slowest, over the window’s sessions that ended. |
live.partial_latency |
The same for partial transcripts: mean and slowest. |
Gotchas:
- One key at a time. The numbers are the calling key’s, never your workspace’s other keys’. To see several
keys, call once with each and add the counts up; a mean adds up weighted by its count (
done,transcripts), a percentile does not (the highest of them is a safe bound). - Computed once a minute. Polling faster returns the same
computed_at;cache_secondssays for how long. Each client address may call it 3 times a minute, whatever the key: past it the answer is a429, wait a minute. Watching more keys from one machine, call each one less often (every few minutes is plenty). - Latency of finished sessions. A session’s latency counts once it has ended: a session still running shows in
active, not yet infinal_latency. blockedis always0: a job over your queue limit is refused with a429, never held.- A
503means the numbers could not be read right now: try again a minute later.
The first seven fields are those of the Gladia API’s route of the same path, so its clients work unchanged.
Retention
Section titled “Retention”| What | Kept | Then |
|---|---|---|
| The job and its result | Your workspace’s history retention (90 days unless your account says otherwise), at least one day | Deleted |
| The uploaded file | Your workspace’s audio retention | Deleted |
| The file and the result at the transcription host | Not kept: forgotten as soon as the job ends | — |
A change of your workspace’s history retention applies to the jobs already made, too. See Retention and Where pre-recorded jobs run.