openapi: 3.1.0
info:
  title: platphorm-audio API
  version: "0.1.0"
  description: In-browser audio operations and PlatPhorm platform discovery for an audio workbench.
servers:
  - url: https://audio.platphormnews.com
security:
  - BearerAuth: []
  - PlatPhormApiKey: []
paths:
  /api/health:
    get:
      summary: Health status
      responses:
        "200":
          description: Health payload
  /api/v1/health:
    get:
      summary: Health status alias
      responses:
        "200":
          description: Health payload
  /api/docs:
    get:
      summary: Service discovery documentation
      responses:
        "200":
          description: API docs payload
  /api/route-compliance:
    get:
      summary: Route compliance state
      responses:
        "200":
          description: Compliance matrix
  /api/platform/report:
    post:
      summary: Generate platform-grade report
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [action]
              properties:
                action:
                  type: string
                  enum: ["generate"]
      security:
        - BearerAuth: []
        - PlatPhormApiKey: []
      responses:
        "200":
          description: Protected report payload
        "401":
          description: Missing or invalid API key
  /api/mcp:
    post:
      summary: MCP JSON-RPC 2.0 endpoint
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        "200":
          description: JSON-RPC method result
components:
  securitySchemes:
    BearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: "Use Authorization: Bearer $PLATPHORM_API_KEY"
    PlatPhormApiKey:
      type: apiKey
      in: header
      name: X-PlatPhorm-API-Key
      description: "Shared platform key for protected actions"
