---
title: "Jobs: send the file, get the answer later"
description: "POST /v1/jobs runs any analysis route in the background after we reply: an id at once, the result by polling or by a signed webhook, every job on your account page. One request for any file up to 150 MB through the upload door."
cluster: General
level: Practical
updatedAt: 2026-11-19
lang: en
source: https://audiolab.tools/docs/start/jobs
---

## Who this is for

You run audio through the API from a pipeline, an archive or a queue, and you do not want a connection open while a file is measured. A **job** gives you an id at once; the analysis runs in the background after we reply, and the result waits for you: ask for it, let it come to your webhook, or look at it on [your account page](/account#jobs).

A job is not faster than a call and does not measure differently: it runs the same route with the same engine, and costs the same as the call itself.

## Create a job

Send what you would send to the route, plus `endpoint`:

```sh
curl https://audiolab.tools/v1/jobs \
  -H "Authorization: Bearer $AUDIOLAB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"endpoint": "qc", "spec": "target-podcast", "url": "https://audiolab.tools/samples/voice/speech-female-pangram.mp3", "webhook": "https://example.com/audiolab-hook"}'
```

The answer comes back at once, with status `202` and a `Location` header:

```json
{
  "id": "6f0c1d2e-…",
  "status": "queued",
  "endpoint": "qc",
  "statusUrl": "https://audiolab.tools/v1/jobs/6f0c1d2e-…"
}
```

`endpoint` is any analysis route: `mixlab/analyze`, `mixlab/check-target`, `mixlab/timeseries`, `mixlab/spectrum`, `voicelab/qa`, `voicelab/segments`, `signallab`, `signallab/sample`, `analyze/profile` or `qc`. Every other field is what you would send to that route, and `fileName` names the file in the answer and the report. The checks of the route run before the job is made: a wrong option, a preset your plan does not have, or a limit that is reached returns the error at once, and no job is created.

No key yet? `curl -X POST https://audiolab.tools/v1/keys` gives you one without an account.

For automated systems there are two optional extras. `reference` is a text of your own (up to 200 characters, for example your call id) that comes back in the job, in the list and in the webhook. And the header `Idempotency-Key` makes a retry safe: the same key within 24 hours returns the same job (status `200`, header `Idempotent-Replayed: true`) instead of making a new one and counting a new call. If you send the same key with a different request (another endpoint, file, option, window, webhook, `reference` or `fileName`), you get a `409` with the code `idempotency_conflict` instead: nothing is started, nothing is counted, and the message names the earlier job.

The options you pass (every field except `endpoint`, `url`, `objectPath`, `webhook`, `fileName` and `reference`) may be at most 4,096 bytes together written as JSON, and `url` at most 4,096 characters. More is a `400` with the code `invalid_parameter`, before anything is counted. A job stores its options and they come back in the list and in the webhook, so send only what you need.

## Read the result

```sh
curl https://audiolab.tools/v1/jobs/6f0c1d2e-… -H "Authorization: Bearer $AUDIOLAB_KEY"
```

The `status` goes `queued`, `running`, then `done` or `failed`. Once `done`, `result` holds the full answer of the route, with its `provenance` and `reportUrl`; once `failed`, `error` holds a stable `code` and a message ([what each code means](/docs/errors)). A few seconds between two reads is plenty: reading is free and does not count as a call, with at most 120 reads a minute. `GET /v1/jobs` lists your last 50.

An analysis takes seconds. One that has not finished after 270 seconds stops, and the job becomes `failed` with the code `api_timeout`; the webhook hears about that too. In the rare case that the worker itself dies, the job is set to `failed` within 30 minutes without a webhook, so give your side a timeout as well. A job stopped this way is not given back: it still counts as a call. Jobs are kept for 30 days.

## Verifying webhooks

Give `webhook` (a public `https` address) and the finished job is POSTed to it, in the same shape as `GET /v1/jobs/{id}`, failed jobs included. The header `X-AudioLab-Signature` is `sha256=` plus the hex HMAC-SHA256 of the raw body, with your API key as the HMAC key. Only you and we have that key, so there is no second secret to manage. `X-AudioLab-Job` carries the job id.

```python
import hashlib, hmac, os

def from_audiolab(body: bytes, signature: str | None) -> bool:
    expected = "sha256=" + hmac.new(os.environ["AUDIOLAB_KEY"].encode(), body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, signature or "")
```

```js
import { createHmac, timingSafeEqual } from 'node:crypto';

export function fromAudioLab(body, signature) {
  const expected = Buffer.from('sha256=' + createHmac('sha256', process.env.AUDIOLAB_KEY).update(body).digest('hex'));
  const given = Buffer.from(signature || '');
  return expected.length === given.length && timingSafeEqual(expected, given);
}
```

Check the raw body as it arrived, before you parse it. We send each webhook up to three times (now, after 2 seconds and after 8 seconds, each with a 10-second timeout; again after a network error, a 408, a 429 or a 5xx, not after another 4xx), so the same job can reach you twice; the status your webhook answered with is kept on the job (`webhook.status`, 0 when it could not be reached), and `GET /v1/jobs/{id}` always has the result. If your side might see a job twice, use the job id to skip the second one. The signature covers the whole body, `finishedAt` included, so that time cannot be changed: refuse a webhook whose `finishedAt` is more than a few minutes old, and someone who copied one cannot send it to you again later.

## A large file in one request

A file sent in the request body to `audiolab.tools` can be at most 4 MB: the platform refuses more before it reaches the API. The **upload door** takes any file up to 150 MB in one POST and makes it a job:

```sh
curl -X POST "https://xntvedeqpnpcgrsespfe.supabase.co/functions/v1/upload?endpoint=mixlab/check-target&target=podcast" \
  -H "Authorization: Bearer $AUDIOLAB_KEY" \
  -H "Content-Type: audio/wav" \
  --data-binary @episode.wav
```

```python
import os, requests

with open("episode.wav", "rb") as f:
    job = requests.post(
        "https://xntvedeqpnpcgrsespfe.supabase.co/functions/v1/upload",
        params={"endpoint": "mixlab/check-target", "target": "podcast"},
        headers={"Authorization": f"Bearer {os.environ['AUDIOLAB_KEY']}", "Content-Type": "audio/wav"},
        data=f,
    ).json()
print(job["statusUrl"])
```

The file is the body; the route and its options go in the query (`limits` and `critical` as JSON). The answer is the same `202` as `POST /v1/jobs`, with the same `Location` header. The door decides nothing itself: it uses your key to get a signed upload, streams the file to it, and creates the job, so every limit of your plan applies as it does everywhere, and the file counts toward your monthly data. The address is also in the answer of `POST /v1/keys` (`upload`), so a client can read it instead of hard-coding it.

A full episode: the loudness routes (`mixlab/analyze`, `mixlab/check-target`) handle up to 3 hours. `qc` and the voice and signal routes decode at most about 7.7 minutes of 48 kHz stereo (a 16-bit WAV of about 88 MB), so a longer file gets `track_too_long` after it went up.

## Running at volume

Sending thousands of files a month from a system of your own? These keep it smooth and keep you inside your limits:

- **Keep a queue that never has more in flight than your key allows.** `GET /v1/usage` shows it under `concurrent` (running now, and the limit: Free 5, Plus 10, Studio 25, Enterprise 50). Jobs, batches and requests count together, large or small. Over it you get a `429` with the code `too_many_jobs`, a `Retry-After` header and the numbers in `usage`; the refusal costs no call.
- **Send an `Idempotency-Key` and a `reference`** (your own call id), so a retry after a time-out never doubles the work and every result finds its call.
- **Use the webhook, and the status URL as the safety net.** Three attempts, and the result is still on `GET /v1/jobs/{id}` after that.
- **Check a file first with `dryRun: true`** on a single analysis route: format, duration, whether it fits and what to do, without measuring it and without a call (its data does count). The voice, signal and QC routes take about 46 minutes at 16 kHz mono; send a longer recording as windows with `startSec` and `durationSec`, one after the other.
- **Read the headers.** `RateLimit-Remaining` for the minute, `X-AudioLab-Calls-Remaining` for the month, and from 80 percent `X-AudioLab-Quota-Warning`.
- **Wait for `Retry-After`.** After a `429`, or a `503` with the code `service_busy` (all customers together reached the ceiling), wait the seconds it says and send again.

A refused request and one that fails on our side do not count as a call, and neither does a dry run; the data volume of a file we had already read before refusing it, and of a dry run, does count. Three things still count as a call, so they do not surprise you: a refusal because the monthly data limit is reached, an empty audio body sent to an analysis route, and a job that the clean-up marks `failed` after the worker died. Need more calls, data or analyses at once? Write to [partners@audiolab.tools](mailto:partners@audiolab.tools) and we agree the numbers per key.

## On your account

Every job of your keys, including a trial key you added to your account, is on [your account page under Jobs](/account#jobs): status, route, file, verdict, how long it took, the report, and the full result as JSON. It updates by itself while a job runs.

## What it is not

- Not a longer analysis. The routes keep their limits: the voice and signal routes decode at most about 7.7 minutes of 48 kHz stereo (lower sample rates and mono fit longer); the loudness routes handle long files. See [the limits](/api#keys).
- Not cheaper. A job is the call it runs.
- Not a queue you manage. There is no priority and no cancel; a job runs at once, and you read it when it suits you.
