Skip to main content

Get MIDI Generation Details

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

Query Parameters

ParameterTypeRequiredDescription
taskIdstringYesThe task ID returned from the MIDI generation request

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.
Rate limits and quotas are enforced by Apikley and may differ from upstream providers.

OpenAPI

suno-api/suno-api.json get /api/v1/midi/record-info
openapi: 3.0.0
info:
  title: Suno API
  description: Apikley Suno API Documentation
  version: 1.0.0
  contact:
    name: Technical Support
    email: [email protected]
servers:
  - url: https://api.apikley.ru
    description: API Server
security:
  - BearerAuth: []
paths:
  /api/v1/midi/record-info:
    get:
      summary: Get MIDI Generation Details
      description: >-
        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
      operationId: get-midi-details
      parameters:
        - name: taskId
          in: query
          required: true
          schema:
            type: string
          description: The task ID returned from the MIDI generation request
          example: 5c79****be8e
      responses:
        '200':
          description: MIDI generation task details retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: Response status code
                    example: 200
                  msg:
                    type: string
                    description: Response message
                    example: success
                  data:
                    type: object
                    description: MIDI generation task details
                    properties:
                      taskId:
                        type: string
                        description: MIDI generation task ID
                      recordTaskId:
                        type: integer
                        description: Internal record task ID
                      audioId:
                        type: string
                        description: Audio ID from the vocal separation task
                      callbackUrl:
                        type: string
                        description: Callback URL provided when creating the task
                      completeTime:
                        type: integer
                        description: Task completion timestamp (milliseconds)
                      midiData:
                        type: object
                        description: >-
                          Complete MIDI data containing detected instruments and
                          notes
                        properties:
                          state:
                            type: string
                            description: Processing state
                            example: complete
                          instruments:
                            type: array
                            description: >-
                              Array of detected instruments with their MIDI
                              notes
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                  description: Instrument name
                                notes:
                                  type: array
                                  description: Array of MIDI notes for this instrument
                                  items:
                                    type: object
                                    properties:
                                      pitch:
                                        type: integer
                                        description: MIDI note number (0-127)
                                      start:
                                        type: number
                                        description: Note start time in seconds
                                      end:
                                        type: number
                                        description: Note end time in seconds
                                      velocity:
                                        type: number
                                        description: Note velocity/intensity (0-1)
                      successFlag:
                        type: integer
                        description: >-
                          Task status flag: 0 = Pending, 1 = Success, 2 = Failed
                          to create task, 3 = MIDI generation failed
                      createTime:
                        type: integer
                        description: Task creation timestamp (milliseconds)
                      errorCode:
                        type: string
                        nullable: true
                        description: Error code if task failed
                      errorMessage:
                        type: string
                        nullable: true
                        description: Error message if task failed
              example:
                code: 200
                msg: success
                data:
                  taskId: 5c79****be8e
                  recordTaskId: -1
                  audioId: e231****-****-****-****-****8cadc7dc
                  callbackUrl: https://example.callback
                  completeTime: 1760335255000
                  midiData:
                    state: complete
                    instruments:
                      - name: Drums
                        notes:
                          - pitch: 73
                            start: 0.036458333333333336
                            end: 0.18229166666666666
                            velocity: 1
                          - pitch: 61
                            start: 0.046875
                            end: 0.19270833333333334
                            velocity: 1
                      - name: Electric Bass (finger)
                        notes:
                          - pitch: 44
                            start: 7.6875
                            end: 7.911458333333333
                            velocity: 1
                  successFlag: 1
                  createTime: 1760335251000
                  errorCode: null
                  errorMessage: null
        '500':
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: Server Error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All APIs require authentication via Bearer Token.


        Get API Key:

        1. Visit [API Key Management Page](https://app.apikley.ru/keys) to get your
        API Key


        Usage:

        Add to request header:

        Authorization: Bearer APIKLEY_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


To find navigation and other pages in this documentation, fetch the llms.txt file at: https://docs.apikley.ru/llms.txt