# Lotus Network API – Base L2 Gas Preflight

> Lotus Network API – Base L2 Gas Preflight is a paid API for AI agents from lotusnetworkapi.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Returns current Base L2 gas conditions (base fee, recent percentiles, volatility, congestion state) plus a probabilistic 80% forecast range for a chosen horizon in minutes.

## Facts

- Endpoint: GET https://lotusnetworkapi.com/api/v1/gas/preflight
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lotus-network-api-base-l2-gas-preflight-905e3fcc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wsi0iSIuzl05hFGeBEnmG

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability lotus-network-api-base-l2-gas-preflight-905e3fcc
```

Example prompt: Before I submit this Base transaction, can you pull a gas preflight for the next 20 minutes — I want to see the current base fee, congestion level, and the 80% forecast range so I can decide whether to send it now or wait?

## When to prefer this

Choose this endpoint when an AI agent needs real-time, statistically grounded Base L2 gas intelligence — especially when deciding whether to execute or defer a transaction. It is distinct from generic Ethereum mainnet gas APIs because it reads directly from Base chain RPC data and provides probabilistic forecast ranges with volatility context, not just a spot price. Prefer it over wallet-embedded gas estimators when the agent needs structured, machine-readable forecast data with percentile breakdowns.

## Known failure modes

- Invalid horizonMinutes value outside 1–60 range returns a validation error
- RPC connectivity issues may cause stale or unavailable chain data
- If Base chain is experiencing an outage, the endpoint may return an error or degraded response
- Payment failure (x402 protocol) will block access before any data is returned

## How this service works

Read-only Base L2 gas conditions computed directly from chain data: current base fee, recent percentiles, realised volatility, congestion state, and an 80% forecast range for a chosen horizon. This is supporting context for timing a transaction, not a trade instruction. Every figure is reproducible from public Base RPC data.

## Output

A JSON object containing: the current Base block number, observed timestamp, current base fee in Gwei, gas used ratio, congestion label; recent statistics (median, p10, p90 in Gwei, realised volatility, block count); and a forecast object (center, low, high Gwei estimates, target block, and interval) representing an 80% confidence range for the requested horizon.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "horizonMinutes": {
       "type": "integer",
       "description": "Forecast horizon in minutes (1-60)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "block": {
       "type": "number"
      },
      "chain": {
       "type": "string"
      },
      "recent": {
       "type": "object",
       "description": "medianGwei, p10Gwei, p90Gwei, volatility, blocks"
      },
      "current": {
       "type": "object",
       "description": "baseFeeGwei, congestion, gasUsedRatio"
      },
      "success": {
       "type": "boolean"
      },
      "forecast": {
       "type": "object",
       "description": "centerGwei, lowGwei, highGwei, targetBlock, interval"
      },
      "observedAt": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "block": 24881003,
  "chain": "base-mainnet",
  "recent": {
   "blocks": 300,
   "p10Gwei": 0.0119,
   "p90Gwei": 0.0181,
   "medianGwei": 0.0138,
   "volatility": 0.041
  },
  "current": {
   "congestion": "calm",
   "baseFeeGwei": 0.0142,
   "gasUsedRatio": 0.31
  },
  "success": true,
  "forecast": {
   "method": "mean-reverting log random walk on realised block volatility",
   "lowGwei": 0.0106,
   "highGwei": 0.0182,
   "interval": 0.8,
   "centerGwei": 0.0139,
   "targetBlock": 24881153,
   "horizonMinutes": 5
  },
  "observedAt": "2026-07-30T04:12:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lotus-network-api-base-l2-gas-preflight-905e3fcc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from lotusnetworkapi.com](https://www.zero.xyz/host/lotusnetworkapi.com/llms.txt)
