By Mirelo Team |
Audio-to-MIDI Pro API: convert a full mix into MIDI for every instrument
The Audio-to-MIDI Pro API is Mirelo's audio to MIDI API for developers. It gives you Audio-to-MIDI Pro, our most accurate music transcription model, as a call you can make from your own product. Send one complete music recording, with no stems needed, and the API returns one editable MIDI track per detected instrument, the detected tempo and meter, and MusicXML, with a cleaner engraving and printable PDF sheet music as opt-ins. Each file can run up to 30 minutes.
Your users upload audio, and you hand back parts they can edit.
What the Audio-to-MIDI Pro API returns
A single request to the Audio-to-MIDI Pro API returns up to four kinds of output from the same transcription:
| Output | What it contains | When to use it |
|---|---|---|
| MIDI | One track per detected instrument, with the performance's tempo map and detected meter | Anything the user will edit, play back, or open in a DAW |
| Notes | The transcribed events as data, with pitch, timing, velocity and instrument | Custom piano rolls, analysis, your own rendering |
| Musical context | Tempo and meter, with the key and chord symbols written into the MusicXML. tempo_source and meter_source say whether each was detected or is a default | Labelling, search, tempo matching |
| Notation | MusicXML, with an optimized engraving and score PDFs available | Score views, printable parts, tablature |
The optimized engraving and the PDFs are opt-in, so users who only want MIDI and notes are not slowed down by an engraving step they never asked for, and users who want a score no longer have to build a notation pipeline themselves.
How to convert audio to MIDI with the Mirelo API
Converting a song to MIDI with the Audio-to-MIDI Pro API takes one request per song:
- Submit the audio - send one music file by URL or as an uploaded asset. MP3, WAV, FLAC, OGG and AAC are supported. Audio-to-MIDI Pro takes a complete mix, so there is no stem separation step on your side
- Optionally pass an instrument list - if you already know what is playing, set
instrumentsto condition the transcription on it instead of relying on detection - Optionally request notation - set
optimize_musicxmlfor a cleaner engraving, orscore_pdfsfor sheet music, which includes the cleaner engraving. Both are off by default - Read the result - per-instrument MIDI, the note data, the MusicXML and the detected tempo and meter come back together. While a job is still processing, each poll also returns the notes transcribed so far
Your first request
Requests authenticate with an API key as a Bearer token. Files up to 12 minutes can use POST /v2/audio-to-midi/v1.0/sync, which waits for the result. For longer files, batches and serverless functions, start a job and poll it.
This request starts a job for a file at a public URL, with score_pdfs on. Set MIRELO_API_KEY in your environment. The API Playground builds the same request for your own settings:
# Replace <UNIQUE_KEY> with a new UUID for each new job.
# On retry, reuse the key and exact body.
curl https://quixotic-toad-888.convex.site/v2/audio-to-midi/v1.0/jobs \
--request POST \
--header "Authorization: Bearer $MIRELO_API_KEY" \
--header 'Idempotency-Key: <UNIQUE_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"audio": {
"type": "url",
"audio_url": "https://example.com/song.mp3"
},
"score_pdfs": true
}'The response includes a job_id. Poll GET /v2/audio-to-midi/v1.0/jobs/{job_id} until status is succeeded or errored. To send a local file instead, upload it with POST /v2/assets and pass { "type": "asset", "asset_id": "…" } as audio.
A succeeded result always has midi_url and notes. musicxml_url is missing when no notes were found, and score_pdfs when the sheet music could not be rendered, so check for both.
Each file can be up to 30 minutes and 100 MiB. For long recordings, send a compressed format such as MP3, since an uncompressed WAV can reach the size limit first. The API reference covers every parameter, response field and error.
How Audio-to-MIDI Pro compares with single-instrument transcription
Audio-to-MIDI Pro transcribes a full mix in one request. Most transcription tools take one sound at a time, so a band recording has to be split into stems first and sent one part at a time.
| Single-instrument transcription | Audio-to-MIDI Pro | |
|---|---|---|
| Input | One isolated vocal, piano or guitar take | A complete mix with every instrument playing |
| Stem separation | Needed first, one stem per instrument | Not needed |
| Requests per song | One per stem | Only one |
| Output | One MIDI track | One MIDI track per detected instrument, plus tempo and meter |

