Developer API — audio mastering in one request
Embed automatic mastering (LUFS / True Peak per ITU-R BS.1770-5) into your product: music distribution, track generators, batch processing of entire catalogs. One HTTP request — a finished master.
Quick start — 3 steps
Sign up and buy tokens
1 token = 1 master. Tokens are sold in packs; track analysis is free.
Create an API key in your profile
Open magicmaster.pro/profile (with an active token balance) and create a key in the API section.
Send a file
Pass the key in the X-API-Key header. Upload a track, get a job_id, poll the status and download the result.
Example: curl
Mastering a single file: start the job, check the status, download the result.
curl -X POST https://magicmaster.pro/api/v2/master \
-H "X-API-Key: mm_YOUR_KEY" \
-F "file=@track.wav" \
-F "style=edm" \
-F "target_lufs=-9" \
-F "out_format=wav"
# → {"job_id": "..."}; then:
curl https://magicmaster.pro/api/master/status/JOB_ID -H "X-API-Key: ..."
curl -o master.wav https://magicmaster.pro/api/master/result/JOB_ID -H "X-API-Key: ..."
Безопасные ретраи: передавайте заголовок Idempotency-Key
(любая уникальная строка на запуск, например UUID) — повтор запроса с тем же
ключом вернёт тот же job_id и не спишет второй токен,
даже если первый ответ потерялся из-за обрыва сети.
curl -X POST https://magicmaster.pro/api/v2/master \
-H "X-API-Key: mm_YOUR_KEY" \
-H "Idempotency-Key: 4f7c2e10-9b1d-4e5a-8c3f-2a6d0e8b1c9d" \
-F "file=@track.wav" -F "style=edm"Example: Python
The same flow with requests: upload the file and poll the status until it is done.
import requests, time
API = "https://magicmaster.pro"
HEADERS = {"X-API-Key": "mm_YOUR_KEY"}
with open("track.wav", "rb") as f:
r = requests.post(
f"{API}/api/v2/master",
headers=HEADERS,
files={"file": f},
data={"style": "edm", "target_lufs": -9, "out_format": "wav"},
)
r.raise_for_status()
job_id = r.json()["job_id"]
while True:
s = requests.get(f"{API}/api/master/status/{job_id}", headers=HEADERS).json()
if s["status"] == "done":
break
time.sleep(3)
audio = requests.get(f"{API}/api/master/result/{job_id}", headers=HEADERS)
with open("master.wav", "wb") as out:
out.write(audio.content)
print(s["after_lufs"], s["true_peak_db"])Endpoints
| Endpoint | Description | Cost |
|---|---|---|
POST/api/v2/analyze |
LUFS, True Peak and a genre hint for the uploaded file. | Free |
POST/api/v2/master |
Masters a single track, returns a job_id. | 1 token |
POST/api/v2/batch |
Up to 10 files per request. album_mode=1 — album mode that preserves relative loudness; intensity 0.5–1.5 — compression density. | 1 token / file |
POST/api/v2/multipreview |
Multi-preview: a 24-second snippet is rendered in 4 styles in parallel (~20 s). Optional styles — JSON array of 2–6 styles. Audio: GET /api/master/preview/{id}/{style}. | Free (6/day) |
POST/api/v2/master/stems |
Stem mastering: 2–8 stems of one track (files[]) are summed with per-stem gains (gains_db — JSON array of dB, ±24) and mastered as a single track. Different sample rates and lengths are aligned automatically. | 1 token |
POST/api/v2/clean |
Express AI-trace cleanup without mastering: removes the Suno/Udio digital fingerprint (HF steganography, block artifacts); loudness and character stay untouched. Params: sensitivity 0–1, out_format. | Free |
GET/api/master/status/{id} |
Job status and result metrics. | Free |
GET/api/master/result/{id} |
Download the finished master. | Free |
GET/api/v2/chain/default?lang=en |
Description of the default processing chain (RU/EN). | Free |
Master parameters
style— genre preset, 23 presets: edm, rock, hip-hop, pop and more.target_lufs— target integrated loudness, e.g. −14 for streaming or −9 for a club master.out_format— output format: wav, mp3, flac, opus or aac.intensity— genre compression density from 0.5 (gentler) to 1.5 (denser), default 1.0.album_mode— batch only: set to 1 to preserve the relative loudness of album tracks.- PRO parameters (
denoise,deesserand more) — see the interactive OpenAPI documentation at /docs.
What status returns
after_lufs— integrated loudness of the result (LUFS).true_peak_db— true peak of the result (dBTP).codec_check— an honest loudness and peak check after encoding to the chosen codec.tonal_analysis— tonal balance across frequency bands.lufs_timeline— loudness graph over the course of the track.input_clipping— clipping detected in the source and De-clipper activity.album_lufs_offset— the track's loudness offset in album mode.intensity— the compression density that was applied.
Limits and fairness
- 1 token = 1 master. No API subscriptions — you only pay for processed tracks.
- Up to 10 active API keys per account; any key can be revoked at any time.
- Files are processed in memory and are not stored on the server after the result is delivered.
- The full interactive specification (OpenAPI / Swagger) is available at /docs.
FAQ
How do I get an API key?
Sign up at magicmaster.pro, buy token packs in Wallet, and create a key in your profile. Pass the key in the X-API-Key header; up to 10 keys can be active at once.
How much does one master cost via the API?
1 token = 1 master. Track analysis (POST /api/v2/analyze) is free. Tokens are sold in packs — see current prices on the pricing page.
Which formats are supported?
WAV, MP3 and FLAC are accepted as input. The output format is set by the out_format parameter: wav, mp3, flac, opus or aac — with an honest post-codec loudness check (codec_check).
What are album_mode and intensity?
album_mode=1 in a batch request enables album mode: the relative loudness of the tracks is preserved via a single loudness offset for the whole release. intensity (0.5–1.5) controls the genre compression density: 0.5 — softer and airier, 1.0 — the genre standard, 1.5 — denser and louder.