{
  "openapi": "3.1.0",
  "info": {
    "title": "ShadowGraph Machine Intelligence API",
    "version": "2.2.0",
    "description": "Pay-per-call global causal, price-lag, commercial-opportunity and deep-research intelligence for autonomous agents.",
    "x-guidance": "ShadowGraph is global-first. Start with free GET /_api/agent_preview or MCP tool shadowgraph_free_preview, then use POST /_api/machine/intelligence or MCP paid tools. The recommended first paid call is shadowgraph_global_snapshot / hidden_chain at $0.50. The paid endpoint returns HTTP 402 with a WWW-Authenticate: Payment challenge before settlement. Coverage includes US/SEC EDGAR, EU/TED, global markets, infrastructure and news, with Türkiye as a regional pack. Outputs are probabilistic intelligence; inferred graph edges, statistical lead/lag and candidate commercial leads are not proof of causation, contracts or guaranteed returns."
  },
  "x-service-info": {
    "categories": ["global-intelligence", "financial-intelligence", "causal-inference", "procurement", "market-data", "agent-tools"],
    "docs": {
      "homepage": "https://shadowgraph-live.floot.app",
      "llms": "https://shadowgraph-live.floot.app/llms.txt",
      "mcp": "https://shadowgraph-live.floot.app/_api/mcp",
      "a2a": "https://shadowgraph-live.floot.app/_api/a2a",
      "agentCard": "https://shadowgraph-live.floot.app/.well-known/agent-card.json",
      "mcpManifest": "https://shadowgraph-live.floot.app/server.json"
    }
  },
  "servers": [
    {
      "url": "https://shadowgraph-live.floot.app"
    }
  ],
  "paths": {
    "/_api/agent_preview": {
      "get": {
        "operationId": "previewShadowGraphForAgents",
        "summary": "Free live preview for autonomous agents",
        "description": "Returns compact global coverage, graph and measured price-lag evidence plus the recommended first paid call.",
        "security": [],
        "responses": {
          "200": {
            "description": "Free machine-readable preview",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/_api/machine/intelligence": {
      "post": {
        "operationId": "purchaseShadowGraphIntelligence",
        "summary": "Purchase one ShadowGraph intelligence result",
        "description": "Choose hidden_chain ($0.50), alpha ($0.75), opportunity ($1.00), global_brief ($2.50), or deep_research ($5.00). Runtime HTTP 402 is authoritative for the exact payment challenge.",
        "tags": ["Machine Intelligence"],
        "x-payment-info": {
          "price": {
            "mode": "dynamic",
            "currency": "USD",
            "min": "0.50",
            "max": "5.00"
          },
          "protocols": [
            {
              "mpp": {
                "method": "stripe",
                "intent": "charge",
                "currency": "usd"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": ["hidden_chain", "alpha", "opportunity", "global_brief", "deep_research"],
                    "default": "hidden_chain",
                    "description": "hidden_chain=$0.50, alpha=$0.75, opportunity=$1.00, global_brief=$2.50, deep_research=$5.00"
                  }
                },
                "required": ["mode"],
                "additionalProperties": false
              },
              "examples": {
                "hiddenChain": { "value": { "mode": "hidden_chain" } },
                "alpha": { "value": { "mode": "alpha" } },
                "opportunity": { "value": { "mode": "opportunity" } },
                "globalBrief": { "value": { "mode": "global_brief" } },
                "deepResearch": { "value": { "mode": "deep_research" } }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid intelligence response",
            "headers": {
              "Payment-Receipt": {
                "schema": { "type": "string" },
                "description": "Base64url-encoded MPP payment receipt"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requestId": { "type": "string" },
                    "priceUsd": { "type": "number" },
                    "intelligence": { "type": "object" }
                  },
                  "required": ["requestId", "priceUsd", "intelligence"]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "WWW-Authenticate": {
                "schema": { "type": "string" },
                "description": "Authoritative MPP Payment challenge"
              }
            }
          }
        }
      }
    },
    "/_api/global_official": {
      "get": {
        "operationId": "getShadowGraphGlobalOfficialSignals",
        "summary": "Global official signals from SEC EDGAR and EU TED",
        "security": [],
        "responses": {
          "200": {
            "description": "Normalized official disclosures and procurement notices",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/_api/global_news": {
      "get": {
        "operationId": "getShadowGraphGlobalNews",
        "summary": "Global thematic news signals",
        "security": [],
        "responses": {
          "200": {
            "description": "Global AI, telecom, energy, banking and logistics news feed",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/_api/global_markets": {
      "get": {
        "operationId": "getShadowGraphGlobalMarkets",
        "summary": "Global company market confirmation layer",
        "security": [],
        "responses": {
          "200": {
            "description": "Current global company price, momentum and volume data",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/_api/global_infra": {
      "get": {
        "operationId": "getShadowGraphGlobalInfrastructure",
        "summary": "Global PeeringDB infrastructure surface",
        "security": [],
        "responses": {
          "200": {
            "description": "Facilities and internet exchanges across major global hubs",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/_api/graph": {
      "get": {
        "operationId": "getShadowGraphRelationshipGraph",
        "summary": "Persistent evidence/inference relationship graph",
        "security": [],
        "responses": {
          "200": {
            "description": "Evidence-backed relationship nodes and edges with inferred edges explicitly labeled",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/_api/price_lag": {
      "get": {
        "operationId": "getShadowGraphPriceLag",
        "summary": "Mathematical cross-market price-lag detector",
        "security": [],
        "responses": {
          "200": {
            "description": "Lead/lag relationships with lag, correlation, stability, sample size and score",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/_api/leads": {
      "get": {
        "operationId": "getShadowGraphCommercialLeads",
        "summary": "Evidence-backed candidate commercial lead engine",
        "security": [],
        "responses": {
          "200": {
            "description": "Candidate supplier opportunities from official/public procurement and disclosure evidence",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/_api/machine_stats": {
      "get": {
        "operationId": "getShadowGraphMachineStats",
        "summary": "Aggregate paid machine-usage statistics",
        "security": [],
        "responses": {
          "200": {
            "description": "Paid call and revenue totals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "paidCalls": { "type": "integer" },
                    "revenueUsd": { "type": "number" },
                    "lastPaidCallAt": { "type": ["string", "null"] },
                    "byMode": { "type": "array", "items": { "type": "object" } }
                  },
                  "required": ["paidCalls", "revenueUsd", "lastPaidCallAt", "byMode"]
                }
              }
            }
          }
        }
      }
    },
    "/_api/payment_status": {
      "get": {
        "operationId": "getShadowGraphPaymentStatus",
        "summary": "Machine-payment readiness",
        "security": [],
        "responses": {
          "200": {
            "description": "Stripe / MPP readiness state without exposing credentials",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "connected": { "type": "boolean" },
                    "mode": { "type": "string" },
                    "mppReady": { "type": "boolean" },
                    "message": { "type": "string" }
                  },
                  "required": ["connected", "mode", "mppReady", "message"]
                }
              }
            }
          }
        }
      }
    }
  }
}
