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, .aiff, .ogg)

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"Crest Factor: {analysis['loudness']['crest_factor']} dB")

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

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 Tool

pip install mixdiagnose
mixdiagnose analyze my-mix.wav

Rate Limits

TierLimitPrice
Free3 analyses per IP$0
ProducerUnlimited$19/mo
ProUnlimited + batch$49/mo
StudioUnlimited + API key$99/mo

Supported Formats

WAV, MP3, FLAC, M4A, AIFF, OGG. For best results use WAV (16-bit or 24-bit).

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: The API is free for 3 analyses per IP address. For unlimited access and API key authentication, upgrade to Producer tier or above.

Ready to build?

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

Try it free →