/master-audioMaster music for streaming in your app
Send a song or stem. Choose the loudness target, genre, and output quality. Your app or agent gets a mastered WAV with louder, more balanced audio.
How this endpoint works
Use this API to add automatic mastering to a music app, upload flow, release tool, or batch script. It can master the original song, a restored version, or one stem. Set a target LUFS or use automatic loudness while keeping true peak below clipping.
Common use cases
Choose this operation when it matches the source and result your pipeline needs.
Master AI-generated songs
Restore compressed Suno, Mureka, or other AI music first, then make it louder and more balanced.
Prepare tracks for streaming
Apply consistent loudness and tonal balance before users publish their music.
Master uploads automatically
Add a reusable mastering step to a web app, desktop tool, backend, or batch process.
Processing used by 80,000+ music makers
Results people rely on
“The flash upscaler mixed with the composite mix system makes it super easy to get closer to a song master that I'm happy with”
M.
Restoration and mastering
“I love the interface. I love the bulk upload/download features. They're a life saver! Also I just realized that Apollo is magic and I don't even need to use denoise. Apollo somehow removes noise much more naturally. So I'm actually spending way less credits than I expected.”
IMDK
“It can bring back clarity without making everything sound too artificial or overprocessed. Stem separation is also surprisingly clean.”
R.
Audio restoration and stem separation
“Does amazing job in restoring Audio from bad quality MP3s and badly extracted audio from CDs. Always my go to for audio restoration.”
N.
MP3 and CD audio restoration
Hear mastering results
These masters were shared by users of the same processing system exposed through the API.
Choose how the master should sound
Modern
genre="modern"Balanced, clean mastering that preserves the character of your mix. A good starting point if you're not sure which style to choose.
Hip Hop
genre="hiphop"Give the bass more weight and the drums more impact without losing vocal clarity. For hip-hop mixes where the bass lacks depth or the drums lack punch.
Techno
genre="techno"Driving low end and crisp highs for club sound systems. Keep your track energetic and control the bass throughout.
Rock
genre="rock"Bring out the guitars in the midrange with controlled saturation. Keep your rock mixes energetic and punchy.
R&B
genre="rnb"A warmer, softer sound with rich low end and a clear vocal. For R&B mixes where the vocal should feel intimate and stay prominent.
Trap
genre="trap"Heavy 808s, hard-hitting drums, and sharp attacks. Give your trap mixes more impact while keeping the deepest lows under control.
Choose the target loudness
-8 LUFS
target_lufs="-8"Maximum punch and energy for high-impact releases. Recommended for pop, electro, and metal tracks that need competitive loudness.
-9.5 LUFS
target_lufs="-9.5"Competitive industry-standard loudness while retaining good audio quality. Recommended for rock, R&B, and rap.
-14 LUFS
target_lufs="-14"Streaming-oriented loudness with more preserved dynamic range. Recommended for jazz, classical, funk, and music that should breathe.
Auto (-1 dBTP true peak, max LUFS)
target_lufs="auto"Finds the loudest master that stays at or below -1 dBTP true peak instead of matching a fixed LUFS target.
Code examples
Server-side example
import { writeFile } from "node:fs/promises";
const API_URL = "https://api.neuralanalog.com";
const API_KEY = process.env.NEURALANALOG_API_KEY;
async function waitForCompletion(objectType, objectId) {
while (true) {
const response = await fetch(`${API_URL}/status/${objectType}/${objectId}`, {
headers: { "X-API-Key": API_KEY },
});
if (!response.ok) {
throw new Error(`Status check failed with ${response.status}`);
}
const status = await response.json();
if (status.is_failed) {
throw new Error(status.error_message || `${objectType} processing failed`);
}
if (status.is_complete) {
return status;
}
await new Promise((resolve) => setTimeout(resolve, 5000));
}
}
const requestResponse = await fetch(`${API_URL}/master-audio`, {
method: "POST",
headers: {
"X-API-Key": API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"audio_id": "6c62f8e7-02a3-48c0-a5b5-5de87ed9c31a",
"use_restored": true,
"target_lufs": -14,
"genre": "modern",
"bit_depth": 24
}),
});
if (!requestResponse.ok) {
throw new Error(`Mastering request failed with ${requestResponse.status}`);
}
const result = await requestResponse.json();
const jobId = result["id"];
const status = await waitForCompletion("mastered", jobId);
const downloadResponse = await fetch(
`${API_URL}/download/mastered/${jobId}`,
{ headers: { "X-API-Key": API_KEY }, redirect: "follow" },
);
if (!downloadResponse.ok) {
throw new Error(`Download failed with ${downloadResponse.status}`);
}
await writeFile("mastered.wav", Buffer.from(await downloadResponse.arrayBuffer()));Parameters
Send the API key from a trusted server. Never expose it in client-side JavaScript.
JSON request body
audio_idSource audio asset ID to master.
Example: "6c62f8e7-02a3-48c0-a5b5-5de87ed9c31a"
presetSelects the restoration model or repair process to run. Each preset supports its own parameters; fields that do not apply to the selected preset are ignored.
Default: "universal_enhancer"
stereo_modeControls how stereo material is processed. Defaults to mid_sides, which processes center and side content separately, except for universr, which defaults to left_right; left_right processes channels independently, mono folds to mono, and sides_only/mid_only process one component while preserving the other. Supported by universal_enhancer, apollo_voice, universr, reuse, ap_bwe, flashsr, audiosr, novasr, dacvae, and lavasr. Other presets ignore this field.
Default: "mid_sides"
quantize_precisionSnaps detected beats to this musical subdivision when using constant_bpm. Other restoration presets ignore this field.
Default: "1/16"
frequency_cutoffSets the upper frequency boundary in hertz where a bandwidth-extension model starts rebuilding audio. Supported by audiosr and universr, in 100 Hz steps up to 22000. AudioSR accepts 3000 or higher. UniverSR accepts 4000 or higher; it runs its model at the highest of 4000, 6000, 8000, or 12000 that does not exceed the cutoff and keeps generated audio only above the cutoff. AP-BWE accepts 4000, 6000, 8000, or 12000 with ap-bwe-48k (default 8000), and 1000, 2000, or 4000 with ap-bwe-16k (default 4000); each cutoff selects the model trained on audio band-limited to it. Other presets ignore this field.
Default: 13000
model_nameSelects the model variant used inside the restoration preset. For denoise and decrowd, sam_audio requires an explicit prompt. Also supported by declip (simple_declip or betterdeclipper), dereverb, dialogue_isolate, universr, ap_bwe, acestep_15_xl, and stable_audio_3. UniverSR variants support audio/vocal super-resolution, AP-BWE variants output 48 kHz (ap-bwe-48k, default) or 16 kHz (ap-bwe-16k) speech, and ACE-Step/Stable Audio variants support prompt-guided remastering. Other presets choose their model from preset and ignore this field.
modeBetter Declipper mode: auto analyzes flat or smeared clipping, limiter ceilings, and soft shoulders; hard restores ceilings without a soft region; soft always restores a soft shoulder below detected ceilings; limiter restores a deeper soft region and can add distortion (experimental); legacy uses the previous plateau-or-knee detection. Other restoration models ignore this field.
Default: "auto"
reconstruction_methodControls how generated high frequencies are combined with the source audio. Supported by audiosr and universr. For AudioSR, multiband_ensemble low-passes the original audio at frequency_cutoff minus 1000 Hz, high-passes the AudioSR output at the same crossover, then sums both bands. original_signal uses frequency_cutoff as a hard final spectrum boundary: original source bins below the cutoff and generated bins at or above it. For UniverSR, original preserves the legacy reconstruction path, while original_signal keeps the bandwidth-limited input for model conditioning but takes the final low-frequency bins from the original 48 kHz source signal. seamless_reconstruction_soft uses the same source low band and caps each generated frequency bin's energy at the maximum source energy in the 500 Hz below frequency_cutoff, per time frame and processed channel. Other presets ignore this field.
Default: "original"
strengthControls processing intensity from subtle cleanup to aggressive restoration. Higher values preserve less of the degraded source. Supported by acestep_15_xl and stable_audio_3. Other presets ignore this field.
Default: 0.95
promptDescribes the sound that a prompt-guided model should create from the source audio. Supported by acestep_15_xl, stable_audio_3, and yue_2. Other presets ignore this field. Keep the prompt under 256 characters.
Default: "high quality studio recording CD quality"
Example: "clean studio master, full bandwidth, natural transients"
prompt_strengthControls how strongly Stable Audio 3 or YuE 2 follows the text prompt. Higher values give the prompt more influence. YuE 2 maps this to cfg_scale while retaining its melody score conditioning. Supported by stable_audio_3 and yue_2; other presets ignore this field. Accepts values from 0 to 10.
Default: 1
instrumental_onlyFor YuE 2, merge the vocal and instrumental melodies into one instrumental part and request generation without vocals. Vocal notes take priority where melodies overlap. Other presets ignore this field.
Default: false
inpaint_regionsLists source time ranges to regenerate while preserving the rest of the input audio. Each range requires start and end times in seconds. Supported by stable_audio_3 only; other presets ignore this field. Omit it to run an ordinary audio-to-audio remix.
Example: [{"end":8,"start":4}]
spansOptional time hints for SAM Audio denoise and decrowd variants.
source_upscaled_idRestored version to restore again before mastering; requires use_restored and differs from upscaled_id, which is mastered directly.
source_transcription_idTranscription rendered into source_temporary_mix_key; retained as source lineage.
source_effects_appliedWhether the rendered source includes FX; false preserves live FX when selecting the output.
stem_idOptional source stem ID. Omit to master the full audio file.
Example: "abf8a992-1c4e-4935-93f0-197116e77e49"
use_restoredControls whether restoration runs before mastering. true uses an existing restored version or queues restoration automatically; false masters the selected source directly.
Default: true
upscaled_idSpecific restored version to use as the mastering source.
Example: "d66cf940-bf26-45bb-80f7-332f26b6859a"
source_mastered_idSpecific mastered artifact to use as the mastering source.
Example: "f5db8e4b-2e74-4198-a8de-0c3a398620e9"
source_temporary_mix_keyShort-lived Current Main Mix or Current All Stems Mix R2 source key.
selectionLimits mastering to a start and end time in seconds. Omit it to master the full selected source.
Example: {"end":42,"start":12.5}
bit_depthOutput WAV bit depth for the mastered audio; 32 is float.
Default: 24
hq_streaming_formatSelects the compressed format generated for browser playback and streaming alongside the mastered WAV output.
Default: "aac"
target_lufsSets the integrated loudness target in LUFS for the mastered output, or 'auto' to maximize loudness up to -1 dBTP true peak.
Default: -14
max_true_peakSets the true peak ceiling in dBTP and maximizes loudness up to it. When provided, it replaces target_lufs.
Example: -1
genreSelects the tonal mastering profile. modern is the default balanced profile for contemporary releases.
Default: "modern"
Successful response
idID of the queued mastered audio version.
Example: "f5db8e4b-2e74-4198-a8de-0c3a398620e9"
statusQueueing status for the mastering job.
Example: "processing"
messageHuman-readable queueing result.
Example: "Mastering queued"
Errors
X-API-Key returns an authentication error. Validation errors use the declared 422 response below.detailNo description provided.