Audio-to-MIDI Pro

Start async transcription

Start an Audio-to-MIDI Pro job and return immediately. The v1.0 URL versions the API contract, not the model. The result’s model field identifies the producing Audio-to-MIDI release; retain it with your transcript. Input audio can be up to 30 minutes and 100 MiB. The byte limit is independent, so some uncompressed files reach it before the duration limit; use a compressed format for long sources. After success the server bills max(1, round(seconds × 2.5)) over the duration it probes from the downloaded media, so the charge can differ from a preflight quote based on an inaccurate duration_ms. A key can have at most 5 Audio-to-MIDI jobs in flight by default, independently of its v3 generation jobs; approved keys may have a higher configured ceiling. Poll the returned job_url until status is succeeded or errored. Prefer this route for long files, batches, serverless functions, and high-volume integrations. Idempotency-Key is not supported here; resubmitting the create request can start and bill a separate job.

post/v2/audio-to-midi/v1.0/jobs

Request

  • Base URL: https://api.mirelo.ai
  • URL: https://api.mirelo.ai/v2/audio-to-midi/v1.0/jobs
  • Auth: HTTP bearer

Request body

timing'performance' | 'quantized'

How note times are written. performance (default) keeps the take as played and describes it with a tempo map. quantized snaps notes onto the detected beats, and is honoured only when the beat grid is reliable enough to move notes onto — otherwise the response reports performance with a fallback_reason.

subdivision'automatic' | 'straight_sixteenths' | 'eighth_triplets' | 'sixteenth_triplets' | 'swing_eighths'

Rhythmic grid shared by MIDI and MusicXML. Automatic selects triplet timing only when onset fit clears the confidence gate; sparse or ambiguous material stays on straight sixteenths.

optimize_musicxmlboolean

Request more conventional, readable sheet music, with improved staff assignment, voices, beaming, rests, and spacing. This affects only the MusicXML output; it does not improve transcription accuracy or change MIDI or note data. This option adds processing time and is disabled by default. Synchronous requests wait for the score, and asynchronous jobs remain processing until it is ready. The result's musicxml_optimized reports whether the optimized score was delivered; when it could not be, the standard MusicXML is returned instead.

page_size'a4' | 'letter'

Paper layout used by MusicXML and sheet music PDFs: a4 (210 x 297 mm) or letter (8.5 x 11 in). Defaults to a4.

score_pdfsboolean

Also deliver engraved sheet music as PDFs: the full score, one PDF per part, tablature for eligible fretted parts, and one ZIP containing those PDFs. Implies optimize_musicxml, since the PDFs are set from the MusicXML you receive. Adds processing time and is disabled by default. When PDF rendering is unavailable the response omits score_bundle_url, score_manifest_url, and score_pdfs and the MIDI and MusicXML are still returned.

instrumentsstring[]

Every instrument in the recording. Optional: without it the model transcribes whatever it hears. A list is treated as exhaustive. An instrument missing from it cannot appear in the output, and a name that is not playing makes the model split a real part in two, so a partial list is worse than none. Order does not matter. An unknown name is a 400. Accepted names: acoustic_piano, electric_piano, chromatic_percussion, organ, acoustic_guitar, clean_electric_guitar, distorted_electric_guitar, acoustic_bass, electric_bass, violin, viola, cello, contrabass, orchestral_harp, timpani, string_ensemble, synth_strings, voice, orchestra_hit, trumpet, trombone, tuba, french_horn, brass_section, soprano_and_alto_sax, tenor_sax, baritone_sax, oboe, english_horn, bassoon, clarinet, flutes, synth_lead, synth_pad, drums.

instrument_detection_idstring

The instrument_detection_id from POST /v2/audio-to-midi/v1.0/instruments whose suggestions you reviewed. It must be yours, and audio must be an asset with the same content (the detection's asset_id works). When the transcription succeeds the detection counts as used, and if the detection was charged, its credits come off this transcription's charge.

Example request

{
  "audio": {
    "type": "url",
    "audio_url": "https://example.com/song.mp3"
  },
  "timing": "quantized",
  "subdivision": "automatic",
  "time_signature": {
    "numerator": 6,
    "denominator": 8
  },
  "tempo": {
    "mode": "fixed",
    "bpm": 120
  },
  "optimize_musicxml": true,
  "instruments": [
    "acoustic_guitar",
    "voice"
  ]
}

Response

Async job accepted

job_idstring uuid required

Unique identifier for the async job

job_urlstring required

Relative URL to poll for job status, e.g. /v2/text-to-sfx/{version}/jobs/{job_id}. Append to your API base URL to form the full polling URL.

estimated_msinteger required

Estimated completion time in milliseconds

estimated_completion_atstring date-time required

ISO 8601 estimated completion timestamp

Changes

No recorded changes to this operation across all 1 revision of this API.