# Gas Price Estimator — Multi-Chain EVM Gas Fees (x402)

> Gas Price Estimator — Multi-Chain EVM Gas Fees (x402) is a paid API for AI agents from freetier-agent-api.pages.dev, paid per call via x402, $0.0015/call, status unknown (last checked 2026-10-30).

Returns current gas price estimates and ERC-20 transfer costs across major EVM chains, ranking them cheapest to most expensive

## Facts

- Endpoint: GET https://freetier-agent-api.pages.dev/api/gas?utm_source=zero.xyz
- Price: $0.0015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gas-price-estimator-multi-chain-evm-gas-fees-x402-933d4b63
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UGam-hnVim6Do-6-_u7Dv

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 gas-price-estimator-multi-chain-evm-gas-fees-x402-933d4b63
```

Example prompt: Which EVM chain is cheapest to send USDC on right now — check across all chains including Ethereum, Base, Arbitrum, Optimism, and Polygon, and tell me the gas price in gwei and estimated USD cost for an ERC-20 transfer on each.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically decide which EVM chain to use for a token transfer based on current gas costs, or when building a gas fee dashboard. It covers the five major EVM chains (Ethereum, Base, Arbitrum, Optimism, Polygon) in a single call. Prefer it over chain-specific RPC calls when you need cross-chain comparison without managing multiple providers. Requires pay-per-call with USDC via x402 — no API key needed.

## Known failure modes

- Invalid chain name in 'chains' parameter returns an error or empty result
- Network latency causes stale gas price data for fast-moving chains like Ethereum mainnet
- x402 payment failure if USDC balance on Base is insufficient
- Cloudflare Pages cold-start latency on first request

## How this service works

Invoice-to-JSON, on-chain tools (transaction explainer + payment check, wallet profile, contract ABI, ERC-20 token risk), company contacts and web-to-RAG for AI agents. Pay per call with x402 (USDC on Base). No signup, no API key.

## Output

Returns a JSON object with an array of chain entries (each including block number, chain name, chain ID, native coin, gas price in gwei, and estimated ERC-20 transfer cost in gas units, USD, and native token), plus a ranked list of chains from cheapest to most expensive and a 'cheapestForUsdcTransfer' field indicating the optimal chain.

## 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": [],
     "properties": {
      "chains": {
       "type": "string",
       "description": "\"all\" (default) or a comma list: ethereum,base,arbitrum,optimism,polygon"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chains": [
   {
    "block": 37000000,
    "chain": "base",
    "chainId": 8453,
    "estimates": {
     "erc20_transfer": {
      "gas": 65000,
      "usd": 0.0012,
      "native": "0.00000039"
     }
    },
    "nativeCoin": "ETH",
    "gasPriceGwei": 0.006
   }
  ],
  "ranking": [
   "base",
   "optimism",
   "arbitrum",
   "polygon",
   "ethereum"
  ],
  "cheapestForUsdcTransfer": "base"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gas-price-estimator-multi-chain-evm-gas-fees-x402-933d4b63/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from freetier-agent-api.pages.dev](https://www.zero.xyz/host/freetier-agent-api.pages.dev/llms.txt)
