{
  "openapi": "3.0.1",
  "info": {
    "title": "exmxc REST and MCP API",
    "version": "2.18.0",
    "description": "REST/JSON intelligence API plus an MCP server using Streamable HTTP via the Cloudflare Workers handler."
  },
  "servers": [
    {
      "url": "https://mcp.exmxc.ai"
    }
  ],
  "components": {
    "securitySchemes": {
      "AdsSignalBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/ai-commerce/signal": {
      "get": {
        "summary": "Get AI Commerce Signal",
        "description": "Versioned AI commerce evidence: signed-in app selection method checks, separate provider-API tests, shopper experience gates, and attributed survey, referral, and search context. No inferred agent purchases or market-share score.",
        "parameters": [
          {
            "name": "release",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Exact immutable release identifier; omit for latest."
            },
            "description": "release"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/ai-commerce/methodology": {
      "get": {
        "summary": "Retrieve AI Commerce Methodology v1",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/ai-commerce/releases": {
      "get": {
        "summary": "Retrieve AI Commerce Signal Release Ledger",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/ai-power/rankings": {
      "get": {
        "summary": "Get AI Power rankings",
        "description": "Current exmxc editorial rankings and forecasts for 50 companies in 2026, 2027, and 2030 using the fixed Four Forces methodology. Immutable monthly editions preserve prior judgments.",
        "parameters": [
          {
            "name": "edition",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Exact dated edition ID; omit for latest."
            },
            "description": "edition"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "2026",
                "2027",
                "2030"
              ],
              "description": "Sort highest power first for this year; defaults to 2026."
            },
            "description": "year"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/ai-power/rankings/methodology": {
      "get": {
        "summary": "Retrieve AI Power Index — Fixed Methodology 1.0.0",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/ai-power/rankings/editions": {
      "get": {
        "summary": "Retrieve AI Power Index — Edition Archive",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/entities": {
      "get": {
        "summary": "Get Entity Intelligence Records",
        "description": "Institutional entity intelligence dataset including industry, entity_type, posture, capability, and ECC scoring.",
        "parameters": [
          {
            "name": "industry",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "industry"
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "entity_type"
          },
          {
            "name": "posture",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "posture"
          },
          {
            "name": "capability",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "capability"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/ai_power_index": {
      "get": {
        "summary": "Get Legacy AI Power Exposure Scaffold",
        "description": "Historical weighted exposure scaffold. Its 0–10 totals and ranks are not current evidence-backed measurements of company power.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/four_forces": {
      "get": {
        "summary": "Get Legacy Four Forces Exposure Dataset",
        "description": "Historical v1 exposure scaffold across compute, interface, alignment, and energy; retained for compatibility, not as AI Power v2 judgments.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/ai_power_methodology_v2": {
      "get": {
        "summary": "Retrieve AI Power Index v2 Pilot Methodology",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/ai_power_profiles_v2": {
      "get": {
        "summary": "Get AI Power v2 Evidence Profiles",
        "description": "Evidence-backed entity–mechanism–market–time profiles. The pilot publishes anchored judgments or explicit unknowns; it has no universal composite or league table.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional company name, alias, or ticker."
            },
            "description": "query"
          },
          {
            "name": "group",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "chips_manufacturing_memory",
                "cloud_ecosystems",
                "model_developers",
                "distribution_workflows",
                "energy_enabling_infrastructure"
              ]
            },
            "description": "group"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "not_started",
                "complete",
                "partial",
                "insufficient_evidence"
              ]
            },
            "description": "status"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/entity_in_a_box_v1": {
      "get": {
        "summary": "Get Entity-in-a-Box Ontology",
        "description": "System-level ontology dataset defining AI-era entity structure across ontology, dataset, schema, MCP endpoint, and interpretation layers.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/reality_gap_index": {
      "get": {
        "summary": "Retrieve AI Reality Gap Index archive",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/strategic_consequence_scenarios": {
      "get": {
        "summary": "Retrieve Strategic Consequence Scenario Library",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/entity_registry": {
      "get": {
        "summary": "Retrieve Entity Registry",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/entity_clarity": {
      "get": {
        "summary": "Retrieve Entity Clarity Series",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/entity_clarity/snapshots/latest": {
      "get": {
        "summary": "Retrieve Latest Entity Clarity Snapshot",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/entity_clarity/changes/latest": {
      "get": {
        "summary": "Retrieve Latest Entity Clarity Changes",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets/entity_clarity/releases/latest": {
      "get": {
        "summary": "Retrieve Latest Entity Clarity Release",
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/datasets": {
      "get": {
        "summary": "Get Dataset Index",
        "description": "Retrieve index of all bundled datasets available through the exmxc MCP server.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/power-lens/v2": {
      "get": {
        "summary": "Read an AI Power v2 Evidence Profile",
        "description": "Resolve a pilot company and return its scoped mechanism, Four Forces mapping, four anchored judgments or explicit unknowns, evidence status, confidence, and versioned release metadata. No universal composite or rank is generated.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Company name, common alias, or supported public-market ticker."
            },
            "description": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/power-lens": {
      "get": {
        "summary": "Generate a Legacy Power Lens v1 Card",
        "description": "Historical v1 exposure view. Resolves a supported company name or ticker and returns the original weighted exposure scaffold and adjacent datasets. It is not a current evidence-backed measurement of company power.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Company name, common alias, or supported public-market ticker."
            },
            "description": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/reality-gap": {
      "get": {
        "summary": "Get AI Reality Gap Scores",
        "description": "Archived July 21, 2026 edition (10 companies), not updated. Current company assessments: the AI Power Index.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional company name, common alias, or ticker."
            },
            "description": "query"
          },
          {
            "name": "classification",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "quiet_compounder",
                "capability_leads_narrative",
                "narrative_capability_aligned",
                "narrative_leads_deployment",
                "narrative_outrunning_deployment"
              ]
            },
            "description": "classification"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "gap_ascending",
                "gap_descending",
                "capability_descending",
                "narrative_descending"
              ]
            },
            "description": "sort"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Maximum number of records to return."
            },
            "description": "limit"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/strategic-consequence": {
      "get": {
        "summary": "Run a Legacy Experimental Strategic Consequence Scenario",
        "description": "Experimental scenario engine pinned to the legacy v1 exposure scaffold. Its relative outputs are not AI Power v2 profiles, probabilities, or universal measures of advantage.",
        "parameters": [
          {
            "name": "scenario",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "inference_cost_collapse",
                "power_binding_constraint",
                "frontier_model_commoditization",
                "agent_interface_shift",
                "export_controls_tighten",
                "capability_gap_consolidation"
              ],
              "description": "Canonical counterfactual scenario identifier."
            },
            "description": "scenario"
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional company name, common alias, or ticker for a company-specific consequence view."
            },
            "description": "query"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "description": "Number of entities to return in each relative advantage and pressure list."
            },
            "description": "limit"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/analysis/ai_power/top": {
      "get": {
        "summary": "Get Legacy AI Power v1 Ranking",
        "description": "Retrieve historical weighted exposure rankings from the v1 scaffold. Alphabetical presentation within ties does not imply different merit.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Maximum number of records to return."
            },
            "description": "limit"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/audit/run": {
      "get": {
        "summary": "Collect Entity Clarity Evidence",
        "description": "Collect page delivery, declared provider-purpose access policy, machine-readable identity evidence, a deterministic five-dimension Entity Clarity v2.1 score when assessable, a separate static-content adequacy flag, and a clearly labeled legacy website diagnostic for one public HTTPS URL.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Public URL to audit."
            },
            "description": "url"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          }
        }
      }
    },
    "/market/quote": {
      "get": {
        "summary": "Retrieve a Hyperliquid market signal for one symbol",
        "description": "Resolves the symbol across Hyperliquid perpetual and HIP-3 dex markets. Perpetual pricing is supplemental and is not an authoritative cash-equity quote.",
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "symbol"
          },
          {
            "name": "dex",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "dex"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          },
          "400": {
            "description": "Missing or invalid symbol"
          },
          "404": {
            "description": "Symbol unavailable on Hyperliquid"
          },
          "502": {
            "description": "Hyperliquid upstream failed"
          }
        }
      }
    },
    "/market/quotes": {
      "get": {
        "summary": "Retrieve Hyperliquid market signals for multiple symbols",
        "description": "Accepts up to 25 comma-separated symbols and returns supplemental perpetual-market pricing signals.",
        "parameters": [
          {
            "name": "symbols",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "symbols"
          },
          {
            "name": "dex",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "dex"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          },
          "400": {
            "description": "Missing or invalid symbols"
          },
          "502": {
            "description": "Hyperliquid upstream failed"
          }
        }
      }
    },
    "/api/ai-jobs-signal": {
      "get": {
        "summary": "ADS benchmark",
        "responses": {
          "200": {
            "description": "JSON response"
          },
          "405": {
            "description": "Signal generation requires POST"
          }
        }
      },
      "post": {
        "summary": "Paid ADS signal generation",
        "security": [
          {
            "AdsSignalBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response"
          },
          "400": {
            "description": "Invalid body"
          },
          "401": {
            "description": "Unauthorized"
          },
          "502": {
            "description": "Upstream failed"
          },
          "504": {
            "description": "Upstream timeout"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "summary": "MCP Streamable HTTP transport",
        "responses": {
          "200": {
            "description": "JSON response"
          },
          "400": {
            "description": "Bad MCP protocol version"
          },
          "403": {
            "description": "Origin forbidden"
          },
          "405": {
            "description": "Method not allowed"
          },
          "406": {
            "description": "Not acceptable"
          },
          "415": {
            "description": "Unsupported media type"
          }
        }
      }
    }
  }
}