{
  "openapi": "3.0.3",
  "info": {
    "title": "TopAI Sovereign Enterprise AI Gateway API",
    "version": "1.0.0",
    "description": "Authoritative OpenAPI specification for TopAI Gateway: 400 deterministic micro-services and 4 cumulative packs."
  },
  "servers": [
    {
      "url": "https://topaigateway.com",
      "description": "Production Anycast Gateway"
    }
  ],
  "paths": {
    "/v1/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Liveness and compliance status",
        "responses": {
          "200": {
            "description": "Gateway is healthy and operational",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/extract": {
      "post": {
        "operationId": "extractMarkdown",
        "summary": "Clean HTML scraper returning pure semantic markdown [API-01]",
        "responses": {
          "200": {
            "description": "Markdown extracted successfully",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/auto": {
      "post": {
        "operationId": "tokenslimmerAuto",
        "summary": "Dynamic AI Token Compression and context pruning [API-09]",
        "responses": {
          "200": {
            "description": "Tokens compressed successfully",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/swarms/consensus": {
      "post": {
        "operationId": "swarmsConsensus",
        "summary": "Multi-Agent distributed consensus and lock arbiter [API-21]",
        "responses": {
          "200": {
            "description": "Consensus verified",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/cache/semantic": {
      "post": {
        "operationId": "semanticCache",
        "summary": "Zero-cost edge vector semantic cache [API-05]",
        "responses": {
          "200": {
            "description": "Cache lookup or store successful",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/sepa/vop": {
      "post": {
        "operationId": "sepaVoP",
        "summary": "SEPA Verification of Payee Modulo 97 bank check [API-138]",
        "responses": {
          "200": {
            "description": "IBAN and BIC verified",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/mpp/quote": {
      "post": {
        "operationId": "getMppQuote",
        "summary": "Autonomous Machine Payments Protocol (MPP) & x402 cost quote calculation",
        "responses": {
          "200": {
            "description": "Cryptographic cost quote issued with recipient wallet and Base USDC contract",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/v1/mpp/settle": {
      "post": {
        "operationId": "settleMpp",
        "summary": "Autonomous Machine Payments Protocol (MPP) & x402 settlement and live API key provisioning",
        "responses": {
          "200": {
            "description": "Micropayment settled and production credentials provisioned with Ed25519 proof seal",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    }
  }
}