API Documentation

Analyze audio mixes programmatically. Free tier: 3 analyses per IP. Pro tier: unlimited.

Quick Start

curl -X POST https://mixdiagnose.com/api/analyze \
  -F "file=@my-mix.wav" \
  -H "Accept: application/json"

Endpoints

POST /api/analyze

Upload an audio file and get a full mix analysis with Mix Score, LUFS, frequency balance, stereo width, and severity-graded recommendations.

Parameters

ParameterTypeRequiredDescription
filemultipart/form-dataYesAudio file — .wav, .mp3, .flac, .m4a, .aac, .ogg, .aiff, .au, .wma, or a video file (.mp4, .mov, .avi, .webm, .mkv). Max 50 MB.
genrequery stringNoForce a genre profile (e.g. hiphop, rock, electronic). Omit to auto-detect.
access_tokenquery stringNoA logged-in account token. Subscribers bypass the free limit.

Response (200 OK)

{
  "session_id": "a1b2c3d4-...",
  "analysis": {
    "mix_score": 72,
    "grade": "B",
    "score_label": "Almost there",
    "loudness": {
      "lufs_integrated": -14.2,
      "true_peak_dB": -1.3,
      "crest_factor": 7.5
    },
    "frequency_balance": {
      "sub_bass": "good",
      "low_mid": "bad",
      "midrange": "warn",
      "high_mid": "good",
      "high": "good",
      "air": "good"
    },
    "stereo_width": {
      "mean": 62.5,
      "assessment": "moderate"
    }
  },
  "severity_map": {
    "Critical": 1,
    "Moderate": 2,
    "Minor": 3,
    "Ideal": 6
  },
  "recommendations": [
    {
      "severity": "Critical",
      "issue": "Low-mid buildup at 300 Hz",
      "fix": "Cut 2-3 dB at 300 Hz on the mix bus or reduce the offending tracks"
    }
  ],
  "share_url": "/r/abc12345",
  "report_card_url": "/api/report-card/session_id"
}

GET /api/shared/{short_id}

Retrieve a previously shared analysis as JSON.

curl https://mixdiagnose.com/api/shared/abc12345

GET /r/{short_id}

Serve a shared analysis as an HTML page (for sharing links).

POST /api/share

Create a shareable short URL for an analysis. Awards 3 bonus analyses to free users.

Parameters

ParameterTypeRequiredDescription
session_idstringYesSession ID from analyze response

Python Example

import requests

# Analyze a mix
with open("my-mix.wav", "rb") as f:
    response = requests.post(
        "https://mixdiagnose.com/api/analyze",
        files={"file": ("my-mix.wav", f, "audio/wav")},
    )

data = response.json()
analysis = data["analysis"]

print(f"Mix Score: {analysis['mix_score']}/100 (Grade {analysis['grade']})")
print(f"LUFS: {analysis['loudness']['lufs_integrated']}")
print(f"True Peak: {analysis['loudness']['true_peak_dBTP']} dBTP")

for rec in data.get("recommendations", []):
    print(f"[{rec['severity']}] {rec['issue']}")
    print(f"  → {rec.get('fix_label', '')}")

JavaScript Example

const formData = new FormData();
formData.append("file", fileInput.files[0]);

const response = await fetch("https://mixdiagnose.com/api/analyze", {
  method: "POST",
  body: formData,
});

const data = await response.json();
console.log(`Mix Score: ${data.analysis.mix_score}/100`);
console.log(`Grade: ${data.analysis.grade}`);

CLI / scripting

There is no packaged CLI yet — a two-line script is the honest equivalent, and it works today:

for f in *.wav; do
  curl -s -X POST https://mixdiagnose.com/api/analyze -F "file=@$f" \
    | python -c "import sys,json; a=json.load(sys.stdin)['analysis']; print(a['mix_score'], a['grade'])"
done

Rate Limits

TierLimitPrice
Free / anonymous10 analyses per IP, per month$0
Starter Pack10 analyses, one-time$5
Producer50 analyses / month$19/mo
ProUnlimited$49/mo

Supported Formats

WAV, MP3, FLAC, M4A, AAC, OGG, AIFF, AU, WMA — plus video files, from which the audio track is extracted. For best results use WAV (16-bit or 24-bit). Max 50 MB.

Mix Score Calculation

The Mix Score (0-100) is calculated by scoring 12 metrics across frequency balance, loudness, dynamics, and stereo width. Each metric is scored as good (100), warn (60), or bad (25). The final score is the average minus 8 points per Critical issue.

GradeScore RangeLabel
A85-100Release-ready
B70-84Almost there
C55-69Needs work
D40-54Major issues
F0-39Critical problems
Note: No API key is required — send the file and get JSON back. Anonymous calls draw on the same free allowance as the web app (10 analyses per IP, per month). A logged-in subscriber's access_token bypasses the limit.

Ready to build?

Start analyzing mixes in your apps, scripts, and workflows.

Try it free →