POST /api/v1/analyze/file

Analyze an uploaded audio file.

Supported formats: MP3, M4A, WAV, FLAC, OGG, AAC, WebM, Opus.

curl example:

curl -X POST https://lufs.space:8445/api/v1/analyze/file \
  -H "X-API-Key: lufs_your_key" \
  -F "[email protected]"

Python example:

import requests

with open("track.mp3", "rb") as f:
    response = requests.post(
        "https://lufs.space:8445/api/v1/analyze/file",
        headers={"X-API-Key": "lufs_your_key"},
        files={"file": ("track.mp3", f, "audio/mpeg")},
    )

data = response.json()
print(f"BPM: {data['bpm']}, Key: {data['key']}, Hz: {data['hz']}")

Last updated