Skip to main content
POST
Submit a Generate MIDI task
  1. After submission, a task_id will be returned. If you provided a callback_url, when the task status becomes finished or failed, a POST request will be sent to the callback_url.
  2. Regardless of whether callback_url is provided, you can retrieve the response result through the unified Query Music Detail endpoint.
Generate MIDI extracts per-instrument note data from a song that has already been separated with Separate Vocals or Stem Split.

Models

  • generate-midi — Extract MIDI note data from a separated track

Required parameters

  • task_id (string): task_id of a finished Separate Vocals or Stem Split task from your account.

Output

The result is returned as midi_data by Query Music Detail and in the music callback. midi_data is a JSON object with state and an instruments array as returned by the provider. No downloadable .mid file is produced.

Examples

  • Generate MIDI from a separation task — sets task_id.

Notes

  • Run Separate Vocals or Stem Split first. Other task types are rejected with “It is necessary to first call the separation of vocals and instruments.”
  • An unknown task_id, or one from another account, returns “Parent task not found”.
  • Validation errors are returned in the response body with code: 400 even when the HTTP status is 200. Always check code.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Public model identifier.

Available options:
generate-midi
input
object
required
callback_url
string<uri>

Optional webhook URL for task completion or failure notifications.

Response

Task submitted successfully

code
integer
required
Example:

200

data
object
required