Audio-to-MIDI Pro

Preflight

Apply max(1, round(seconds × 2.5)) to the caller-supplied duration_ms, subtract eligible paid detection credits when instrument_detection_id is supplied, and return that credit estimate with the estimated processing time. This route does not download the audio, start a transcription, reserve a detection, or deduct credits. The create routes validate the source and bill the server-probed media duration, so the final charge can differ when duration_ms does not match the file.

get/v2/audio-to-midi/v1.0/preflight

Request

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

Query parameters

duration_msinteger required

Caller-supplied estimate of the input duration in milliseconds (max 1,800,000). Priced as submitted, without downloading the audio; the create routes bill the server-probed duration instead.

instrument_detection_idstring

Optional paid instrument detection to include in the estimate. Eligible credits reduce this quote without reserving or consuming the detection. Create validates the source before applying those credits.

Response

Credit cost and ETA

creditsinteger required

Exact credit cost — matches what will be deducted on success

billing_mode'metered' | 'unmetered' required

unmetered organization requests are affordable without evaluating credit fields

credits_requiredinteger required

Exact credits required by the request

credits_availableinteger nullable required

Reservation-aware financial capacity, including enabled overage headroom; non-ready provisioning can still block spending

credit_shortfallinteger required

Additional financial capacity required; 0 means capacity covers the request, but non-ready provisioning can still block it

recovery_action'enable_overage' | 'increase_overage_limit' | 'view_plans' | 'contact_support' nullable required

Server-recommended next step; honor a non-null action even when credit_shortfall is 0

recovery_urlstring uri nullable required

Destination for recovery_action

provisioning_state'ready' | 'pending' | 'stalled' nullable required

Included-credit grant state. Any non-ready state blocks spending; pending waits for provisioning_deadline and stalled follows recovery_action.

provisioning_deadlineinteger nullable required

ms epoch when pending provisioning becomes stalled

estimated_msinteger required

Estimated completion time in milliseconds (p90 calibrated)

Changes

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