# Normalise audio loudness

Make audio louder or quieter to hit a standard loudness in LUFS, without clipping. Measures first, then adjusts.

- Endpoint: `POST https://setget.net/v1/tools/audio-normalize` with JSON `{"input": {...}}` (add `"wait": 30` to hold the reply until the job finishes)
- MCP: `run_tool` with `slug` = `audio-normalize`
- Page: https://setget.net/tools/audio-normalize

## Files in, files out

This is a file tool. Its file inputs take file references, not file contents and not web addresses.

- Get a reference by uploading: `curl -T FILE https://setget.net/drop/` prints a line `ref  <id>/f1`. Or `POST https://setget.net/v1/drops` with `{"files":[{"name","size"}]}`, PUT the bytes to the returned `upload.url` with the listed headers, and use the file's `ref`. Over MCP use the `drop` tool. A file under about 700 KB can also be sent in place as a `data:<type>;base64,<content>` URI.
- Uploads are at most 100 MB per file, are readable by anyone with the link, and expire (one hour by default). Programs are refused.
- The tool runs as a job. The reply is `{"tool", "ms", "result", "files", "job"}`: `result` is JSON, and every result file comes back in `files` as `{"name", "size", "content_type", "kind", "url", "ref"}`. Download it from `url`, or pass `ref` as the input of another file tool.
- A job still running when the wait ends answers 202 with `job`. Follow it with `GET https://setget.net/v1/jobs/<id>?wait=30`, or stream progress from `GET https://setget.net/v1/jobs/<id>/events` (over MCP: the `job` tool). A person can watch it at `job.url`.

## Inputs

- `file` (required, file, a file reference such as `DROP_ID/f1`, accepts audio): The audio file.
- `target` (optional, number, default `-16`, range -40..-5): Loudness to aim for, in LUFS. -16 suits podcasts, -14 music streaming, -23 broadcast.
- `true_peak` (optional, number, default `-1.5`, range -9..0): Highest peak allowed in the result, in dB. -1.5 leaves room for MP3 and AAC encoding.
- `format` (optional, string, one of `mp3`, `wav`, `ogg`, `opus`, `flac`, `m4a`): Format of the result: mp3, wav, ogg, opus, flac or m4a. Leave empty to keep the format of the upload.

## Example 1: Level to -16 LUFS

Upload first. Each placeholder below stands for the reference of one upload: `DROP_ID/f1` = [sample.wav](https://setget.net/static/samples/sample.wav).

```json
{"input":{"file":"DROP_ID/f1"},"wait":30}
```

## Example 2: Broadcast level, -23 LUFS

Upload first. Each placeholder below stands for the reference of one upload: `DROP_ID/f1` = [sample.mp3](https://setget.net/static/samples/sample.mp3).

```json
{"input":{"file":"DROP_ID/f1","target":-23,"true_peak":-2},"wait":30}
```

**What is LUFS?** A measure of how loud a recording sounds to people over its whole length. Podcast apps aim for about -16 LUFS, music streaming services about -14, and European broadcasters -23.

**Will it distort?** No. When raising the volume would push peaks past the limit, the loudest moments are turned down a little instead of clipping. The result says when that happened.

**Why does the result differ slightly from my target?** Loudness is measured over time, and very short or very dynamic recordings cannot always land exactly on the number. The result reports the loudness actually reached.
