KIE.AI
old-model
  • All Model
  • old-model
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
Support
old-model
  • All Model
  • old-model
old-model
  • All Model
  • old-model
Suno API
4o Image APIVeo3.1 APIRunway APIFlux Kontext API
Suno API
4o Image APIVeo3.1 APIRunway APIFlux Kontext API
  1. Vocal Removal
  • Suno API Quickstart
  • Music Generation
    • Music Cover Generation Callbacks
    • Music Generation Callbacks
    • Music Extension Callbacks
    • Audio Upload and Cover Callbacks
    • Audio Upload and Extension Callbacks
    • Add Instrumental Callbacks
    • Add Vocals Callbacks
    • Replace Music Section Callbacks
    • Generate Music
      POST
    • Extend Music
      POST
    • Upload And Cover Audio
      POST
    • Upload And Extend Audio
      POST
    • Add Instrumental to Music
      POST
    • Add Vocals to Music
      POST
    • Get Music Task Details
      GET
    • Get Timestamped Lyrics
      POST
    • Boost Music Style
      POST
    • Generate Music Cover
      POST
    • Get Cover Generation Details
      GET
    • Replace Music Section
      POST
    • Generate Persona
      POST
    • Generate Mashup Music
      POST
    • Recovery Audio
      POST
  • Lyrics Generation
    • Lyrics Generation Callbacks
    • Generate Lyrics
    • Get Lyrics Task Details
  • WAV Conversion
    • Convert to WAV Callbacks
    • Convert to WAV Format
    • Get WAV Conversion Details
  • Vocal Removal
    • Audio Separation Callbacks
    • MIDI Generation Callbacks
    • Vocal & Instrument Stem Separation
      POST
    • Get Vocal Separation Details
      GET
    • Generate MIDI from Audio
      POST
    • Get MIDI Generation Details
      GET
  • Music Video Generation
    • Music Video Generation Callbacks
    • Create Music Video
    • Get Music Video Details
  • Sounds Generation
    • Generate sounds
  • voice
    • Suno Voice Generation Callback
    • Suno Voice Validation Phrase Callback
    • Suno Voice Generate Verification Phrase API
    • Suno Voice Get Verification Phrase API
    • Suno Voice Create Custom Voice API
    • Suno Voice Get Custom Voice Records
    • Suno Voice Regenerate Verification Phrase
    • Suno Voice Check Availability API
  1. Vocal Removal

Generate MIDI from Audio

POST
/api/v1/midi/generate
Convert separated audio tracks into MIDI format with detailed note information for each instrument.

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#

Required
You must first use the Vocal & Instrument Stem Separation API to separate your audio before generating MIDI.

Parameter Reference#

NameTypeDescription
taskIdstringRequired. Task ID from a completed vocal separation.
callBackUrlstringRequired. URL to receive MIDI generation completion notifications.
audioIdstringOptional. Specifies which separated audio track to generate MIDI from. This audioId can be obtained from the originData array in the Get Vocal Separation Details endpoint response. Each item in originData contains an id field that can be used here. If not provided, MIDI will be generated from all separated tracks.

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.
Pricing: Check current per-call credit costs at https://kie.ai/pricing.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
MIDI generation task created successfully
Bodyapplication/json

🔴500Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.kie.ai/api/v1/midi/generate' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "taskId": "5c79****be8e",
  "callBackUrl": "https://example.callback",
  "audioId": "8ca376e7-******-08aaf2c6dd27"
}'
Response Response Example
200 - 成功示例
{
    "code": 200,
    "msg": "success",
    "data": {
        "taskId": "5c79****be8e"
    }
}
Previous
Get Vocal Separation Details
Next
Get MIDI Generation Details
Built with