{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiopod-ai/json-schema/audiopod-ai-midi-from-stems-request-schema.json",
  "title": "MidiFromStemsRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiopod-ai-midi-api-openapi.yml#/components/schemas/MidiFromStemsRequest",
  "properties": {
    "stems": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Stems"
    },
    "options": {
      "anyOf": [
        {
          "$ref": "#/$defs/MidiConvertOptions"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "$defs": {
    "MidiConvertOptions": {
      "properties": {
        "onset_threshold": {
          "type": "number",
          "maximum": 0.95,
          "minimum": 0.05,
          "title": "Onset Threshold",
          "default": 0.5
        },
        "frame_threshold": {
          "type": "number",
          "maximum": 0.95,
          "minimum": 0.05,
          "title": "Frame Threshold",
          "default": 0.3
        },
        "min_note_len_ms": {
          "type": "number",
          "maximum": 2000.0,
          "minimum": 10.0,
          "title": "Min Note Len Ms",
          "default": 128.0
        },
        "tempo_bpm": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 300.0,
              "minimum": 30.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Tempo Bpm"
        },
        "engine": {
          "type": "string",
          "enum": [
            "general",
            "piano",
            "vocal"
          ],
          "title": "Engine",
          "default": "general"
        }
      },
      "type": "object",
      "title": "MidiConvertOptions",
      "description": "Tunables forwarded to the audio-to-MIDI engine. Thresholds override the\nper-stem presets; the bass octave-correction is always-on and not exposed."
    }
  }
}