{
  "demo": true,
  "endpoint": "/api/v1/db/explain-optimizer",
  "protocol": "L402",
  "price_sats": 15,
  "preview": {
    "bottlenecks_detected": [
      "Sequential Table Scan on 'invoices' (cost=0.00..8450.20 rows=450000 width=32)",
      "Hash Join on unindexed foreign key 'user_id' causing high buffer memory allocation"
    ],
    "estimated_cost_reduction_pct": 88.5,
    "recommended_rewrites": [
      "Create index idx_invoices_settled_at on invoices(status, settled_at) to convert Seq Scan into Index Scan",
      "Add composite index on invoices(user_id, amount_sats) to allow Index Only Scan for grouping"
    ]
  },
  "notice": "Pay 15 sats via L402 (or call via /mcp/context-code-solver) to execute live deterministic computation.",
  "upsell": {
    "message": "Upgrade to production tier for unlimited high-concurrency execution and live edge model compute.",
    "supported_payment_rails": [
      "Bitcoin Lightning (L402 / LSAT)",
      "Solana (x402 / SPL tokens)",
      "Base Ethereum (MPP / USDC)",
      "Garlicoin (L1 0-Conf / BSC WGRLC)"
    ],
    "starting_price_sats": 15,
    "portal_checkout": "https://diogenesgateway.com#payments",
    "free_developer_tier": "15 100% free coding tools available at https://diogenesgateway.com#one-click-connectors"
  }
}