---
title: "Get MIDI Generation Details"
method: GET
path: "/api/v1/midi/record-info"
---

# Get MIDI Generation Details

`GET /api/v1/midi/record-info`

Retrieve detailed information about a MIDI generation task including complete note data for all detected instruments.

### Usage Guide
- Use this endpoint to check the status of a MIDI generation task
- Access complete MIDI note data once processing is complete
- Retrieve detailed instrument and note information
- Track processing progress and any errors that may have occurred

### Status Descriptions
- `successFlag: 0`: Pending - Task is waiting to be executed
- `successFlag: 1`: Success - MIDI generation completed successfully
- `successFlag: 2`: Failed - Failed to create task
- `successFlag: 3`: Failed - MIDI generation failed
- Check errorCode and errorMessage fields for failure details

### Developer Notes
- The midiData field contains the complete MIDI data as a structured object with instruments and notes
- MIDI data includes all detected instruments with pitch, timing, and velocity for each note
- MIDI generation records are retained for 14 days
- **Important**: When using vocal separation with `type: split_stem`, the midiData may be empty

## Query parameters

- `taskId` string, required

## Response `200`

MIDI generation task details retrieved successfully

- object
  - `code` integer — Response status code
  - `msg` string — Response message
  - `data` object — MIDI generation task details
    - `taskId` string — MIDI generation task ID
    - `recordTaskId` integer — Internal record task ID
    - `audioId` string — Audio ID from the vocal separation task
    - `callbackUrl` string — Callback URL provided when creating the task
    - `completeTime` integer — Task completion timestamp (milliseconds)
    - `midiData` object — Complete MIDI data containing detected instruments and notes
      - `state` string — Processing state
      - `instruments` object[] — Array of detected instruments with their MIDI notes
        - `name` string — Instrument name
        - `notes` object[] — Array of MIDI notes for this instrument
          - `pitch` integer — MIDI note number (0-127)
          - `start` number — Note start time in seconds
          - `end` number — Note end time in seconds
          - `velocity` number — Note velocity/intensity (0-1)
    - `successFlag` integer — Task status flag: 0 = Pending, 1 = Success, 2 = Failed to create task, 3 = MIDI generation failed
    - `createTime` integer — Task creation timestamp (milliseconds)
    - `errorCode` string, nullable — Error code if task failed
    - `errorMessage` string, nullable — Error message if task failed

## Other responses

- `500` — Server error

---

[API](https://skmtc.net/sunoapi/apis/file-upload-api.md) · [All operations](https://skmtc.net/sunoapi/apis/file-upload-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sunoapi/file-upload-api/versions/22d45ee33a4a/schema)
