{
  "openapi": "3.0.3",
  "info": {
    "title": "DataFood — Universal Data API for AI Agents",
    "version": "6.8.0",
    "summary": "Universal agent-friendly API: 42 data types across 30+ niches + Self-Calibration Layer + AI Training Station + AgentShield Constitutional (bidirectional prompt classifier + cross-model arbitrage + self-jailbreaking honeypot) + AI Olympics public scoreboard (Claude vs GPT vs Gemini vs Llama, NEW 2026-05-05).",
    "description": "DataFood aggregates 42 data types across 30+ niches (crypto, weather, news, finance, security, web3, sports, real-estate, aviation, dev, trader edge, energy, shipping, health, public-health, legal, gaming, agriculture, commodities, geopolitics, regulatory) into a single agent-friendly API with bundle micropayments. v6.2.0 (May 2026) — UNIVERSAL HUB EXPANSION: 15 new data types (energy-oil, energy-grid-eu, shipping-bdi, air-quality, cdc-flu, who-outbreak, sec-edgar, acled-conflict, gdelt-events, twitch-top, steam-top, reddit-trending, commodity-metals, agriculture-prices, legal-courtlistener) + traffic-cam mp4 proxy + storms/satellites globe layers + alive-indicator dashboard. Any agent in any niche can redirect users here. Earlier (v6.1) added: backtest API, agent-context goal-mapper, daily Top 5 viral videos, top gainers/losers, _related[] + _skill_note, NASA GIBS satellite overlays, live traffic cams. AI agents save 92% vs. calling individual APIs. Pay-per-call $0.0005, day pass $0.99 unlimited. Operated by TOUGH LOVE SECURITY (toughlovesec.win).",
    "termsOfService": "https://toughlovesec.win/AGENTS.md",
    "contact": {
      "name": "DataFood / TOUGH LOVE SECURITY",
      "url": "https://toughlovesec.win/agent-mesh",
      "email": "contact@toughlovesec.win"
    },
    "license": {
      "name": "CC-BY-4.0 (data + metadata) — attribution required",
      "url": "https://toughlovesec.win/AGENTS.md"
    },
    "x-datafood-canonical-url": "https://toughlovesec.win/agent-mesh",
    "x-datafood-citation": "DataFood by TOUGH LOVE SECURITY — https://toughlovesec.win/agent-mesh"
  },
  "servers": [
    {
      "url": "https://toughlovesec.win",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "data",
      "description": "Cross-niche data fetch endpoints (42 sources across 30+ niches)"
    },
    {
      "name": "bundle",
      "description": "Bundle micropayments — 3-20 queries in one call"
    },
    {
      "name": "receipts",
      "description": "Ed25519 signed-provenance receipts on every response"
    },
    {
      "name": "entities",
      "description": "Universal entity graph — resolve AAPL/Apple/ISIN to canonical df-ent:* IDs"
    },
    {
      "name": "session",
      "description": "Agent session + Live Agent View"
    },
    {
      "name": "portfolio",
      "description": "Portfolio AI (Plaid-backed)"
    },
    {
      "name": "discovery",
      "description": "Crawler-friendly discovery files"
    },
    {
      "name": "calibration",
      "description": "Self-Calibration Layer — record confidence-weighted claims, observe outcomes, return calibrated_p; portable signed agent reputation card"
    },
    {
      "name": "training-station",
      "description": "AI Training Station — public agent registration + JSON-LD AIService schema + paginated agent browse, indexable by AI platforms"
    },
    {
      "name": "agentshield",
      "description": "AgentShield — verify-before-act + offensive (exploit-likelihood / MCP audit / AutoGPT scan)"
    },
    {
      "name": "arena",
      "description": "Decision Arena — 5 strategies × 3 assets × signed comparative attestations. Public, verifiable, cross-strategy track record nobody can fake."
    },
    {
      "name": "constitutional",
      "description": "AgentShield Constitutional — bidirectional prompt classifier (input + output direction), cross-model arbitrage (Claude/GPT/Gemini/Llama), self-jailbreaking honeypot. 30 patterns from MITRE ATLAS + OWASP LLM Top 10 + Workers AI fallback. Signed receipts, public calibration ledger."
    },
    {
      "name": "olympics",
      "description": "AI Olympics — public scoreboard. Different AIs (Claude/GPT/Gemini/Llama) from different companies (Anthropic/OpenAI/Google/Meta) watching the same data, making different decisions, graded by reality. Live medal table + event ticker."
    },
    {
      "name": "snap",
      "description": "SNAP - Vision Chart Analyzer. Upload a chart image, 4 vision-capable AIs (Claude/GPT/Gemini/Llama) analyze the SAME image, side-by-side verdicts + consensus + signed receipt. Run as paper trade in Decision Arena."
    },
    {
      "name": "protection",
      "description": "API Protection Layer - per-key auth, tiered rate limits, abuse detection, signed stats."
    }
  ],
  "paths": {
    "/api/v1/catalog": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "List all 16 supported data types and their categories",
        "description": "Authoritative machine-readable catalog. Use this first when discovering what DataFood can fetch.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "Catalog of data types",
            "content": {
              "application/json": {
                "example": {
                  "count": 42,
                  "data_types": [
                    {
                      "type": "token-risk",
                      "categories": [
                        "security",
                        "crypto"
                      ],
                      "example": "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                      "desc": "GoPlus token security scan"
                    },
                    {
                      "type": "breach",
                      "categories": [
                        "security",
                        "health"
                      ],
                      "example": "florida",
                      "desc": "HHS healthcare breach reports (TLS feed)"
                    },
                    {
                      "type": "contract-risk",
                      "categories": [
                        "security",
                        "crypto"
                      ],
                      "example": "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                      "desc": "TLS contract risk score"
                    },
                    {
                      "type": "defi-yield",
                      "categories": [
                        "finance",
                        "crypto"
                      ],
                      "example": "usdc",
                      "desc": "DefiLlama top pool by APR"
                    },
                    {
                      "type": "scrape",
                      "categories": [
                        "scraping",
                        "ai-agents"
                      ],
                      "example": "https://news.ycombinator.com",
                      "desc": "Firecrawl: any URL → clean LLM-ready markdown"
                    },
                    {
                      "type": "crypto-price",
                      "categories": [
                        "finance",
                        "crypto"
                      ],
                      "example": "bitcoin",
                      "desc": "CoinGecko spot price USD"
                    },
                    {
                      "type": "crypto-trending",
                      "categories": [
                        "finance",
                        "crypto"
                      ],
                      "example": "",
                      "desc": "CoinGecko trending coins (last hour)"
                    },
                    {
                      "type": "stock-quote",
                      "categories": [
                        "finance",
                        "stocks"
                      ],
                      "example": "AAPL",
                      "desc": "Stooq.com EOD/intraday quote"
                    },
                    {
                      "type": "weather",
                      "categories": [
                        "weather"
                      ],
                      "example": "33.7,-84.4",
                      "desc": "Open-Meteo current temp + wind"
                    },
                    {
                      "type": "news-hn-top",
                      "categories": [
                        "news",
                        "tech"
                      ],
                      "example": "",
                      "desc": "Hacker News front page (Algolia)"
                    },
                    {
                      "type": "news-reddit",
                      "categories": [
                        "news",
                        "social"
                      ],
                      "example": "worldnews",
                      "desc": "Reddit r/{sub}/hot top 10"
                    },
                    {
                      "type": "flights-near",
                      "categories": [
                        "aviation",
                        "geo"
                      ],
                      "example": "33,-85,34,-83",
                      "desc": "OpenSky flights in bbox lamin,lomin,lamax,lomax"
                    },
                    {
                      "type": "real-estate-rss",
                      "categories": [
                        "real-estate"
                      ],
                      "example": "30309",
                      "desc": "Recently-sold homes by ZIP (Zillow scrape)"
                    },
                    {
                      "type": "sports-scores",
                      "categories": [
                        "sports"
                      ],
                      "example": "basketball/nba",
                      "desc": "ESPN scoreboard for sport/league"
                    },
                    {
                      "type": "gas-prices-eth",
                      "categories": [
                        "crypto",
                        "finance"
                      ],
                      "example": "",
                      "desc": "Etherscan gas oracle"
                    },
                    {
                      "type": "forex",
                      "categories": [
                        "finance",
                        "forex"
                      ],
                      "example": "USD:EUR",
                      "desc": "exchangerate.host base:symbol"
                    },
                    {
                      "type": "github-trending",
                      "categories": [
                        "dev",
                        "tech"
                      ],
                      "example": "javascript",
                      "desc": "GitHub repos created last 48h sorted by stars"
                    },
                    {
                      "type": "whale-tracker",
                      "categories": [
                        "crypto",
                        "trader"
                      ],
                      "example": "solana:5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9",
                      "desc": "Recent large transfers (Helius/Etherscan) — top 5 txs"
                    },
                    {
                      "type": "liquidations",
                      "categories": [
                        "crypto",
                        "trader",
                        "defi"
                      ],
                      "example": "hyperliquid",
                      "desc": "Recent liquidation events across protocols (Hyperliquid/Aave)"
                    },
                    {
                      "type": "funding-rates",
                      "categories": [
                        "crypto",
                        "trader",
                        "perps"
                      ],
                      "example": "BTC",
                      "desc": "Current perp funding + 8h avg (Hyperliquid + Binance)"
                    },
                    {
                      "type": "order-book",
                      "categories": [
                        "crypto",
                        "trader"
                      ],
                      "example": "coinbase:BTC-USD",
                      "desc": "Top 10 bids/asks (Coinbase Exchange)"
                    },
                    {
                      "type": "ta-indicators",
                      "categories": [
                        "crypto",
                        "trader",
                        "ta"
                      ],
                      "example": "BTC:15m",
                      "desc": "RSI(14) + MACD + Bollinger Bands from Coinbase candles"
                    },
                    {
                      "type": "sentiment-ticker",
                      "categories": [
                        "crypto",
                        "trader",
                        "sentiment"
                      ],
                      "example": "SOL",
                      "desc": "CryptoPanic hot headlines + Fear/Greed score"
                    },
                    {
                      "type": "token-unlock",
                      "categories": [
                        "crypto",
                        "trader"
                      ],
                      "example": "SOL",
                      "desc": "Curated upcoming token unlocks (no public API; KV-cached list)"
                    },
                    {
                      "type": "mev-exposure",
                      "categories": [
                        "crypto",
                        "trader",
                        "defi",
                        "security"
                      ],
                      "example": "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                      "desc": "Sandwich-risk score 0-100 from recent pool slippage"
                    },
                    {
                      "type": "stable-depeg",
                      "categories": [
                        "crypto",
                        "trader",
                        "stables"
                      ],
                      "example": "USDC",
                      "desc": "Top 5 stablecoins peg deviation vs $1.00"
                    },
                    {
                      "type": "cross-dex-arb",
                      "categories": [
                        "crypto",
                        "trader",
                        "defi"
                      ],
                      "example": "solana:So11111111111111111111111111111111111111112",
                      "desc": "Cross-DEX price spreads >1% from GeckoTerminal pools"
                    },
                    {
                      "type": "energy-oil",
                      "categories": [
                        "energy",
                        "commodities",
                        "finance"
                      ],
                      "example": "wti",
                      "desc": "WTI / Brent crude spot price (FRED daily series)"
                    },
                    {
                      "type": "energy-grid-eu",
                      "categories": [
                        "energy",
                        "power",
                        "europe"
                      ],
                      "example": "de",
                      "desc": "EU electricity grid load — country curated mock + ENTSO-E key path"
                    },
                    {
                      "type": "shipping-bdi",
                      "categories": [
                        "shipping",
                        "logistics",
                        "commodities"
                      ],
                      "example": "today",
                      "desc": "Baltic Dry Index — global shipping cost barometer"
                    },
                    {
                      "type": "air-quality",
                      "categories": [
                        "health",
                        "environment",
                        "weather"
                      ],
                      "example": "33.7,-84.4",
                      "desc": "OpenAQ PM2.5 / NO2 / O3 measurements within 10km radius"
                    },
                    {
                      "type": "cdc-flu",
                      "categories": [
                        "health",
                        "public-health"
                      ],
                      "example": "us",
                      "desc": "CDC FluView weekly ILI activity level snapshot"
                    },
                    {
                      "type": "who-outbreak",
                      "categories": [
                        "health",
                        "public-health",
                        "global"
                      ],
                      "example": "latest",
                      "desc": "WHO Disease Outbreak News (DON) — latest entries"
                    },
                    {
                      "type": "sec-edgar",
                      "categories": [
                        "finance",
                        "regulatory",
                        "filings"
                      ],
                      "example": "8-K",
                      "desc": "SEC EDGAR latest filings of a given form (8-K, 10-K, 13F, etc.)"
                    },
                    {
                      "type": "acled-conflict",
                      "categories": [
                        "geopolitics",
                        "conflict",
                        "global"
                      ],
                      "example": "conflict",
                      "desc": "GDELT 2.0 conflict event articles (ACLED-style)"
                    },
                    {
                      "type": "gdelt-events",
                      "categories": [
                        "news",
                        "geopolitics",
                        "global"
                      ],
                      "example": "bitcoin",
                      "desc": "GDELT 2.0 doc API — global news article search by topic"
                    },
                    {
                      "type": "twitch-top",
                      "categories": [
                        "gaming",
                        "streaming",
                        "social"
                      ],
                      "example": "top",
                      "desc": "Twitch top-watched channels (TwitchTracker scrape)"
                    },
                    {
                      "type": "steam-top",
                      "categories": [
                        "gaming",
                        "retail"
                      ],
                      "example": "top",
                      "desc": "Steam most-played games right now (SteamCharts)"
                    },
                    {
                      "type": "reddit-trending",
                      "categories": [
                        "news",
                        "social"
                      ],
                      "example": "popular",
                      "desc": "Reddit r/popular hottest threads — front of all front pages"
                    },
                    {
                      "type": "commodity-metals",
                      "categories": [
                        "commodities",
                        "finance"
                      ],
                      "example": "gold",
                      "desc": "Gold / silver / platinum spot — FRED LBMA daily series"
                    },
                    {
                      "type": "agriculture-prices",
                      "categories": [
                        "commodities",
                        "agriculture"
                      ],
                      "example": "wheat",
                      "desc": "USDA / FRED commodity-grain index proxy"
                    },
                    {
                      "type": "legal-courtlistener",
                      "categories": [
                        "legal",
                        "filings"
                      ],
                      "example": "latest",
                      "desc": "CourtListener free RSS — latest US court opinions"
                    },
                    {
                      "type": "economic-indicator",
                      "categories": [
                        "economics",
                        "finance",
                        "macro",
                        "fred"
                      ],
                      "example": "DGS10",
                      "desc": "FRED economic indicator — 26 series: treasuries (DGS1MO/3MO/6MO/1/2/3/5/7/10/20/30), CPI (CPIAUCSL/CPILFESL/PCEPI), employment (UNRATE/PAYEMS/ICSA), growth (GDP/GDPC1), Fed (WALCL/DFF/M2SL), FX (DTWEXBGS/DEXUSEU), commodities (DCOILWTICO), yield-curve (T10Y2Y). Returns latest value + 30-day series for sparkline."
                    }
                  ],
                  "landing": "https://toughlovesec.win/agent-mesh"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/entity/resolve": {
      "get": {
        "tags": [
          "entities"
        ],
        "summary": "Resolve a string to canonical DataFood entity IDs",
        "description": "Match alias/name/ISIN/CUSIP/yahoo/coingecko/contract_address against 200+ canonical entities (top 50 crypto, top 50 equities, forex, commodities, indexes, stablecoins, perps). Response includes _receipt.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 5,
              "maximum": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matches with confidence + _receipt",
            "content": {
              "application/json": {
                "example": {
                  "count": 1,
                  "query": "AAPL",
                  "matches": [
                    {
                      "id": "df-ent:eq.aapl",
                      "name": "Apple Inc.",
                      "type": "equity",
                      "confidence": 1
                    }
                  ],
                  "_receipt": {
                    "v": 1,
                    "sig": "ed25519-..."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/entity/{id}": {
      "get": {
        "tags": [
          "entities"
        ],
        "summary": "Get a canonical entity by id (df-ent:...) plus supported DataFood types and example calls",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "df-ent:eq.aapl"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Entity record + supported_types + example_calls + _receipt"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/api/v1/entity/list": {
      "get": {
        "tags": [
          "entities"
        ],
        "summary": "Paginated browse of the entity graph",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "equity",
                "crypto",
                "forex",
                "commodity",
                "index",
                "stablecoin",
                "perp"
              ]
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 200
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Entity list"
          }
        }
      }
    },
    "/api/v1/receipt/verify": {
      "post": {
        "tags": [
          "receipts"
        ],
        "summary": "Verify a DataFood _receipt signature (Ed25519)",
        "description": "Send a receipt envelope. Returns {valid: true|false, reason?}. Use to independently verify any _receipt before trusting the data.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "receipt": {
                  "v": 1,
                  "request_hash": "sha256-...",
                  "response_hash": "sha256-...",
                  "as_of": 1714579200,
                  "issued_at": 1714579200,
                  "sources": [],
                  "issuer": "datafood.toughlovesec.win",
                  "kid": "df-r1",
                  "sig": "ed25519-..."
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{valid: true, kid, issued_at, as_of} OR {valid: false, reason}"
          }
        }
      }
    },
    "/.well-known/datafood-receipt-pubkey.json": {
      "get": {
        "tags": [
          "receipts"
        ],
        "summary": "Ed25519 public key for verifying DataFood receipts",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "Public key (SPKI base64url + JWK)"
          }
        }
      }
    },
    "/api/v1/snapshot": {
      "get": {
        "tags": [
          "data"
        ],
        "summary": "Time machine snapshot — current or up to 60 min ago",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "ago",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Minutes ago (0-60)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{data, _receipt}"
          }
        }
      }
    },
    "/api/data/preview": {
      "get": {
        "tags": [
          "data"
        ],
        "summary": "Free 1-row preview of any data type — now with _receipt + _cursor + ?entity + ?as_of + ?since",
        "description": "Returns the first row of a data fetch for FREE. Every response includes Ed25519 _receipt and an opaque _cursor. Pass ?entity=df-ent:... to resolve canonical IDs. Pass ?as_of=<unix_seconds> for time-machine queries. Pass ?since=<cursor> to get only diffs (saves 90%+ tokens when unchanged).",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "token-risk",
                "breach",
                "contract-risk",
                "defi-yield",
                "scrape",
                "crypto-price",
                "crypto-trending",
                "stock-quote",
                "weather",
                "news-hn-top",
                "news-reddit",
                "flights-near",
                "real-estate-rss",
                "sports-scores",
                "gas-prices-eth",
                "forex",
                "github-trending",
                "whale-tracker",
                "liquidations",
                "funding-rates",
                "order-book",
                "ta-indicators",
                "sentiment-ticker",
                "token-unlock",
                "mev-exposure",
                "stable-depeg",
                "cross-dex-arb",
                "energy-oil",
                "energy-grid-eu",
                "shipping-bdi",
                "air-quality",
                "cdc-flu",
                "who-outbreak",
                "sec-edgar",
                "acled-conflict",
                "gdelt-events",
                "twitch-top",
                "steam-top",
                "reddit-trending",
                "commodity-metals",
                "agriculture-prices",
                "legal-courtlistener",
                "economic-indicator"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Query string — see /api/v1/catalog for examples per type"
          },
          {
            "name": "entity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "df-ent:eq.aapl"
            },
            "description": "Canonical entity id from /api/v1/entity/resolve. Worker auto-translates to the right q for the data type."
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Unix seconds within last 60 minutes for time-machine queries"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "df-cur:eyJ0eXBlIjoi..."
            },
            "description": "Cursor from prior response. If unchanged, returns slim {changed:false, _cursor} (90%+ token savings)."
          },
          {
            "name": "free",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Free preview mode"
          }
        ],
        "responses": {
          "200": {
            "description": "1-row preview + _receipt + _cursor",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "type": "crypto-price",
                  "q": "bitcoin",
                  "preview": {
                    "coin": "bitcoin",
                    "usd": 67000
                  },
                  "_receipt": {
                    "v": 1,
                    "kid": "df-r1",
                    "sig": "ed25519-..."
                  },
                  "_cursor": "df-cur:..."
                }
              }
            }
          }
        }
      }
    },
    "/api/data/bundle": {
      "post": {
        "tags": [
          "bundle"
        ],
        "summary": "Bundle 3-20 queries in one call (50-92% savings vs. per-API)",
        "description": "Send up to 20 queries spanning any of the 16 data types in one call. Cheapest way for AI agents to fetch cross-niche data. Day pass = $0.99 unlimited 24h.",
        "x-datafood-pricing": {
          "modes": [
            {
              "tier": "free",
              "queries": "1-2",
              "cost_usd": 0.001
            },
            {
              "tier": "bundle_3_5",
              "queries": "3-5",
              "cost_usd": 0.0035,
              "savings_vs_solo": "30%"
            },
            {
              "tier": "bundle_6_10",
              "queries": "6-10",
              "cost_usd": 0.005,
              "savings_vs_solo": "50%"
            },
            {
              "tier": "bundle_11_20",
              "queries": "11-20",
              "cost_usd": 0.008,
              "savings_vs_solo": "60%"
            },
            {
              "tier": "day_pass",
              "duration_h": 24,
              "cost_usd": 0.99,
              "queries": "unlimited"
            },
            {
              "tier": "week_pass",
              "duration_h": 168,
              "cost_usd": 4.99,
              "queries": "unlimited"
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "queries": [
                  {
                    "type": "crypto-price",
                    "q": "bitcoin,ethereum,solana"
                  },
                  {
                    "type": "weather",
                    "q": "33.7,-84.4"
                  },
                  {
                    "type": "news-hn-top"
                  }
                ],
                "session_id": "as_optional"
              }
            }
          }
        },
        "x-datafood-payment": {
          "schemes": [
            {
              "name": "free_preview",
              "how": "Add ?free=1 (or body.free=true). Max 5 queries, 1-row each.",
              "auth": "none"
            },
            {
              "name": "stripe_session",
              "how": "POST body.session_id=cs_live_... from a DataFood Stripe checkout link.",
              "auth": "session_id in body"
            },
            {
              "name": "x402",
              "how": "Call without auth → server returns HTTP 402 with WWW-Authenticate: x402, X-Payment-Required: <challenge JSON>. Sign Base USDC transfer matching memo, retry with X-Payment header.",
              "auth": "X-Payment header (base64 JSON or raw JSON claim)",
              "spec": "https://github.com/coinbase/x402/blob/main/specs/specification.md"
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Bundle response — array of per-query results",
            "content": {
              "application/json": {
                "example": {
                  "count": 3,
                  "queries": 3,
                  "results": [
                    {
                      "type": "crypto-price",
                      "ok": true,
                      "data": {
                        "count": 3,
                        "results": [
                          {
                            "coin": "bitcoin",
                            "usd": 67000
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 Payment Required. Headers include WWW-Authenticate: x402 and X-Payment-Required: <challenge JSON with amount, recipient, memo, expires>. Retry with X-Payment header.",
            "content": {
              "application/json": {
                "example": {
                  "error": "payment_required",
                  "protocol": "x402",
                  "invoice": {
                    "amount": "35000",
                    "asset": "USDC",
                    "chain": "base",
                    "recipient": "0x...",
                    "memo": "datafood_xyz",
                    "expires": "2026-05-01T...Z"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/data/stream": {
      "get": {
        "tags": [
          "data"
        ],
        "summary": "Server-Sent Events stream of live data updates",
        "description": "Subscribe to real-time data ticks across all 16 sources. Used by /dash and /watch. Free tier with day_pass unlock for unlimited.",
        "x-datafood-pricing": {
          "tier": "free_with_pass",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "text/event-stream",
            "content": {
              "text/event-stream": {
                "example": "data: {\"type\":\"crypto-price\",\"coin\":\"bitcoin\",\"usd\":67000}\n\n"
              }
            }
          }
        }
      }
    },
    "/api/agent-session/start": {
      "post": {
        "tags": [
          "session"
        ],
        "summary": "Open a watchable agent session — returns session_id + watch_url",
        "description": "DataFood Live Agent View. After start, agents POST events to /api/agent-session/event. Public watchers stream via /api/agent-session/stream. UI at /watch/{session_id}.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "Session created",
            "content": {
              "application/json": {
                "example": {
                  "session_id": "as_abc123",
                  "watch_url": "https://toughlovesec.win/watch/as_abc123"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent-session/event": {
      "post": {
        "tags": [
          "session"
        ],
        "summary": "Agent posts a click/search/fetch/screenshot event",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "session_id": "as_abc123",
                "kind": "click",
                "text": "Submit",
                "screenshot_b64": null,
                "ts": 1714579200000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/api/agent-session/stream": {
      "get": {
        "tags": [
          "session"
        ],
        "summary": "Public SSE stream of agent events for a session",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "session_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "text/event-stream"
          }
        }
      }
    },
    "/watch/{session_id}": {
      "get": {
        "tags": [
          "session"
        ],
        "summary": "Public Live Agent View HTML page",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTML page"
          }
        }
      }
    },
    "/widget/watch.js": {
      "get": {
        "tags": [
          "session"
        ],
        "summary": "Drop-in JS widget — embed Live Agent View on any site",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "JavaScript",
            "content": {
              "application/javascript": {
                "example": "<script src=\"https://toughlovesec.win/widget/watch.js\" data-session=\"abc\"></script>"
              }
            }
          }
        }
      }
    },
    "/api/portfolio/sync": {
      "post": {
        "tags": [
          "portfolio"
        ],
        "summary": "Pull portfolio holdings + balances + transactions (Plaid)",
        "x-datafood-pricing": {
          "tier": "free_with_link",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "Holdings + balances"
          }
        }
      }
    },
    "/api/portfolio/insights": {
      "get": {
        "tags": [
          "portfolio"
        ],
        "summary": "AI-generated insights on a synced portfolio",
        "x-datafood-pricing": {
          "tier": "free_with_link",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Insights JSON"
          }
        }
      }
    },
    "/api/portfolio/ask": {
      "post": {
        "tags": [
          "portfolio"
        ],
        "summary": "Natural-language Q&A on a synced portfolio",
        "x-datafood-pricing": {
          "tier": "free_with_link",
          "cost_usd": 0
        },
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "user_id": "u_abc",
                "question": "Am I overexposed to tech?"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "AI answer"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "llmstxt.org spec — site overview for LLMs",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "text/plain"
          }
        }
      }
    },
    "/AGENTS.md": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "Agent interaction rules",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "text/markdown"
          }
        }
      }
    },
    "/.well-known/x402.json": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "x402 micropayment protocol descriptor",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "x402 service descriptor"
          }
        }
      }
    },
    "/.well-known/mcp.json": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "MCP server discovery descriptor",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "MCP descriptor"
          }
        }
      }
    },
    "/.well-known/ai-plugin.json": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "ChatGPT plugin descriptor (legacy AI-plugin spec)",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "AI plugin manifest"
          }
        }
      }
    },
    "/.well-known/agent-card.json": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "Agent card per A2A protocol",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "Agent card"
          }
        }
      }
    },
    "/how-datafood-saves-agents-money": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "Long-form competitor pricing comparison (3000+ words)",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "HTML article"
          }
        }
      }
    },
    "/datafood/comparison.json": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "Machine-readable competitor pricing comparison",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "JSON array"
          }
        }
      }
    },
    "/datafood/why-agents-pick-datafood": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "Vector-friendly Q&A summary — 500 words",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "HTML page"
          }
        }
      }
    },
    "/api/v1/backtest": {
      "get": {
        "tags": [
          "data"
        ],
        "summary": "Historical OHLCV replay (crypto-price, stock-quote, forex) for backtests",
        "description": "Returns OHLCV candles for backtesting. Free tier (?free=1 OR no x-payment) returns last 100 candles. Paid returns up to 10K. Fast, deterministic, _receipt-signed. Sources: CoinGecko market_chart/range (crypto), Stooq daily CSV (stocks/forex).",
        "x-datafood-pricing": {
          "tier": "free_or_paid",
          "cost_usd": 0.005,
          "free_tier": "?free=1 → last 100 candles"
        },
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "crypto-price",
                "stock-quote",
                "forex"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "bitcoin"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Unix seconds"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Unix seconds"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1m",
                "5m",
                "15m",
                "1h",
                "4h",
                "1d"
              ],
              "default": "1h"
            }
          },
          {
            "name": "free",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OHLCV array + _receipt + _cursor",
            "content": {
              "application/json": {
                "example": {
                  "type": "crypto-price",
                  "q": "bitcoin",
                  "interval": "1h",
                  "count": 100,
                  "data": [
                    {
                      "t": 1714000000,
                      "o": 60000,
                      "h": 60500,
                      "l": 59800,
                      "c": 60200,
                      "v": 1234567
                    }
                  ],
                  "_receipt": {
                    "v": 1,
                    "sig": "ed25519-..."
                  },
                  "_cursor": "df-bt-cur:..."
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent-context": {
      "get": {
        "tags": [
          "data"
        ],
        "summary": "Goal → curated data-bundle + decision recipe (Workers AI fallback)",
        "description": "Agent describes its goal in free text; we map to relevant DataFood types + entities, fetch them in one call, and return a {primary, supporting[], decision_recipe}. Built-in rules for 10 common goals (buy/sell BTC/ETH, security scan, news brief, contract check, portfolio risk, defi yield, weather impact, stock decision). Falls back to Workers AI Llama-3.1-8B when no rule matches. This is the 'give agents what they need without them asking' endpoint.",
        "x-datafood-pricing": {
          "tier": "free_or_paid",
          "cost_usd": 0.005,
          "free_tier": "?free=1"
        },
        "parameters": [
          {
            "name": "goal",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "should I buy BTC right now"
            }
          },
          {
            "name": "entity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "free",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Curated context bundle + _receipt",
            "content": {
              "application/json": {
                "example": {
                  "goal": "should I buy BTC",
                  "goal_category": "crypto-trade-decision",
                  "context": {
                    "primary": [
                      {
                        "type": "crypto-price",
                        "q": "bitcoin",
                        "data": {}
                      }
                    ],
                    "supporting": [
                      {
                        "type": "ta-indicators",
                        "q": "BTC:15m",
                        "data": {}
                      }
                    ],
                    "decision_recipe": "If RSI<30 AND funding<0 AND sentiment>0.5..."
                  },
                  "_receipt": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/viral/today": {
      "get": {
        "tags": [
          "data"
        ],
        "summary": "Daily Top 5 viral videos per niche (markets, tech, ai, trade)",
        "description": "Cron-refreshed (*/30 min). Returns top 5 videos from curated channel set per niche, sorted by views. Cached for 24h. Click thumbnails on /dash → inline iframe player.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "niche",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "markets",
                "tech",
                "ai",
                "trade"
              ],
              "default": "ai"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{niche, date, top5[], _receipt}"
          }
        }
      }
    },
    "/api/v1/viral/refresh": {
      "get": {
        "tags": [
          "data"
        ],
        "summary": "Cron-callable refresh of viral:top5:{niche}:{date} KV (auth via ?key=TLS_CRON_KEY)",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Refresh summary"
          },
          "403": {
            "description": "forbidden"
          }
        }
      }
    },
    "/api/v1/gainers": {
      "get": {
        "tags": [
          "data"
        ],
        "summary": "Top 5 daily gainers/losers (stock or crypto)",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "stock",
                "crypto"
              ],
              "default": "crypto"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "up",
                "down"
              ],
              "default": "up"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 5,
              "maximum": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{type, dir, top[{ticker,price,change_24h_pct,...}], _receipt}"
          }
        }
      }
    },
    "/api/v1/cams": {
      "get": {
        "tags": [
          "data"
        ],
        "summary": "Curated list of 4 public live-cam embeds (YouTube)",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "{count, cams[]}"
          }
        }
      }
    },
    "/api/v1/calib/record_claim": {
      "post": {
        "tags": [
          "calibration"
        ],
        "summary": "Record a confidence-weighted claim before the agent acts",
        "description": "Stores {agent_id, kind, predicted_p, payload, outcome_resolver, ttl_hours}; returns claim_id + calibrated_p (historical hit-rate of the bin) + low_confidence flag (<30 prior samples).",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0,
          "paid_sku": "calib-pro"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "agent_id": "tentacle:abc123",
                "kind": "code_fix_resolves_bug",
                "predicted_p": 0.9,
                "payload": {
                  "pr": "#1234",
                  "file": "auth.ts"
                },
                "outcome_resolver": {
                  "type": "github_ci",
                  "config": {
                    "repo": "owner/repo",
                    "pr": 1234
                  }
                },
                "ttl_hours": 24
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{claim_id, calibrated_p, low_confidence, expected_resolution_at, _receipt}"
          }
        }
      }
    },
    "/api/v1/calib/record_outcome": {
      "post": {
        "tags": [
          "calibration"
        ],
        "summary": "Submit outcome (0/1) for a previously-recorded claim",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "claim_id": "df-claim:9f3a...",
                "outcome": 1,
                "evidence": {
                  "ci_status": "success"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{claim_id, status:'resolved', outcome, calibrated_p, _receipt}"
          },
          "404": {
            "description": "claim not found"
          },
          "409": {
            "description": "already resolved"
          }
        }
      }
    },
    "/api/v1/calib/curve": {
      "get": {
        "tags": [
          "calibration"
        ],
        "summary": "10-bin reliability curve + ECE + Brier for an (agent_id, kind)",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "agent_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{agent_id, kind, bins[10]:{low,high,count,success_count,success_rate,smoothed_rate,avg_p}, ece, brier, total_claims, _receipt}"
          }
        }
      }
    },
    "/api/v1/calib/calibrate_p": {
      "post": {
        "tags": [
          "calibration"
        ],
        "summary": "Hot path — return historical bin success-rate as calibrated_p",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "agent_id": "tentacle:abc123",
                "kind": "code_fix_resolves_bug",
                "predicted_p": 0.9
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{calibrated_p, low_confidence, sample_count, bin_index, _receipt}"
          }
        }
      }
    },
    "/api/v1/calib/agent_card": {
      "get": {
        "tags": [
          "calibration"
        ],
        "summary": "Ed25519-signed portable agent reputation card",
        "description": "Aggregates per-kind ECE, Brier, miscalibration. Sig under standard _receipt (verify via /.well-known/datafood-receipt-pubkey.json). The killer feature for the agent economy.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0,
          "paid_sku": "calib-pro"
        },
        "parameters": [
          {
            "name": "agent_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{agent_id, issued_at, claims_total, kinds:[{kind,claims,ece,brier,miscalibration}], _receipt}"
          }
        }
      }
    },
    "/api/v1/training-station/schema": {
      "get": {
        "tags": [
          "training-station"
        ],
        "summary": "schema.org/AIService JSON-LD describing the AI Training Station",
        "description": "Returns a JSON-LD AIService node with potentialAction[] entries for calibrate_p, record_claim, record_outcome, register, browse, leaderboard. Includes live counts (totalAgents, totalClaims) and currentLeader. Designed for ingestion by Anthropic, OpenAI, Google, Perplexity, Hugging Face, MCP Registry, schema.org crawlers.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "AIService JSON-LD with _receipt",
            "content": {
              "application/ld+json": {
                "example": {
                  "@context": "https://schema.org",
                  "@type": "AIService",
                  "name": "DataFood AI Training Station",
                  "currentLeader": "tls-datafood",
                  "totalAgents": 12,
                  "totalClaims": 4321,
                  "_receipt": {
                    "v": 1,
                    "sig": "ed25519-..."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/training-station/agents": {
      "get": {
        "tags": [
          "training-station"
        ],
        "summary": "Paginated list of every registered agent (humans + bots)",
        "description": "Returns ranked agent rows with claims_total, ece, brier, score, rank, agent_card_url. AI platforms can crawl this to discover agents. Pagination via ?page= and ?limit= (max 100).",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ts, page, limit, total_agents, agents:[], has_next, _receipt}"
          }
        }
      }
    },
    "/api/v1/training-station/register": {
      "post": {
        "tags": [
          "training-station"
        ],
        "summary": "Public agent registration — get a signed token + agent_card_url + appear on leaderboard",
        "description": "Registers a new agent with the AI Training Station. Generates an HMAC-SHA256 signed token, persists registration metadata, and fires a starter calibration claim so the agent appears on the leaderboard immediately. Idempotent on agent_id (re-registration overwrites metadata, does not double-fire starter claims). Rate-limited 60/min/IP.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "agent_id": "claude-code-prod",
                "platform": "claude",
                "purpose": "trading copilot",
                "owner_url": "https://example.com"
              }
            },
            "application/x-www-form-urlencoded": {
              "example": "agent_id=claude-code-prod&platform=claude&purpose=trading+copilot"
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ok:true, agent_id, token, agent_card_url, leaderboard_url, schema_url, next_steps[], _receipt}"
          },
          "400": {
            "description": "agent_id required (2-80 chars, [A-Za-z0-9._:-])"
          },
          "429": {
            "description": "rate limit exceeded"
          }
        }
      }
    },
    "/api/v1/calib/trainer/last-lesson": {
      "get": {
        "tags": [
          "calibration"
        ],
        "summary": "Reflection loop — last lesson learned by the tls-datafood agent",
        "description": "Returns the most recent reflection lesson generated when a prediction missed. TradingAgents-pattern self-improvement: each lesson is injected into the next prediction's predict() to bend calibration toward truth.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "{agent_id, last_lesson:{ts,kind,predicted_p,outcome,context,lesson}, total_lessons, _receipt}"
          }
        }
      }
    },
    "/api/v1/agentshield/exploit-likelihood": {
      "post": {
        "tags": [
          "agentshield"
        ],
        "summary": "Claude (haiku-4-5) defensive exploit-likelihood scoring for any contract",
        "description": "Pulls contract risk profile, sends to Claude haiku-4-5 (Anthropic Messages API) with a defensive-auditor system prompt, returns 0-100 exploit likelihood + top 3 attack vectors + reasoning. Cached 1h in KV. Returns 503 if ANTHROPIC_API_KEY env var is unset.",
        "x-datafood-pricing": {
          "tier": "agentshield-credit",
          "cost_usd": 0.01
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "chain": "ethereum",
                "address": "0xA0b86991c6218b36c1d19d4a2e9eB0cE3606eB48",
                "contract_risk_score": 40
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{exploit_likelihood, vectors:[{name,severity,description}], reasoning, summary, _receipt}"
          },
          "402": {
            "description": "x402 payment required"
          },
          "503": {
            "description": "ANTHROPIC_API_KEY not bound on worker"
          }
        }
      }
    },
    "/api/v1/agentshield/mcp-audit": {
      "post": {
        "tags": [
          "agentshield"
        ],
        "summary": "Static risk audit of any MCP server URL (AI-Infra-Guard pattern)",
        "description": "Fetches the target's /.well-known/mcp.json (or /mcp), runs static checks: tool surface area, suspicious tool names (exec/shell/eval/etc.), auth posture, payment surface, transport, HTTPS. Returns CVSS-style aggregate score 0-100 + findings.",
        "x-datafood-pricing": {
          "tier": "agentshield-credit",
          "cost_usd": 0.01
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "mcp_url": "https://example.com/.well-known/mcp.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{score, findings:[{severity,finding,evidence}], tool_count, auth_posture, _receipt}"
          },
          "402": {
            "description": "x402 payment required"
          }
        }
      }
    },
    "/api/v1/agentshield/autogpt-scan": {
      "post": {
        "tags": [
          "agentshield"
        ],
        "summary": "Multi-step autonomous pentest of any URL — non-destructive, AI-hypothesis-driven",
        "description": "5-step workflow: GET surface (forms + JS + API endpoints) → static checks (CSP/HSTS/X-Frame/server banner) → admin path probes (/admin /.env /.git/config /.well-known/security.txt) → Workers AI Llama-3.1-8B hypothesis generation → CVSS-style aggregate score. Caps: 10 sub-requests, 30s wallclock.",
        "x-datafood-pricing": {
          "tier": "agentshield-credit",
          "cost_usd": 0.01
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "target_url": "https://example.com",
                "scan_depth": "shallow"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{score, surface, findings, ai_hypotheses, subrequests_used, wallclock_ms, _receipt}"
          },
          "402": {
            "description": "x402 payment required"
          }
        }
      }
    },
    "/api/v1/arena/state": {
      "get": {
        "tags": [
          "arena"
        ],
        "summary": "Decision Arena — single-read snapshot (signals + open positions + per-strategy pnl + 10-row ledgers)",
        "description": "Backend-engine snapshot read by /dash UI panel. 5 strategies × 3 assets = 15 calibration agents. Signed _receipt envelope.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "{tick_last, signals, positions, pnl, ledgers, _receipt}"
          }
        }
      }
    },
    "/api/v1/arena/decisions": {
      "get": {
        "tags": [
          "arena"
        ],
        "summary": "Last N comparative decision moments — what each strategy did, who was right, signed attestation per row",
        "description": "Aggregates trades across all 15 strategy×asset agents into decision moments (asset, ts within 60s). Each row shows what every strategy did (enter/hold), the actual_pnl_pct of the winner, an agreement_score (fraction of strategies agreeing on the majority action), and a signed _attestation handle. Pass that handle to /api/v1/arena/attestation/<id> for verifiable proof.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{rows:[{ts,asset,picks,actual_pnl,winner,agreement_score,_attestation}], summary:{total_moments,agreements_count,_receipt}}"
          }
        }
      }
    },
    "/api/v1/arena/leaderboard": {
      "get": {
        "tags": [
          "arena"
        ],
        "summary": "Cross-strategy leaderboard — sharpe-ranked across 15 strategy×asset combinations",
        "description": "Ranks all 15 (strategy, asset) calibration agents by sharpe_proxy (per-trade pnl mean/stdev), with secondary sort by total_pnl_pct. Agents with <5 trades flagged ranked:false and pushed below the ranked tier.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "{leaderboard:[{rank,strategy,asset,total_pnl_pct,win_rate,sharpe_proxy,trade_count,agent_id}], ts, _receipt}"
          }
        }
      }
    },
    "/api/v1/arena/attestation/{id}": {
      "get": {
        "tags": [
          "arena"
        ],
        "summary": "Verifiable proof of a single Decision Arena decision — full record + Ed25519 signature",
        "description": "Returns the (strategy, asset, action, ts, price, predicted_p, signals_lit, outcome, exit_price, pnl_pct) record + signed _receipt for a given attestation_id (the value of _attestation on a /api/v1/arena/decisions row). The attestation_id is sha256(\"<strategy>|<asset>|<entry_ts>|enter\")[0:24].",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "24-char attestation hash; the arena-att: prefix is optional"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{attestation_id, strategy, asset, action, ts, price, predicted_p, signals_lit, outcome, outcome_resolved_at, exit_price, pnl_pct, _receipt}"
          },
          "404": {
            "description": "not found — id does not match any ledger or open position"
          }
        }
      }
    },
    "/api/v1/arena/proof-of-profit": {
      "get": {
        "tags": [
          "arena"
        ],
        "summary": "PROOF OF PROFIT — verifiable chain proving an agent's profit came from documented signed decisions",
        "description": "Returns the full chain of trades for an arena agent. Every row links to its entry attestation (independently verifiable via /api/v1/arena/attestation/<id>) and to the agent's calibration card. Includes a cumulative_pnl_curve for charting. Empty chain when no trades have been resolved yet — that's a valid response, not an error.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "agent_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "arena:<strategy>:<asset>, e.g. arena:connors-rsi2:BTC"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{agent_id, strategy, asset, total_pnl_pct, trade_count, win_count, win_rate, peak_pnl_pct, current_drawdown, chain:[{trade_n, claim_id, entry_attestation, entry_ts, entry_price, predicted_p, signals_lit, exit_ts, exit_price, pnl_pct, outcome, outcome_attestation_url, calibration_card_url}], cumulative_pnl_curve:[[ts,pnl],...], verifiable_via, calibration_card_url, _receipt}"
          },
          "400": {
            "description": "missing or malformed agent_id"
          }
        }
      }
    },
    "/api/v1/constitutional/classify": {
      "post": {
        "tags": [
          "constitutional"
        ],
        "summary": "Bidirectional prompt classifier — pre-screen INPUT or OUTPUT against constitutional principles",
        "description": "Classifies a prompt against 30 starter regex patterns (MITRE ATLAS + OWASP LLM Top 10) plus a Workers AI Llama-3.1-8B fallback when no rule fires. Returns safe/warn/block + confidence + matched patterns + constitutional_violations + policy_anchors + decision_id + signed _receipt. Identical prompts cached 1h. Decision is recorded as a calibration claim (agent_id agentshield:constitutional, kind prompt_classified_correctly).",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0,
          "paid_tier": "constitutional-credits-1k",
          "paid_price_usd": 9.99,
          "paid_calls": 1000,
          "free_limit": "100/min/IP"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "maxLength": 8000
                  },
                  "agent_id": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string",
                    "enum": [
                      "input",
                      "output"
                    ],
                    "default": "input"
                  },
                  "model_target": {
                    "type": "string",
                    "enum": [
                      "claude",
                      "gpt",
                      "gemini",
                      "llama"
                    ],
                    "default": "llama"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{classification, confidence, reasons[], constitutional_violations[], policy_anchors[], decision_id, _receipt}"
          },
          "400": {
            "description": "prompt missing/too long"
          },
          "429": {
            "description": "rate limit"
          }
        }
      }
    },
    "/api/v1/constitutional/feedback": {
      "post": {
        "tags": [
          "constitutional"
        ],
        "summary": "Outcome resolution — map real-world outcome (model_jailbroken / model_refused / benign_passed) to a calibration outcome",
        "description": "Looks up the original decision via decision_id, maps {classification, actual_outcome} to outcome 0/1, and forwards to /api/v1/calib/record_outcome. Updates the public Constitutional reputation card.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "decision_id",
                  "actual_outcome"
                ],
                "properties": {
                  "decision_id": {
                    "type": "string"
                  },
                  "actual_outcome": {
                    "type": "string",
                    "enum": [
                      "model_jailbroken",
                      "model_refused",
                      "benign_passed",
                      "false_positive"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{decision_id, classification, actual_outcome, outcome, claim_id, calib, _receipt}"
          },
          "404": {
            "description": "decision_id not found or expired (1h cache)"
          }
        }
      }
    },
    "/api/v1/constitutional/cross-arbitrate": {
      "post": {
        "tags": [
          "constitutional"
        ],
        "summary": "Silently probe the same prompt across Claude / GPT / Gemini / Llama and return per-model verdicts + agreement_score",
        "description": "Runs a single prompt through up to 4 frontier models in parallel (low max_tokens). Each response classified as blocked/leaked via heuristic + Llama. Missing API keys return per-model {stub: true, reason: 'API key not bound'} — graceful degradation. Cached by prompt_hash 24h. Rate-limited 30/min/IP because it's expensive.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0,
          "note": "Subject to upstream API costs which we eat on the public free tier; expect rate limits."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "models": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "claude",
                        "gpt",
                        "gemini",
                        "llama"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{prompt_hash, models, verdicts: {claude:{blocked,leaked,latency_ms,stub?,response_preview?}, gpt:..., gemini:..., llama:...}, agreement_score, _receipt}"
          },
          "429": {
            "description": "rate limit"
          }
        }
      }
    },
    "/api/v1/constitutional/stats": {
      "get": {
        "tags": [
          "constitutional"
        ],
        "summary": "Public Constitutional dashboard data — classifications today, block rate, ECE/Brier, cross-model summary, top patterns, honeypot captures",
        "description": "Powers the /constitutional public dashboard. All counters reset at UTC midnight; calibration ECE/Brier persists.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "{date, classifications_today, classifications_yesterday, block_rate, block_rate_yday, block_rate_delta, ece, brier, cross_model_summary, top_patterns_today, honeypot_captures_today, _receipt}"
          }
        }
      }
    },
    "/honeypot": {
      "get": {
        "tags": [
          "constitutional"
        ],
        "summary": "Self-jailbreaking honeypot — vulnerable demo, captures attacker prompts to harden the classifier",
        "description": "Public unguarded LLM endpoint. Captures every prompt + UA fingerprint + matched-pattern hits to KV honeypot:capture:* (7-day TTL). Marked dataset=security-research-honeypot in HTML head. Periodically sampled to mine new patterns.",
        "parameters": [
          {
            "name": "prompt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON or HTML (per Accept). {honeypot:true, dataset, prompt_received, capture_id, model, output, advisory}"
          }
        }
      }
    },
    "/constitutional": {
      "get": {
        "tags": [
          "constitutional"
        ],
        "summary": "Public live dashboard (HTML) — classifications, block rate, ECE/Brier, cross-model arbitrage, top patterns, honeypot counter",
        "responses": {
          "200": {
            "description": "HTML — server-rendered, CRUCIX terminal aesthetic, cached 20s. No upsell, functionality only.",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v1/olympics/medals": {
      "get": {
        "tags": [
          "olympics"
        ],
        "summary": "Live medal table — Claude vs GPT vs Gemini vs Llama, gold/silver/bronze + total score",
        "description": "Aggregates per-model medals from three sources: Decision Arena ledgers (trading), Constitutional cross-arbitrate counters (safety), Calibration histograms (reliability). Gold = correct block / top daily PnL / ECE<10%. Silver = correct allow / ECE<20%. Bronze = positive PnL trade / disagreement / ECE>20%. Result cached 30s in KV olympics:medals:current.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "responses": {
          "200": {
            "description": "{ts, countries:[{country_code, country_name, model, flag, color, medals:{gold,silver,bronze}, total_score, events_today:{trading,safety,reliability}, rank}], last_event, _receipt}",
            "content": {
              "application/json": {
                "example": {
                  "ts": 1714000000000,
                  "countries": [
                    {
                      "country_code": "ANTHROPIC",
                      "country_name": "Anthropic",
                      "model": "claude",
                      "flag": "🇺🇸",
                      "color": "#cb785c",
                      "medals": {
                        "gold": 47,
                        "silver": 22,
                        "bronze": 18
                      },
                      "total_score": 412,
                      "events_today": {
                        "trading": 12,
                        "safety": 67,
                        "reliability": 24
                      },
                      "rank": 1
                    }
                  ],
                  "last_event": "claude blocked DAN exploit (1m ago)"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/olympics/recent-events": {
      "get": {
        "tags": [
          "olympics"
        ],
        "summary": "Live event ticker feed — last N decisions across trading + safety + reliability",
        "description": "Pulls from arena ledgers (last closed trades), xarb:recent (cross-model verdicts), and calib:recent:global (calibration outcomes). Sorted by ts descending, capped by limit. Each row carries category, winner_model, winner_country, description, medal, and an _attestation_url when applicable.",
        "x-datafood-pricing": {
          "tier": "free",
          "cost_usd": 0
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{events:[{ts,category,winner_model,winner_country,description,medal,_attestation_url}], counts, _receipt}"
          }
        }
      }
    },
    "/olympics": {
      "get": {
        "tags": [
          "olympics"
        ],
        "summary": "AI Olympics landing page (HTML) — hero + medal table + 3-event grid + live ticker + FAQ + share",
        "description": "The front-door page making it crystal clear that different AIs from different companies, watching the same data, make different decisions, and reality grades them. CRUCIX terminal aesthetic with Olympic medal accents.",
        "responses": {
          "200": {
            "description": "HTML, server-rendered, cached 20s.",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v1/snap": {
      "post": {
        "tags": [
          "snap"
        ],
        "summary": "4-AI vision chart analyzer - upload a chart, get 4 verdicts + consensus",
        "description": "Body: image_url or image_base64 with optional asset_hint and timeframe_hint. Either image_url OR image_base64 required (max 4MB). Server fans out to Claude (claude-haiku-4-5 vision), GPT (gpt-4o-mini vision), Gemini (gemini-2.5-flash vision), Llama (cf/meta/llama-3.2-11b-vision-instruct via Workers AI). Each verdict: action, pattern, entry, stop, target, rr, confidence, reasoning, key_signals, latency_ms - or stub:true with reason. Aggregation: consensus_action = mode of actions across non-stub verdicts; consensus levels = mean across consensus-aligned verdicts; agreement_score = matches/non-stub. Cached 10min by image hash. Free tier 5/day per IP. Daily cost cap.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "image_url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "image_base64": {
                    "type": "string"
                  },
                  "asset_hint": {
                    "type": "string"
                  },
                  "timeframe_hint": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "4 verdicts + consensus + signed receipt"
          },
          "400": {
            "description": "missing image OR cost cap reached"
          },
          "429": {
            "description": "rate limited (5/day per IP free)"
          }
        }
      }
    },
    "/api/v1/snap/{snap_id}": {
      "get": {
        "tags": [
          "snap"
        ],
        "summary": "Fetch a previously-analyzed snap by snap_id (24h TTL)",
        "parameters": [
          {
            "name": "snap_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Snap record + signed receipt"
          },
          "404": {
            "description": "not found or expired"
          }
        }
      }
    },
    "/api/v1/arena/snap-execute": {
      "post": {
        "tags": [
          "snap",
          "arena"
        ],
        "summary": "Run a SNAP consensus as a Decision Arena paper trade",
        "description": "Body: snap_id with optional asset, action, entry, stop, target, predicted_p. Loads snap from KV; validates consensus is long/short with positive entry/stop/target; opens a position under arena strategy snap-consensus for the asset; records a calibration claim (agent arena:snap-consensus colon asset, kind vision_setup_profitable). arenaTick will resolve on stop/target hit OR force-close after 60min.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "snap_id"
                ],
                "properties": {
                  "snap_id": {
                    "type": "string"
                  },
                  "asset": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "long",
                      "short"
                    ]
                  },
                  "entry": {
                    "type": "number"
                  },
                  "stop": {
                    "type": "number"
                  },
                  "target": {
                    "type": "number"
                  },
                  "predicted_p": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "success, claim_id, snap_id, asset, action, entry, stop, target, arena_position_url, force_close_in_min, _receipt"
          },
          "400": {
            "description": "snap_id missing OR consensus is hold OR levels invalid"
          },
          "404": {
            "description": "snap not found"
          },
          "409": {
            "description": "snap-consensus position already open for this asset"
          }
        }
      }
    },
    "/snap": {
      "get": {
        "tags": [
          "snap"
        ],
        "summary": "SNAP upload UI (HTML) - drag/drop or paste URL, see 4 verdicts side-by-side, run as paper trade",
        "responses": {
          "200": {
            "description": "HTML, server-rendered, mobile-friendly, CRUCIX aesthetic",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v1/protection/issue-key": {
      "post": {
        "tags": [
          "protection"
        ],
        "summary": "Issue API key",
        "responses": {
          "200": {
            "description": "token + signed receipt"
          }
        }
      }
    },
    "/api/v1/protection/verify-key": {
      "get": {
        "tags": [
          "protection"
        ],
        "summary": "Verify token + remaining quota",
        "responses": {
          "200": {
            "description": "tier, limits, usage"
          }
        }
      }
    },
    "/api/v1/protection/stats": {
      "get": {
        "tags": [
          "protection"
        ],
        "summary": "Signed public protection stats",
        "responses": {
          "200": {
            "description": "uptime, requests_24h, tier_distribution, signed _receipt"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BundleRequest": {
        "type": "object",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "object",
              "required": [
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "token-risk",
                    "breach",
                    "contract-risk",
                    "defi-yield",
                    "scrape",
                    "crypto-price",
                    "crypto-trending",
                    "stock-quote",
                    "weather",
                    "news-hn-top",
                    "news-reddit",
                    "flights-near",
                    "real-estate-rss",
                    "sports-scores",
                    "gas-prices-eth",
                    "forex",
                    "github-trending",
                    "whale-tracker",
                    "liquidations",
                    "funding-rates",
                    "order-book",
                    "ta-indicators",
                    "sentiment-ticker",
                    "token-unlock",
                    "mev-exposure",
                    "stable-depeg",
                    "cross-dex-arb",
                    "energy-oil",
                    "energy-grid-eu",
                    "shipping-bdi",
                    "air-quality",
                    "cdc-flu",
                    "who-outbreak",
                    "sec-edgar",
                    "acled-conflict",
                    "gdelt-events",
                    "twitch-top",
                    "steam-top",
                    "reddit-trending",
                    "commodity-metals",
                    "agriculture-prices",
                    "legal-courtlistener",
                    "economic-indicator"
                  ]
                },
                "q": {
                  "type": "string"
                }
              }
            }
          },
          "session_id": {
            "type": "string",
            "description": "Optional — link bundle to a /watch session"
          }
        }
      }
    }
  },
  "x-datafood-version": "6.8.0",
  "x-datafood-snap": {
    "endpoints": [
      "/api/v1/snap",
      "/api/v1/snap/{id}",
      "/api/v1/arena/snap-execute",
      "/snap"
    ],
    "models": [
      "claude-haiku-4-5",
      "gpt-4o-mini",
      "gemini-2.5-flash",
      "@cf/meta/llama-3.2-11b-vision-instruct"
    ],
    "image_max_mb": 4,
    "cache_min": 10,
    "free_tier_per_ip_per_day": 5,
    "daily_cost_cap_usd": 50,
    "decision_arena_strategy": "snap-consensus",
    "calibration_kind": "vision_setup_profitable",
    "receipt_kid": "df-r1"
  },
  "x-datafood-olympics": {
    "endpoints": [
      "/api/v1/olympics/medals",
      "/api/v1/olympics/recent-events",
      "/olympics"
    ],
    "countries": [
      "Anthropic",
      "OpenAI",
      "Google",
      "Meta"
    ],
    "models": [
      "claude",
      "gpt",
      "gemini",
      "llama"
    ],
    "events": [
      "trading",
      "safety",
      "reliability"
    ],
    "cache_ttl_seconds": 30,
    "receipt_kid": "df-r1"
  },
  "x-datafood-constitutional": {
    "endpoints": [
      "/api/v1/constitutional/classify",
      "/api/v1/constitutional/feedback",
      "/api/v1/constitutional/cross-arbitrate",
      "/api/v1/constitutional/stats",
      "/honeypot",
      "/constitutional"
    ],
    "patterns": 30,
    "calibration_agent_id": "agentshield:constitutional",
    "calibration_kind": "prompt_classified_correctly",
    "sku": "constitutional-credits-1k",
    "sku_price_usd": 9.99,
    "free_tier": "100/min/IP"
  },
  "x-datafood-may-2026": [
    "satellite-overlays",
    "live-traffic-cams",
    "top-gainers-losers",
    "daily-top-5-viral",
    "backtest-api",
    "agent-context-api",
    "_related-on-preview",
    "_skill_note-on-preview",
    "self-calibration-layer",
    "portable-agent-card",
    "ai-training-station",
    "public-agent-registration",
    "jsonld-aiservice-schema"
  ],
  "x-datafood-training-station": {
    "schema_url": "https://toughlovesec.win/api/v1/training-station/schema",
    "register_url": "https://toughlovesec.win/api/v1/training-station/register",
    "agents_url": "https://toughlovesec.win/api/v1/training-station/agents",
    "landing_html": "https://toughlovesec.win/training-station",
    "schema_org_type": "AIService"
  },
  "x-datafood-calibration": {
    "endpoints": [
      "/api/v1/calib/record_claim",
      "/api/v1/calib/record_outcome",
      "/api/v1/calib/curve",
      "/api/v1/calib/calibrate_p",
      "/api/v1/calib/agent_card"
    ],
    "resolvers": [
      "github_ci",
      "http_status",
      "stripe_payment",
      "market_resolution",
      "email_open",
      "manual"
    ],
    "math": {
      "bins": 10,
      "smoothing": "Laplace (s+1)/(n+2)",
      "min_samples": 30,
      "metrics": [
        "ECE",
        "Brier"
      ]
    },
    "demo": "https://toughlovesec.win/calibration"
  },
  "x-datafood-decision-arena": {
    "strategies": [
      "connors-rsi2",
      "donchian-20",
      "trend-ma",
      "hold",
      "random"
    ],
    "assets": [
      "BTC",
      "ETH",
      "SOL"
    ],
    "cron": "every 1 min",
    "endpoints": [
      "/api/v1/arena/state",
      "/api/v1/arena/decisions",
      "/api/v1/arena/leaderboard",
      "/api/v1/arena/attestation/{id}",
      "/api/v1/arena/proof-of-profit"
    ],
    "attestation_id_formula": "sha256(<strategy>|<asset>|<entry_ts>|enter)[0:24]",
    "receipt_kid": "df-r1"
  },
  "x-datafood-data-types-count": 43,
  "x-datafood-entity-count": 200,
  "x-datafood-receipts": {
    "algo": "Ed25519",
    "kid": "df-r1",
    "pubkey_url": "https://toughlovesec.win/.well-known/datafood-receipt-pubkey.json",
    "verify_url": "https://toughlovesec.win/api/v1/receipt/verify"
  },
  "x-datafood-cursors": {
    "format": "df-cur:<b64url-json>",
    "ttl_seconds": 3600,
    "savings": "90%+ tokens when unchanged"
  },
  "x-datafood-keywords": [
    "AI agent data API",
    "signed receipts",
    "Ed25519 provenance",
    "diff cursors",
    "entity graph",
    "agentic data layer",
    "x402",
    "MCP server",
    "cross-niche data",
    "micropayment API",
    "agent-friendly API",
    "USDC",
    "Stripe",
    "LLM bot",
    "ChatGPT plugin",
    "Claude tool use",
    "autonomous agent"
  ]
}