{
  "openapi": "3.1.0",
  "info": {
    "title": "ToolMint Address Risk Bundle JSON",
    "version": "0.1.0",
    "description": "Location risk bundle for AI agents: Census county/tract, active NWS alerts, nearby USGS earthquakes, FEMA NFHL flood zone. For insurance, logistics, events, and travel. Pay per call with USDC on Base via x402 ($0.05).",
    "x-guidance": "Use GET /risk?lat=&lon= or GET /risk?address=\u2026 Use /risk/point and /risk/address aliases. Unpaid calls receive HTTP 402 with x402 payment requirements (USDC on Base). Free: /, /health, /openapi.json, /.well-known/x402. Errors (400/404/422/5xx) are not charged. FEMA flood zone is informational only: Informational point lookup of FEMA's public NFHL GIS service. NOT an official flood zone determination (not a FEMA Standard Flood Hazard Determination Form, LOMA or LOMR) and NOT for flood-insurance rating, mandatory-purchase, lending or underwriting decisions. Maps can be outdated, preliminary data is excluded, geocoded address points are approximate (interpolated along the street), and points near a zone boundary may differ. Verify at https://msc.fema.gov. Not endorsed by FEMA.",
    "contact": {
      "email": "toolmint.dev@gmail.com",
      "name": "ToolMint"
    }
  },
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Liveness",
        "security": [],
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/risk": {
      "get": {
        "operationId": "address_risk_bundle",
        "summary": "Location risk bundle by lat/lon or address",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "50000"
        },
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "name": "lon",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "name": "address",
            "in": "query",
            "description": "Use instead of lat/lon (not both)",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "quakeRadiusKm",
            "in": "query",
            "schema": {
              "type": "number",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "quakeDays",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 1,
              "maximum": 365
            }
          },
          {
            "name": "quakeMinMag",
            "in": "query",
            "schema": {
              "type": "number",
              "default": 2.5,
              "minimum": 0,
              "maximum": 10
            }
          },
          {
            "name": "alertLimit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Risk bundle JSON (partial: true + failedComponents if one hazard source failed)"
          },
          "400": {
            "description": "Invalid or missing parameters (no charge)"
          },
          "402": {
            "description": "Payment Required (x402)"
          },
          "404": {
            "description": "Address not matched by the Census geocoder (no charge)"
          },
          "422": {
            "description": "Point outside US Census coverage (no charge)"
          },
          "502": {
            "description": "Census or 2+ hazard sources unavailable (no charge)"
          },
          "504": {
            "description": "Census geocoder timed out (no charge)"
          }
        }
      }
    },
    "/risk/point": {
      "get": {
        "operationId": "address_risk_point",
        "summary": "Location risk bundle for lat/lon",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "50000"
        },
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "name": "quakeRadiusKm",
            "in": "query",
            "schema": {
              "type": "number",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "quakeDays",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 1,
              "maximum": 365
            }
          },
          {
            "name": "quakeMinMag",
            "in": "query",
            "schema": {
              "type": "number",
              "default": 2.5,
              "minimum": 0,
              "maximum": 10
            }
          },
          {
            "name": "alertLimit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Risk bundle JSON (partial: true + failedComponents if one hazard source failed)"
          },
          "400": {
            "description": "Invalid or missing parameters (no charge)"
          },
          "402": {
            "description": "Payment Required (x402)"
          },
          "404": {
            "description": "Address not matched by the Census geocoder (no charge)"
          },
          "422": {
            "description": "Point outside US Census coverage (no charge)"
          },
          "502": {
            "description": "Census or 2+ hazard sources unavailable (no charge)"
          },
          "504": {
            "description": "Census geocoder timed out (no charge)"
          }
        }
      }
    },
    "/risk/address": {
      "get": {
        "operationId": "address_risk_address",
        "summary": "Location risk bundle for a US address",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "50000"
        },
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "quakeRadiusKm",
            "in": "query",
            "schema": {
              "type": "number",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "quakeDays",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 1,
              "maximum": 365
            }
          },
          {
            "name": "quakeMinMag",
            "in": "query",
            "schema": {
              "type": "number",
              "default": 2.5,
              "minimum": 0,
              "maximum": 10
            }
          },
          {
            "name": "alertLimit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Risk bundle JSON (partial: true + failedComponents if one hazard source failed)"
          },
          "400": {
            "description": "Invalid or missing parameters (no charge)"
          },
          "402": {
            "description": "Payment Required (x402)"
          },
          "404": {
            "description": "Address not matched by the Census geocoder (no charge)"
          },
          "422": {
            "description": "Point outside US Census coverage (no charge)"
          },
          "502": {
            "description": "Census or 2+ hazard sources unavailable (no charge)"
          },
          "504": {
            "description": "Census geocoder timed out (no charge)"
          }
        }
      }
    }
  }
}