/from-fileUpload audio for restoration, mastering, stems, or MIDI
Send an audio file with multipart form data. Your app or agent gets an audio ID, waits for the upload to finish, then chooses what to do with the track.
How this endpoint works
Use this endpoint when a user already has an audio file on their device or in your storage. It gives file uploads the same restoration, mastering, stem-splitting, MIDI, and download options as link downloads. Let your HTTP client set the multipart boundary.
Common use cases
Choose this operation when it matches the source and result your workflow needs.
Add audio upload to your app
Accept an audio file from a user and send it to the API without making it public first.
Process a local music library
Upload tracks from a desktop tool, internal service, or batch script for automatic processing.
Support links and files
Give users the same processing choices whether they paste a link or upload a file.
Processing used by 60,000+ music makers
Results people rely on
“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
“Love it! Makes everything crisp!”
The Grim Tower
“Sensacional”
Francisco
“Highend services!”
Tommi, Studionet
Code examples
Server-side example
import { readFile, 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 form = new FormData();
form.append(
"audio",
new Blob([await readFile("./my-audio.mp3")], { type: "audio/mpeg" }),
"my-audio.mp3",
);
form.append("file_source", "from_file");
const requestResponse = await fetch(`${API_URL}/from-file`, {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: form,
});
if (!requestResponse.ok) {
throw new Error(`Upload failed with ${requestResponse.status}`);
}
const result = await requestResponse.json();
const jobId = result["audio_id"];
const status = await waitForCompletion("audio", jobId);
const downloadResponse = await fetch(
`${API_URL}/download/audio/${jobId}`,
{ headers: { "X-API-Key": API_KEY }, redirect: "follow" },
);
if (!downloadResponse.ok) {
throw new Error(`Download failed with ${downloadResponse.status}`);
}
await writeFile("original.wav", Buffer.from(await downloadResponse.arrayBuffer()));Parameters
Send the API key from a trusted server. Never expose it in client-side JavaScript.
Multipart form fields
audioEncoded audio file to upload.
file_sourceSource identifier for the uploaded file. Used to categorize the file in the user's library.
Default: "from_file"
Successful response
audio_idID of the uploaded audio asset.
Example: "6c62f8e7-02a3-48c0-a5b5-5de87ed9c31a"
statusStatus of the uploaded audio asset. Returns 'in_progress' while the file is being finalized in the background.
Example: "in_progress"
messageHuman-readable status message for the upload request.
Example: "File uploaded successfully"
Errors
X-API-Key returns an authentication error. Validation errors use the declared 422 response below.detailNo description provided.