{
  "openapi": "3.0.3",
  "info": {
    "title": "Alpha Governance API",
    "version": "2.0.0",
    "description": "The Alpha Governance API provides programmatic access to AI governance intelligence for board directors, institutional investors, and AI agents. Alpha is the independent verification organization (IVO) for AI governance, rating 9,700+ companies on The Alpha Standard (12 dimensions, D1-D12).\n\nTwo integration paths:\n- **REST API**: Lightweight endpoints for governance scores, director profiles, and regulatory data\n- **MCP Server**: Full Model Context Protocol integration with 18 tools, 7 resource templates, 3 UI resources, and 5 prompts\n\nRate limit: 100 requests per minute per IP. Free tier: search and public stats. Premium tier (API key required): full scores, dimension breakdowns, GEH, director AGIQ, regulatory intelligence.\n\nGet an API key at https://alpha.ac/radar",
    "contact": {
      "name": "Alpha Developer Support",
      "email": "info@alpha.ac",
      "url": "https://alpha.ac/developers"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://alpha.ac/terms"
    },
    "x-logo": {
      "url": "https://alpha.ac/logo-cowork.png",
      "altText": "Alpha"
    }
  },
  "servers": [
    {
      "url": "https://api.alpha.ac/functions/v1",
      "description": "Production API"
    }
  ],
  "security": [
    { "ApiKeyHeader": [] },
    { "BearerToken": [] }
  ],
  "tags": [
    { "name": "Governance", "description": "Company AI governance ratings and scores" },
    { "name": "Directors", "description": "Board director AGIQ scores and profiles" },
    { "name": "Regulatory", "description": "EU AI Act and regulatory intelligence" },
    { "name": "MCP", "description": "Model Context Protocol server for AI agent integration" },
    { "name": "Credentials", "description": "ACD.AI / ACE.AI certification verification" }
  ],
  "paths": {
    "/check-alpha": {
      "get": {
        "operationId": "checkAlpha",
        "summary": "Get governance rating for a company",
        "description": "Returns the Alpha Governance Rating (AGR), Governance Event Horizon (GEH), AART tier, and top governance risk flags for any public company by ticker symbol. Free tier returns top-line grade only; premium returns full dimension breakdown.",
        "tags": ["Governance"],
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "example": "MSFT" },
            "description": "Stock ticker symbol (1-10 alphanumeric characters, e.g. AAPL, BRK.B)"
          },
          {
            "name": "include_dimensions",
            "in": "query",
            "required": false,
            "schema": { "type": "boolean", "default": false },
            "description": "Include full D1-D12 dimension scores (premium only)"
          }
        ],
        "responses": {
          "200": {
            "description": "Governance rating returned successfully",
            "headers": {
              "X-RateLimit-Limit": { "schema": { "type": "integer" }, "description": "Maximum requests per minute" },
              "X-RateLimit-Remaining": { "schema": { "type": "integer" }, "description": "Requests remaining in current window" },
              "X-RateLimit-Reset": { "schema": { "type": "integer" }, "description": "Unix timestamp when the rate limit window resets" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/GovernanceRatingResponse" },
                "example": {
                  "ticker": "MSFT",
                  "company": "Microsoft Corporation",
                  "agr": "A",
                  "agr_tier": "leaders",
                  "geh": "23%",
                  "geh_ci": "±8pp, 90% CI",
                  "aart": 3,
                  "trajectory": "stable",
                  "watch_status": null,
                  "top_risks": ["D12 Corrigibility gap in agentic deployments", "Supply chain vendor concentration"],
                  "rated_at": "2026-04-01T00:00:00Z"
                }
              }
            }
          },
          "400": { "description": "Invalid ticker format", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
          "401": { "description": "Unauthorized — premium endpoint requires API key", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
          "429": { "description": "Rate limit exceeded", "headers": { "Retry-After": { "schema": { "type": "integer" }, "description": "Seconds until the rate limit resets" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
          "404": { "description": "Company not found in Alpha coverage universe", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }
        }
      }
    },
    "/assess-governance": {
      "get": {
        "operationId": "assessGovernance",
        "summary": "Full D1-D12 governance assessment",
        "description": "Returns complete Alpha Standard assessment: all 12 dimension scores (D1-D12), D2R Map with EU AI Act / ISO 42001 / NIST citations, Disclosure-Practice Divergence (DPD), and committee accountability mapping. Premium only.",
        "tags": ["Governance"],
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "example": "AAPL" }
          }
        ],
        "responses": {
          "200": {
            "description": "Full governance assessment",
            "headers": {
              "X-RateLimit-Limit": { "schema": { "type": "integer" } },
              "X-RateLimit-Remaining": { "schema": { "type": "integer" } },
              "X-RateLimit-Reset": { "schema": { "type": "integer" } }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/FullAssessmentResponse" }
              }
            }
          },
          "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
          "429": { "description": "Rate limit exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }
        }
      }
    },
    "/assess-materiality": {
      "get": {
        "operationId": "assessMateriality",
        "summary": "Compare governance across peer companies",
        "description": "Side-by-side governance comparison for 2-10 companies. Returns ranked delta scores, dimension comparison table, and trajectory analysis. Premium only.",
        "tags": ["Governance"],
        "parameters": [
          {
            "name": "tickers",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "example": "MSFT,AAPL,GOOG" },
            "description": "Comma-separated ticker symbols (2-10 companies)"
          }
        ],
        "responses": {
          "200": { "description": "Peer comparison returned", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PeerComparisonResponse" } } } },
          "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }
        }
      }
    },
    "/credential-verify": {
      "get": {
        "operationId": "verifyCredential",
        "summary": "Verify ACD.AI or ACE.AI certification",
        "description": "Publicly verifiable endpoint. No authentication required. Returns certification status, issue date, expiry, and AGIQ band for a named director or executive.",
        "tags": ["Credentials"],
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": { "type": "string", "example": "Jane Smith" }
          },
          {
            "name": "credential_id",
            "in": "query",
            "required": false,
            "schema": { "type": "string", "example": "ACD-2026-00142" }
          }
        ],
        "responses": {
          "200": {
            "description": "Credential verification result",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/CredentialResponse" },
                "example": {
                  "verified": true,
                  "credential_type": "ACD.AI",
                  "holder_name": "Jane Smith",
                  "credential_id": "ACD-2026-00142",
                  "issued_at": "2026-01-15",
                  "expires_at": "2028-01-15",
                  "agiq_band": "Proficient",
                  "issuer": "Alpha Institute for AI Governance"
                }
              }
            }
          }
        }
      }
    },
    "/mcp-server": {
      "post": {
        "operationId": "mcpServer",
        "summary": "MCP JSON-RPC endpoint",
        "description": "Model Context Protocol (MCP) server implementing Streamable HTTP transport (JSON-RPC 2.0). Exposes 18 governance tools, 7 alpha:// resource templates, 3 ui:// interactive UI resources, and 5 governance prompts.\n\nFree tools (no auth): `search_companies`, `get_platform_stats`, `get_epoch_model_context`, `get_compute_tier`, `get_frontier_models_timeline`.\n\nPremium tools (API key required): `score_ai_governance_risk`, `get_board_profile`, `compare_companies`, `get_director_profile`, `get_governance_signals`, `get_regulatory_intelligence`, `benchmark_board_ai_readiness`, `find_ai_governance_signals`, `verify_credential`, `get_governance_rating`, `get_governance_debt`, `compare_capability_velocity`, `get_governance_scaling_index`.\n\nRate limit: 100 requests/minute per IP.",
        "tags": ["MCP"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/JsonRpcRequest" },
              "examples": {
                "initialize": {
                  "summary": "Initialize MCP session",
                  "value": { "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2025-03-26", "clientInfo": { "name": "my-agent", "version": "1.0" } } }
                },
                "listTools": {
                  "summary": "List available tools",
                  "value": { "jsonrpc": "2.0", "id": 2, "method": "tools/list" }
                },
                "scoreGovernance": {
                  "summary": "Score AI governance risk for a company",
                  "value": { "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "score_ai_governance_risk", "arguments": { "ticker": "MSFT" } } }
                },
                "listResources": {
                  "summary": "List available resources including ui:// interactive resources",
                  "value": { "jsonrpc": "2.0", "id": 4, "method": "resources/list" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response",
            "headers": {
              "X-RateLimit-Limit": { "schema": { "type": "integer" }, "description": "100" },
              "X-RateLimit-Remaining": { "schema": { "type": "integer" } },
              "X-RateLimit-Reset": { "schema": { "type": "integer" }, "description": "Unix timestamp of rate limit window reset" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/JsonRpcResponse" }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (100 req/min per IP)",
            "headers": {
              "Retry-After": { "schema": { "type": "integer" }, "description": "Seconds until next allowed request" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JsonRpcResponse" } } }
          }
        }
      },
      "get": {
        "operationId": "mcpServerSse",
        "summary": "MCP SSE stream (keepalive)",
        "description": "Server-Sent Events stream for MCP server notifications and keepalives. Used by MCP clients that support streaming.",
        "tags": ["MCP"],
        "responses": {
          "200": {
            "description": "SSE stream",
            "content": { "text/event-stream": { "schema": { "type": "string" } } }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Alpha API key. Get one at https://alpha.ac/radar"
      },
      "BearerToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token (same value as x-api-key)"
      }
    },
    "schemas": {
      "GovernanceRatingResponse": {
        "type": "object",
        "properties": {
          "ticker": { "type": "string" },
          "company": { "type": "string" },
          "agr": { "type": "string", "enum": ["AAA","AA","A","BBB","BB","B","CCC","CC","C","D","NR"] },
          "agr_tier": { "type": "string", "enum": ["leaders","governance_ready","developing","laggards","disqualified","not_rated"] },
          "geh": { "type": "string", "description": "Governance Event Horizon (12-month failure probability), e.g. '23%'" },
          "geh_ci": { "type": "string", "description": "Confidence interval, e.g. '±8pp, 90% CI'" },
          "aart": { "type": "integer", "minimum": 1, "maximum": 4, "description": "Agentic AI Readiness Tier (1=minimal, 4=frontier)" },
          "trajectory": { "type": "string", "enum": ["advancing","stable","declining"] },
          "watch_status": { "type": "string", "nullable": true, "enum": ["positive_watch","negative_watch",null] },
          "top_risks": { "type": "array", "items": { "type": "string" } },
          "rated_at": { "type": "string", "format": "date-time" }
        }
      },
      "FullAssessmentResponse": {
        "type": "object",
        "properties": {
          "ticker": { "type": "string" },
          "company": { "type": "string" },
          "agr": { "type": "string" },
          "dimensions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "number": { "type": "integer" },
                "name": { "type": "string" },
                "score": { "type": "number" },
                "weight": { "type": "number" },
                "committee": { "type": "string" }
              }
            }
          },
          "d2r_map": {
            "type": "object",
            "description": "Dimension-to-Regulation Map: citations to EU AI Act, ISO 42001, NIST AI RMF per dimension"
          },
          "dpd": { "type": "number", "description": "Disclosure-Practice Divergence (-100 to +100)" }
        }
      },
      "PeerComparisonResponse": {
        "type": "object",
        "properties": {
          "companies": { "type": "array", "items": { "$ref": "#/components/schemas/GovernanceRatingResponse" } },
          "ranked_by_agr": { "type": "array", "items": { "type": "string" } },
          "delta_leader": { "type": "string" }
        }
      },
      "CredentialResponse": {
        "type": "object",
        "properties": {
          "verified": { "type": "boolean" },
          "credential_type": { "type": "string", "enum": ["ACD.AI","ACE.AI"] },
          "holder_name": { "type": "string" },
          "credential_id": { "type": "string" },
          "issued_at": { "type": "string", "format": "date" },
          "expires_at": { "type": "string", "format": "date" },
          "agiq_band": { "type": "string", "enum": ["Expert","Proficient","Developing","Foundational"] },
          "issuer": { "type": "string" }
        }
      },
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "properties": {
          "jsonrpc": { "type": "string", "enum": ["2.0"] },
          "id": { "type": ["string","integer","null"] },
          "method": { "type": "string" },
          "params": { "type": "object" }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "properties": {
          "jsonrpc": { "type": "string", "enum": ["2.0"] },
          "id": { "type": ["string","integer","null"] },
          "result": { "type": "object" },
          "error": {
            "type": "object",
            "properties": {
              "code": { "type": "integer" },
              "message": { "type": "string" }
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": { "type": "string" },
          "code": { "type": "integer" }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Alpha Developer Documentation",
    "url": "https://alpha.ac/developers"
  }
}
