# EVM Gas Fee Snapshot API

> EVM Gas Fee Snapshot API is a paid API for AI agents from evm-gas.apitoll.cloud, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns real-time EIP-1559 gas fee tiers (slow/standard/fast), current base fee, latest block, and median block fullness for 17 EVM-compatible chains via direct RPC eth_feeHistory sampling.

## Facts

- Endpoint: GET https://evm-gas.apitoll.cloud/v1/evm/gas
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-gas-apitoll-cloud-2cf70775
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wsAwWw9PAG73qh1d7G1jE

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 evm-gas-apitoll-cloud-2cf70775
```

Example prompt: What are the slow, standard, and fast gas fee tiers on Arbitrum right now — sample the last 10 blocks?

## When to prefer this

Choose this endpoint when you need real-time, multi-tier EIP-1559 gas fee data across any of 17 EVM chains with a single lightweight GET call. Ideal for AI agents doing cross-chain transaction scheduling, fee estimation before submitting a transaction, or monitoring network congestion. Prefer over on-chain RPC calls when you don't maintain your own node infrastructure or need pre-computed percentile tiers.

## Known failure modes

- Invalid or unsupported chain name returns 400 with validation error
- blocks parameter out of range (>50 or <1) is clamped or rejected
- RPC node unavailable for a specific chain may return 503 or timeout
- Payment not provided or invalid x402 token returns 402 Payment Required
- Malformed query parameters return schema validation error

## How this service works

Multi-chain EVM gas price oracle for AI agents — 17 chains (Ethereum, Base, Arbitrum, Optimism, Polygon, BNB, Avalanche…). One x402 call returns slow/standard/fast EIP-1559 tiers as DROP-IN maxFeePerGas + maxPriorityFeePerGas in wei (plug straight into a viem/ethers tx, no conversion, exact even on sub-gwei L2s), plus base fee, head block, and fullness, from a live eth_feeHistory call. Pass ?chain= to switch chains.

## Output

Returns a JSON object with the chain name, CAIP-2 identifier, current base fee in gwei, latest block number, gas model type (eip1559/mostly-legacy/non-standard), slow/standard/fast priority fee tiers (p10/p50/p90), median block fullness percentage, number of blocks sampled, and a human-readable gas note with a timestamp.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "chain": "ethereum",
   "blocks": 5
  }
 }
}
```

## 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",
     "required": [
      "chain"
     ],
     "properties": {
      "chain": {
       "enum": [
        "ethereum",
        "base",
        "optimism",
        "arbitrum",
        "polygon",
        "avalanche",
        "gnosis",
        "linea",
        "scroll",
        "blast",
        "mode",
        "opbnb",
        "celo",
        "bsc",
        "fantom",
        "zksync",
        "mantle"
       ],
       "type": "string",
       "description": "Target EVM chain id. One of: ethereum, base, optimism, arbitrum, polygon, avalanche, gnosis, linea, scroll, blast, mode, opbnb, celo, bsc, fantom, zksync, mantle. Also accepts common aliases (eth, arb, op, matic, avax, bnb). Default: ethereum."
      },
      "blocks": {
       "type": "integer",
       "maximum": 50,
       "minimum": 1,
       "description": "Recent blocks to sample for percentile reward (1..50, clamped)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "caip2": {
       "type": "string"
      },
      "chain": {
       "enum": [
        "ethereum",
        "base",
        "optimism",
        "arbitrum",
        "polygon",
        "avalanche",
        "gnosis",
        "linea",
        "scroll",
        "blast",
        "mode",
        "opbnb",
        "celo",
        "bsc",
        "fantom",
        "zksync",
        "mantle"
       ],
       "type": "string"
      },
      "stats": {
       "type": "object",
       "properties": {
        "ts": {
         "type": "string",
         "format": "date-time"
        },
        "blocks_sampled": {
         "type": "integer"
        },
        "median_fullness_pct": {
         "type": "number"
        }
       }
      },
      "tiers": {
       "type": "object",
       "properties": {
        "fast": {
         "type": "object",
         "properties": {
          "maxFeePerGas": {
           "type": "string"
          },
   
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "caip2": "eip155:1",
  "chain": "ethereum",
  "stats": {
   "ts": "2026-05-28T15:42:30.000Z",
   "blocks_sampled": 20,
   "median_fullness_pct": 45.5
  },
  "tiers": {
   "fast": {
    "maxFeePerGas": "14831000000",
    "max_fee_gwei": 14.831,
    "max_priority_gwei": 2.2,
    "maxPriorityFeePerGas": "2200000000"
   },
   "slow": {
    "maxFeePerGas": "12631000000",
    "max_fee_gwei": 12.631,
    "max_priority_gwei": 0.001,
    "maxPriorityFeePerGas": "1000000"
   },
   "standard": {
    "maxFeePerGas": "13731000000",
    "max_fee_gwei": 13.731,
    "max_priority_gwei": 1.1,
    "maxPriorityFeePerGas": "1100000000"
   }
  },
  "gas_model": "eip1559",
  "chain_name": "Ethereum mainnet",
  "base_fee_wei": "8421000000",
  "block_number": 21403217,
  "base_fee_gwei": 8.421
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-gas-apitoll-cloud-2cf70775/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from evm-gas.apitoll.cloud](https://www.zero.xyz/host/evm-gas.apitoll.cloud/llms.txt)
