Browse API endpoints
post/master-audio

Master 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.

  1. 1

    Send the song or stem

    Pass an audio, restored, or stem ID with your loudness, genre, and output settings.

  2. 2

    Wait for mastering

    Save id and poll the mastering job until it finishes or fails.

  3. 3

    Download the mastered WAV

    Download the finished master and return it to the user or the next step in your app.

Common use cases

Choose this operation when it matches the source and result your workflow needs.

Master AI-generated songs

Restore compressed Suno, Udio, 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 60,000+ music makers

Results people rely on

I've been loving the app. The audio restoration works amazing on my suno songs

Jordi

Audio Super Resolution

Amazing tool for audio. Clean, simple, and effective. I would spend hours in RX to get the same results. Give it a try. I can save you hours of production time.

Dan Campbell ~Riffster

Love it! Makes everything crisp!
TG

The Grim Tower

Sensacional
F

Francisco

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 for contemporary music. Recommended when you want a versatile default that preserves the character of the mix.

Hip Hop

genre="hiphop"

Deep bass and punchy drums for maximum impact. Recommended for hip hop mixes that need weight, clear vocals, and controlled transients.

Techno

genre="techno"

Driving low end and crisp highs for club systems. Recommended for electronic tracks that need sustained energy and firm bass control.

Rock

genre="rock"

Dynamic midrange presence and controlled saturation. Recommended for guitar-led mixes that should stay energetic without losing punch.

R&B

genre="rnb"

Smooth, warm tones with polished vocals. Recommended for R&B mixes that need a rich low end and a clear, intimate vocal.

Trap

genre="trap"

Heavy 808s and sharp transients. Recommended for trap mixes that need hard-hitting drums and controlled sub-bass.

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

JavaScript (Node.js)
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_id
requiredstring

Source audio asset ID to master.

Example: "6c62f8e7-02a3-48c0-a5b5-5de87ed9c31a"

preset
optionalstring

Selects 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.

"universal_enhancer""constant_bpm""novasr""flashsr""dacvae""declip""dialogue_isolate""denoise""dereverb""decrowd""phantom_center""audiosr""apollo_voice""lavasr""reuse""acestep_15_xl""stable_audio_3""universr"

Default: "universal_enhancer"

stereo_mode
optionalstring

Controls how stereo material is processed. Defaults to mid_sides, which processes center and side content separately; 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, flashsr, audiosr, novasr, dacvae, and lavasr. Other presets ignore this field.

"mid_sides""left_right""mono""sides_only""mid_only"

Default: "mid_sides"

frequency_cutoff
optionalinteger

Sets the upper frequency boundary in hertz where a bandwidth-extension model starts rebuilding audio. Supported by audiosr and universr. AudioSR accepts 3000, 4000, 5000, 8000, 10000, 13000, or 16000. UniverSR accepts 4000, 6000, 8000, or 12000. Other presets ignore this field.

Default: 13000

model_name
optionalstring | null

Selects the model variant used inside the restoration preset. Supported by dereverb, dialogue_isolate, denoise, universr, acestep_15_xl, and stable_audio_3. UniverSR variants support audio/vocal super-resolution, and ACE-Step/Stable Audio variants support prompt-guided remastering. Other presets choose their model from preset and ignore this field.

"dereverb""dialogue_isolate""denoise""denoise_debleed""universr-audio""universr-audio-finetune-v1""universr-vocal""acestep-v15-xl-turbo""acestep-v15-xl-sft""stable-audio-3-medium"
reconstruction_method
optionalstring

Controls 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. Other presets ignore this field.

"multiband_ensemble""original""original_signal"

Default: "original"

strength
optionalnumber

Controls 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

prompt
optionalstring

Describes the sound that a prompt-guided model should create from the source audio. Supported by acestep_15_xl and stable_audio_3. 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_strength
optionalnumber

Controls how strongly Stable Audio 3 follows prompt relative to the reference audio. Higher values give the prompt more influence. Supported by stable_audio_3 only; other presets ignore this field. Accepts values from 0 to 10.

Default: 1

inpaint_regions
optionalarray<object> | null

Lists 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}]

stem_id
optionalstring | null

Optional source stem ID. Omit to master the full audio file.

Example: "abf8a992-1c4e-4935-93f0-197116e77e49"

use_restored
optionalboolean

Controls whether restoration runs before mastering. true uses an existing restored version or queues restoration automatically; false masters the selected source directly.

Default: true

upscaled_id
optionalstring | null

Specific restored version to use as the mastering source.

Example: "d66cf940-bf26-45bb-80f7-332f26b6859a"

source_mastered_id
optionalstring | null

Specific mastered artifact to use as the mastering source.

Example: "f5db8e4b-2e74-4198-a8de-0c3a398620e9"

source_temporary_mix_key
optionalstring | null

Short-lived Current Main Mix or Current All Stems Mix R2 source key.

selection
optionalobject | null

Limits mastering to a start and end time in seconds. Omit it to master the full selected source.

Example: {"end":42,"start":12.5}

bit_depth
optionalinteger

Output WAV bit depth for the mastered audio.

1624

Default: 24

hq_streaming_format
optionalstring

Selects the compressed format generated for browser playback and streaming alongside the mastered WAV output.

"aac""mp3""flac"

Default: "aac"

target_lufs
optionalnumber

Sets the integrated loudness target in LUFS for the mastered output, or 'auto' to maximize loudness up to -1 dBTP true peak.

Default: -14

genre
optionalstring

Selects the tonal mastering profile. modern is the default balanced profile for contemporary releases.

Default: "modern"

Successful response

200Successful Response
id
requiredstring

ID of the queued mastered audio version.

Example: "f5db8e4b-2e74-4198-a8de-0c3a398620e9"

status
requiredstring

Queueing status for the mastering job.

Example: "processing"

message
requiredstring

Human-readable queueing result.

Example: "Mastering queued"

Errors

A missing or invalid X-API-Key returns an authentication error. Validation errors use the declared 422 response below.
422Validation Error
detail
optionalarray<object>

No description provided.

Next steps