{
 "openapi": "3.0.3",
 "info": {
  "title": "Music understanding (commercial): MOSS-Music-8B-Thinking",
  "version": "2026-11-21",
  "description": "Curated ZeroGPU tool from the ZeroGPU lineup catalog. Calls go straight to the upstream Space hugging-apps/moss-music-8b-thinking; send your own HF token as a bearer token so the call uses your ZeroGPU quota."
 },
 "servers": [
  {
   "url": "https://hugging-apps-moss-music-8b-thinking.hf.space"
  }
 ],
 "x-zerogpu": {
  "category": "Music and sound",
  "slot": "Music understanding",
  "need": "Caption, tag or answer questions about a piece of music.",
  "role": "commercial",
  "space": "hugging-apps/moss-music-8b-thinking",
  "space_url": "https://huggingface.co/spaces/hugging-apps/moss-music-8b-thinking",
  "model": "MOSS-Music-8B-Thinking",
  "license": "Apache-2.0",
  "license_class": "open",
  "gpu_seconds_booked": "180",
  "notes": "Commercially usable, with MCP.",
  "caveats": "",
  "lineup_call": "/analyze(audio_path, question, \u2026) \u2192 text",
  "api_style": "v1",
  "mcp_url": "https://hugging-apps-moss-music-8b-thinking.hf.space/gradio_api/mcp/"
 },
 "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/analyze": {
   "post": {
    "description": "Caption, tag or answer questions about a piece of music. Step 1 of 2: returns {\"event_id\"}; then GET /gradio_api/call/analyze/{event_id} reads an SSE stream whose `event: complete` data is the JSON output array (`event: error` on failure). Upstream: https://huggingface.co/spaces/hugging-apps/moss-music-8b-thinking. License: Apache-2.0. \n\nUpstream description: Analyze a music audio clip with a text prompt.\nReturns, in order: Analysis: list[dict(role: str, metadata: dict(title: str, id: int | str, parent_id: int | str, log: str, duration: float, status: Literal['pending', 'done']) | None, content: str | dict(file: filepath, alt_text: str | None) | dict(component: str, value: Any, constructor_args: dict(str, Any), props: dict(str, Any)), options: list[dict(value: str, label: str)] | None)]; value_20: str",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "data"
        ],
        "properties": {
         "data": {
          "type": "array",
          "minItems": 1,
          "maxItems": 6,
          "items": {},
          "description": "Positional inputs, in this order:\n0. audio_path: filepath (required)\n1. question: str (default \"Please give a detailed musical description of this clip.\")\n2. max_new_tokens: float (default 1024)\n3. temperature: float (default 1.0)\n4. top_p: float (default 1.0)\n5. top_k: float (default 50)"
         }
        }
       }
      }
     }
    },
    "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": "question",
      "schema": {
       "type": "string"
      },
      "required": false,
      "default": "Please give a detailed musical description of this clip."
     },
     {
      "name": "max_new_tokens",
      "schema": {
       "type": "number",
       "description": "numeric value between 64 and 2048"
      },
      "required": false,
      "default": 1024
     },
     {
      "name": "temperature",
      "schema": {
       "type": "number",
       "description": "numeric value between 0.0 and 1.5"
      },
      "required": false,
      "default": 1.0
     },
     {
      "name": "top_p",
      "schema": {
       "type": "number",
       "description": "numeric value between 0.1 and 1.0"
      },
      "required": false,
      "default": 1.0
     },
     {
      "name": "top_k",
      "schema": {
       "type": "number",
       "description": "numeric value between 1 and 100"
      },
      "required": false,
      "default": 50
     }
    ],
    "operationId": "music_music_understanding_commercial",
    "tags": [
     "Music and sound"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ],
    "summary": "Music understanding (commercial): MOSS-Music-8B-Thinking",
    "responses": {
     "200": {
      "description": "Job accepted.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "event_id"
         ],
         "properties": {
          "event_id": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/gradio_api/call/analyze/{event_id}": {
   "get": {
    "summary": "Read the result stream for /analyze",
    "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_commercial_result",
    "tags": [
     "Music and sound"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ]
   }
  }
 }
}