# Audio Cleanup & Transcription in n8n

You can run any Audo AI tool inside an **n8n** workflow—cloud or self-hosted—using n8n's built-in **HTTP Request** node. There is no custom community node to install, and you can test every endpoint without an API key before switching on whole-file processing.

## Endpoints for n8n workflows

| Workflow step | Endpoint | Response format in n8n | Free tier (no API key) | Whole-file price (with API key) |
|---|---|---|---|---|
| Remove background noise (keeps natural voice) | `POST https://audo.ai/api/try/remove-noise` | `File` (binary audio/video) | First 1 min, 3x/day | $0.03/min ($1.80/hr) |
| Enhance voice & remove echo (`/audio-enhancer`) | `POST https://audo.ai/api/try/enhance-voice` | `File` (binary audio/video) | First 1 min, 3x/day | $0.03/min ($1.80/hr) |
| Transcribe with speaker labels | `POST https://audo.ai/api/try/transcribe` | `Autodetect` / `JSON` (or `File` for `srt`, `vtt`, `txt`) | First 2 min, 3x/day | $0.02/min ($1.20/hr) |
| Measure LUFS, true peak, noise floor & silences | `POST https://audo.ai/api/try/media-info` | `JSON` | Whole file, 20x/day | Free ($0.00) |
| Normalize loudness (`-16` or `-14 LUFS`) | `POST https://audo.ai/api/try/loudness` | `File` (binary audio/video) | First 1 hr, 10x/day | $0.01/min ($0.60/hr) |
| Shorten long silences | `POST https://audo.ai/api/try/remove-silence` | `File` (binary audio/video) | First 1 hr, 10x/day | $0.01/min ($0.60/hr) |

## Recipe 1: Send a public file URL (JSON body)

When your recording is already at a public HTTPS URL (for example an S3 presigned GET URL, Cloudflare R2, Dropbox, or a webhook payload), send a JSON body:

1. Add an **HTTP Request** node in n8n.
2. Set **Method** to `POST`.
3. Set **URL** to `https://audo.ai/api/try/enhance-voice` (or `/api/try/remove-noise`, `/api/try/transcribe`, `/api/try/media-info`).
4. Toggle **Send Body** on, set **Body Content Type** to `JSON`, and set **Specify Body** to `Using JSON`:

```json
{
  "url": "{{ $json.audioUrl }}",
  "noise_reduction": 100,
  "auto_volume": true,
  "output_format": "same"
}
```

5. Under **Options → Response**, set **Response Format** to `File` for audio/video outputs (so the cleaned file sits in n8n's binary `data` property for the next node), or `JSON` for `/api/try/transcribe` and `/api/try/media-info`.

## Recipe 2: Send an n8n binary file (`multipart/form-data`)

When a previous n8n node downloaded or recorded a file into binary property `data` (such as Google Drive, S3, Telegram, Slack, or Read/Write Files from Disk):

1. Add an **HTTP Request** node and set **Method** to `POST`.
2. Set **URL** to `https://audo.ai/api/try/remove-noise` (or `/api/try/enhance-voice` / `/api/try/transcribe`).
3. Toggle **Send Body** on and set **Body Content Type** to `Form-Data`.
4. Under **Body Parameters**:
   - Add parameter 1: **Parameter Type** = `n8n Binary File`, **Name** = `file`, **Input Data Field Name** = `data`.
   - Add parameter 2 (optional): **Parameter Type** = `Form Data`, **Name** = `noise_reduction`, **Value** = `100`.
   - For `/api/try/transcribe`, add **Name** = `speaker_labels`, **Value** = `true`, and **Name** = `format`, **Value** = `json` (or `srt`, `vtt`, `txt`).
5. Under **Options → Response**, set **Response Format** to `File` (for audio/video) or `JSON` (for transcription JSON).

## Whole files with an API key (`Authorization: Bearer`)

Without an API key, requests run on the free tier and process the first part of each file. To process full files in production n8n workflows:

1. Create an API key on the [API page](https://audo.ai/keys?utm_source=markdown&utm_medium=agent) (and optionally turn on **Auto-refill** there so unattended workflows never run out of balance).
2. In your n8n **HTTP Request** node, set **Authentication** to `Generic Credential Type` → `Header Auth`, with **Name** `Authorization` and **Value** `Bearer YOUR_AUDO_API_KEY`.
3. Add an `Idempotency-Key` header set to `{{ $execution.id }}-{{ $itemIndex }}` so n8n retries never create duplicate jobs.
4. Pass `free: false` and a positive `max_credits` cap (1 credit = 1¢, so `max_credits: 300` caps the run at $3.00):

```json
{
  "url": "{{ $json.audioUrl }}",
  "noise_reduction": 100,
  "free": false,
  "max_credits": 300
}
```

## Handling `202 Accepted` async polling for long episodes

The `/api/try/<tool>` endpoint waits up to 30 seconds and returns `200 OK` with the finished file or transcript when a short recording completes in time. For long podcast episodes, interviews, or videos, use async polling so n8n never times out:

1. **HTTP Request (Start Job):** Add header `Prefer: respond-async`. The node immediately returns `202 Accepted` JSON containing `statusUrl` (`https://audo.ai/api/try/jobs/<job_id>?t=<token>`) and `status`.
2. **HTTP Request (Poll Status):** Send `GET {{ $json.statusUrl }}&wait=25`. Passing `wait=25` long-polls on Audo's side for up to 25 seconds until the job finishes or changes state.
3. **IF node:** Check whether `{{ $json.status }}` equals `succeeded`:
   - **True branch (`succeeded`):** Add an **HTTP Request** node with `GET {{ $json.outputs[0].url }}` and **Response Format** = `File` to download the finished audio, video, or transcript file.
   - **False branch:** Check if `{{ $json.status }}` is `queued` or `running`, wait 5 seconds with a **Wait** node, and loop back to **Poll Status**. If `status` is `failed`, route to your error alert (failed jobs are never charged).

## Related docs

- [Free API and REST API reference](https://audo.ai/docs/api?utm_source=markdown&utm_medium=agent)
- [Noise Removal & Audio Cleanup API](https://audo.ai/docs/noise-removal-api?utm_source=markdown&utm_medium=agent)
- [Free LUFS Loudness & Media Info API](https://audo.ai/docs/lufs-api?utm_source=markdown&utm_medium=agent)
- [Audio MCP Server](https://audo.ai/docs/mcp?utm_source=markdown&utm_medium=agent)
