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-dataConnectivity/auth check.
POST/api/uploadUpload + analyze audio file.
GET/api/analyze/<file_id>Re-analyze by file ID (if original file still exists).
GET/api/content/analysis-feedAdmin-only redacted research feed for content agents.
POST/api/content/draftsAdmin-only draft save/update endpoint for content agents.
GET/api/ai-stats?days=30Usage stats for AI analysis.

Upload Request

POST/api/upload

Field Type Required Notes
filemultipart fileYesAllowed: mp3, wav, flac, m4a, aac, ogg. Max 100MB.
modulesstring/listNoDefaults to all modules if omitted.
detail_levelstringNofull (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_balance7-band frequency and balance scoring.
dynamic_rangeDynamic range, crest factor, PLR.
stereo_fieldWidth/phase/correlation metrics.
claritySpectral clarity and definition metrics.
harmonic_contentKey and harmonic complexity.
transientsAttack, transient density, and low-end punch data.
3d_spatialHeight/depth/width consistency.
surround_compatibilityMono compatibility + phase score.
headphone_optimizationHeadphone playback optimization score.
speaker_optimizationSpeaker playback optimization score.
genreGenre classification and confidence.
voiceVocal presence and voice characteristics.
instrumentsInstrument detection and arrangement info.
moodMood profile with energy/valence.
keywordsSemantic keywords and tags.
loudnessMeasure LUFS, true peak, clipping, and streaming targets so your master stays loud enough without distortion, codec peaks, or platform surprises.
noiseMeasure noise floor, mains hum, hiss, and artifacts so you can clean recordings before they get louder, brighter, and harder to hide in mastering.
format_qualityCheck lossy encoding, spectral cutoff, and bit depth so you do not master from degraded MP3, AAC, or upscaled audio sources by mistake before release.
referenceReference
visualizationsURLs for generated analysis visual assets.
ai_insightsLLM-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
400Bad RequestInvalid module/detail_level, missing file field, empty file.
401UnauthorizedMissing, invalid, or expired API key.
403ForbiddenAPI access not allowed for account tier.
404Not Found/api/analyze/<file_id> file no longer available (privacy deletion).
413Payload Too LargeFile larger than 100MB.
429Rate Limit ExceededToo many requests per minute/hour/day.
500Server ErrorAnalysis/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.