Audio-to-MIDI Pro compared with the previous MuScriptor audio to MIDI model across several evaluation sets, with the largest gain on drums.
What is new in the Audio-to-MIDI Pro API
The Audio-to-MIDI Pro API fixes the two reliability problems that used to stop integrations before they started:
- Request timeouts - transcription requests could time out
- Long tracks hanging - tracks around 8 minutes could hang against an undocumented processing limit
Both are fixed, so if you trialled the API earlier this year and gave up on one of them, that is the thing worth re-testing.
What else changed:
| Previous Audio-to-MIDI API | Audio-to-MIDI Pro API | |
|---|---|---|
| Transcription quality | Previous model | Improves across several evaluation sets, with drums improving most |
| Notation output | Standard MusicXML | Opt-in cleaner engraving with optimize_musicxml and PDF sheet music with score_pdfs, both off by default |
| Per-file cap | 10 minutes | 30 minutes, so a full-length track fits in one job |
| Variable bitrate MP3s | Duration could be miscalculated for billing | Billed duration matches the file you sent |
The Audio-to-MIDI Pro API also runs every upload through a more robust normalization pipeline before it reaches the model, so unusual sample rates, unexpected channel counts and mislabelled or oddly encoded files no longer cause the silent upload failures that were hard to debug from your side.
What you can build with the Audio-to-MIDI Pro API
The Audio-to-MIDI Pro API fits any product that needs to turn recorded music into notes:
- Editable parts from a recording - transcribe a full mix and give users per-instrument MIDI inside your own editor or canvas
- Notation and practice tools - request the score, parts and tablature and put readable music in front of a learner
- Catalogue analysis - run transcription across a library to extract tempo, meter and per-instrument parts as structured metadata
- Transcription of anything your users record - the model takes whatever audio your product captures, so a performance your users make themselves can come back as notes
- AI music agents and assistants - give an agent the notes, instruments, tempo and meter of a recording as structured data it can read, edit and build on
One thing to design for is that transcription output is editable musical material rather than a final answer, so the products that work best on top of it give users somewhere to correct a note.
How riffle built Convert to MIDI on the Audio-to-MIDI API
riffle is a collaborative music studio in your browser that built Convert to MIDI on Mirelo's Audio-to-MIDI API. Right-click any audio on a riffle board and it becomes separate instrument tracks, with notes appearing live while the audio is still being processed.
riffle users have used it to:
- Turn loops into playable instruments - convert a loop into MIDI, then play it with any sound
- Turn a voice into an instrument - hum or sing a part and get an instrument track back
- Break tracks into MIDI layers - split a song into per-instrument parts to rework
Within six weeks of launch, nearly 1 in 11 people making music on riffle had used it, and more than a third came back to use it again.
Frequently asked questions about the Audio-to-MIDI API
Can the Mirelo API convert a full song to MIDI, or only single instruments?
Full songs. Send a complete mix to the Audio-to-MIDI Pro API and you get back a separate MIDI track for each instrument it detects, so there is no stem separation step on your side. This is what is usually called polyphonic or multi-instrument transcription.
How do I add audio to MIDI conversion to my app?
Send one music file per request to the Audio-to-MIDI Pro API and read back the per-instrument MIDI, the note data, the MusicXML and the detected tempo and meter. Use the sync endpoint for files up to 12 minutes, and the jobs endpoint for anything longer, up to 30 minutes.
Can the API turn a recording into sheet music?
Yes. Set score_pdfs and the Audio-to-MIDI Pro API returns printable sheet music alongside the MIDI: the full score, one PDF per part, and tablature for guitar and bass. If the PDFs cannot be rendered, the job still succeeds with the MIDI and MusicXML, so check for score_pdfs in the result. score_pdfs also turns on optimize_musicxml, the cleaner MusicXML engraving, which you can request on its own. Both are off by default, so a request without them returns MIDI, notes, standard MusicXML, and tempo and meter.
How accurate is Audio-to-MIDI Pro, and how is accuracy measured?
Accuracy is measured by how many notes come back with the right pitch and timing across a set of test recordings. On that measure, Audio-to-MIDI Pro improves on the previous Mirelo model across several evaluation sets, with drums improving most.
Will the MIDI open in my users' DAW?
Yes. The Audio-to-MIDI Pro API returns each track as standard MIDI with the performance's tempo map and detected meter, so it opens in Ableton, FL Studio, Logic or any other DAW.
Get started
Audio-to-MIDI Pro is live now in Mirelo Studio and through the Mirelo API. Create an API key in Mirelo Studio and send your first mix, with the full reference at mirelo.ai/api-docs and the model page at mirelo.ai/audio-to-midi.