Usage Guide
- Convert separated audio tracks into structured MIDI data containing pitch, timing, and velocity information
- Requires a completed vocal separation task ID (from the Vocal Removal API)
- Generates MIDI note data for multiple detected instruments including drums, bass, guitar, keyboards, and more
- Ideal for music transcription, notation, remixing, or educational analysis
- Best results on clean, well-separated audio tracks with clear instrument parts
Prerequisites
You must first use the Vocal & Instrument Stem Separation API to separate your audio before generating MIDI.
Parameter Reference
Name | Type | Description |
---|---|---|
taskId | string | Required. Task ID from a completed vocal separation |
callBackUrl | string | Required. URL to receive MIDI generation completion notifications |
Developer Notes
- The callback will contain detailed note data for each detected instrument
- Each note includes:
pitch
(MIDI note number),start
(seconds),end
(seconds),velocity
(0-1) - Not all instruments may be detected - depends on audio content
- Billing: Check current per-call credit costs at https://kie.ai/billing
Authorizations
All APIs require authentication via Bearer Token.
Get API Key:
- Visit API Key Management Page to get your API Key
Usage: Add to request header: Authorization: Bearer YOUR_API_KEY
Note:
- Keep your API Key secure and do not share it with others
- If you suspect your API Key has been compromised, reset it immediately in the management page
Body
application/json
Task ID from a completed vocal separation. This should be the taskId returned from the Vocal & Instrument Stem Separation endpoint.
Example:
"5c79****be8e"
The URL to receive MIDI generation task completion updates. Required for all MIDI generation requests.
- System will POST task status and MIDI note data to this URL when generation completes
- Callback includes detailed note information for each detected instrument with pitch, timing, and velocity
- Your callback endpoint should accept POST requests with JSON payload containing MIDI data
- For detailed callback format and implementation guide, see MIDI Generation Callbacks
- Alternatively, use the Get MIDI Generation Details endpoint to poll task status
Example:
"https://example.callback"