Production
Mixanalytic API Documentation
Official API reference for https://mixanalytic.com. Use this API to upload audio and receive AI-powered mix analysis with selectable modules and compact/full response modes.
Base URL: https://mixanalytic.com/api
Authentication
Send your API key in the X-API-Key header for every request.
curl -X GET "https://mixanalytic.com/api/test-data" \
-H "X-API-Key: YOUR_API_KEY"
- 401 missing/invalid key
- 403 free-tier key without API access
- 429 rate limit exceeded
Scopes: write is for Mix Analyzer upload/analysis. content reads redacted content research data. content_write saves non-public content drafts. Content scopes are admin-only.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /api/test-data | Connectivity/auth check. |
| POST | /api/upload | Upload + analyze audio file. |
| GET | /api/analyze/<file_id> | Re-analyze by file ID (if original file still exists). |
| GET | /api/content/analysis-feed | Admin-only redacted research feed for content agents. |
| POST | /api/content/drafts | Admin-only draft save/update endpoint for content agents. |
| GET | /api/ai-stats?days=30 | Usage stats for AI analysis. |
Upload Request
POST/api/upload
| Field | Type | Required | Notes |
|---|---|---|---|
| file | multipart file | Yes | Allowed: mp3, wav, flac, m4a, aac, ogg. Max 100MB. |
| modules | string/list | No | Defaults to all modules if omitted. |
| detail_level | string | No | full (default) or summary. |
Invalid detail_level returns 400. Oversized files return 413.
Module Selection
Control which analysis modules are returned (and computed) with modules.
Formats supported:
- Comma-separated string: modules=frequency_balance,clarity,mood
- JSON array string: modules=["frequency_balance","clarity","mood"]
- Repeated key (query/form): modules=frequency_balance&modules=clarity
- All modules: modules=all or modules=*
| Module | Description |
|---|---|
| frequency_balance | 7-band frequency and balance scoring. |
| dynamic_range | Dynamic range, crest factor, PLR. |
| stereo_field | Width/phase/correlation metrics. |
| clarity | Spectral clarity and definition metrics. |
| harmonic_content | Key and harmonic complexity. |
| transients | Attack, transient density, and low-end punch data. |
| 3d_spatial | Height/depth/width consistency. |
| surround_compatibility | Mono compatibility + phase score. |
| headphone_optimization | Headphone playback optimization score. |
| speaker_optimization | Speaker playback optimization score. |
| genre | Genre classification and confidence. |
| voice | Vocal presence and voice characteristics. |
| instruments | Instrument detection and arrangement info. |
| mood | Mood profile with energy/valence. |
| keywords | Semantic keywords and tags. |
| loudness | Measure LUFS, true peak, clipping, and streaming targets so your master stays loud enough without distortion, codec peaks, or platform surprises. |
| noise | Measure noise floor, mains hum, hiss, and artifacts so you can clean recordings before they get louder, brighter, and harder to hide in mastering. |
| format_quality | Check lossy encoding, spectral cutoff, and bit depth so you do not master from degraded MP3, AAC, or upscaled audio sources by mistake before release. |
| reference | Reference |
| visualizations | URLs for generated analysis visual assets. |
| ai_insights | LLM-generated summary and recommendations. |
Response Size Control
Use detail_level:
- full (default): full payload
- summary: compact payload for frontend/mobile clients
Examples
1) Upload + full analysis
curl -X POST "https://mixanalytic.com/api/upload" \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@/path/to/track.mp3"
2) Upload + selected modules
curl -X POST "https://mixanalytic.com/api/upload" \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@/path/to/track.mp3" \
-F "modules=frequency_balance,dynamic_range,genre,mood,keywords"
3) Upload + selected modules + summary payload
curl -X POST "https://mixanalytic.com/api/upload" \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@/path/to/track.mp3" \
-F "modules=frequency_balance,stereo_field,clarity,ai_insights" \
-F "detail_level=summary"
4) Test endpoint
curl -X GET "https://mixanalytic.com/api/test-data" \
-H "X-API-Key: YOUR_API_KEY"
5) Client-side JavaScript
const formData = new FormData();
formData.append('file', fileInput.files[0]);
formData.append('modules', 'frequency_balance,dynamic_range,mood,ai_insights');
formData.append('detail_level', 'summary');
const res = await fetch('https://mixanalytic.com/api/upload', {
method: 'POST',
headers: { 'X-API-Key': 'YOUR_API_KEY' },
body: formData
});
const data = await res.json();
console.log(data.analysis, data.returned_modules);
Standard Response Metadata
Successful analysis responses include:
- requested_modules
- returned_modules
- detail_level
- available_modules
Error Codes
| Status | Meaning | Typical Cause |
|---|---|---|
| 400 | Bad Request | Invalid module/detail_level, missing file field, empty file. |
| 401 | Unauthorized | Missing, invalid, or expired API key. |
| 403 | Forbidden | API access not allowed for account tier. |
| 404 | Not Found | /api/analyze/<file_id> file no longer available (privacy deletion). |
| 413 | Payload Too Large | File larger than 100MB. |
| 429 | Rate Limit Exceeded | Too many requests per minute/hour/day. |
| 500 | Server Error | Analysis/runtime failure. |
Frontend Notes
- For web/mobile clients, prefer detail_level=summary.
- Request only modules needed for first render to reduce latency and payload.
- Handle 429 and 500 with retry + backoff.
- Do not expose long-lived production keys in public bundles.