{
 "openapi": "3.0.3",
 "info": {
  "title": "Music understanding (default): Music Flamingo",
  "version": "2026-11-21",
  "description": "Curated ZeroGPU tool from the ZeroGPU lineup catalog. Calls go straight to the upstream Space nvidia/music-flamingo; send your own HF token as a bearer token so the call uses your ZeroGPU quota."
 },
 "servers": [
  {
   "url": "https://nvidia-music-flamingo.hf.space"
  }
 ],
 "x-zerogpu": {
  "category": "Music and sound",
  "slot": "Music understanding",
  "need": "Caption, tag or answer questions about a piece of music.",
  "role": "default",
  "space": "nvidia/music-flamingo",
  "space_url": "https://huggingface.co/spaces/nvidia/music-flamingo",
  "model": "Music Flamingo",
  "license": "NVIDIA non-commercial",
  "license_class": "nc",
  "gpu_seconds_booked": "60",
  "notes": "The strongest open music-understanding model.",
  "caveats": "",
  "lineup_call": "/infer(audio_path, youtube_url, prompt_text) \u2192 text",
  "api_style": "v1"
 },
 "components": {
  "securitySchemes": {
   "hfToken": {
    "type": "http",
    "scheme": "bearer",
    "description": "Your own Hugging Face token (read scope is enough). It is sent only to the upstream Space and bills that call to your account's ZeroGPU quota. Without it the call runs on the small anonymous quota."
   }
  },
  "schemas": {}
 },
 "paths": {
  "/gradio_api/call/infer": {
   "post": {
    "description": "Caption, tag or answer questions about a piece of music. Step 1 of 2: returns {\"event_id\"}; then GET /gradio_api/call/infer/{event_id} reads an SSE stream whose `event: complete` data is the JSON output array (`event: error` on failure). Upstream: https://huggingface.co/spaces/nvidia/music-flamingo. License: NVIDIA non-commercial. \n\nUpstream description: \nReturns, in order: Model Response: str",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "data"
        ],
        "properties": {
         "data": {
          "type": "array",
          "minItems": 2,
          "maxItems": 3,
          "items": {},
          "description": "Positional inputs, in this order:\n0. audio_path: filepath (required)\n1. youtube_url: str (required)\n2. prompt_text: str (default \"Describe this track in full detail - tell me the genre, tempo, and key, then dive into the instruments, production style, and overall mood it creates.\")"
         }
        }
       }
      }
     }
    },
    "x-gradio-parameters": [
     {
      "name": "audio_path",
      "schema": {
       "type": "object",
       "required": [
        "path",
        "meta"
       ],
       "description": "A file. Set path to a public https URL (or a path returned by POST /gradio_api/upload on the same Space) and meta to {\"_type\": \"gradio.FileData\"}.",
       "properties": {
        "path": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "orig_name": {
         "type": "string"
        },
        "meta": {
         "type": "object",
         "properties": {
          "_type": {
           "type": "string",
           "enum": [
            "gradio.FileData"
           ]
          }
         }
        }
       }
      },
      "required": true,
      "default": null
     },
     {
      "name": "youtube_url",
      "schema": {
       "type": "string"
      },
      "required": true,
      "default": null
     },
     {
      "name": "prompt_text",
      "schema": {
       "type": "string"
      },
      "required": false,
      "default": "Describe this track in full detail - tell me the genre, tempo, and key, then dive into the instruments, production style, and overall mood it creates."
     }
    ],
    "operationId": "music_music_understanding",
    "tags": [
     "Music and sound"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ],
    "summary": "Music understanding (default): Music Flamingo",
    "responses": {
     "200": {
      "description": "Job accepted.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "event_id"
         ],
         "properties": {
          "event_id": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/gradio_api/call/infer/{event_id}": {
   "get": {
    "summary": "Read the result stream for /infer",
    "description": "Server-sent events. The final `event: complete` carries a JSON array of outputs; `event: error` means the call failed.",
    "parameters": [
     {
      "name": "event_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "SSE stream",
      "content": {
       "text/event-stream": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "operationId": "music_music_understanding_result",
    "tags": [
     "Music and sound"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ]
   }
  }
 }
}