# Agent402 Chain Info

> Agent402 Chain Info is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns current blockchain network stats (chain ID, gas price, latest block) for a specified EVM-compatible network, defaulting to Base.

## Facts

- Endpoint: GET https://agent402.tools/api/chain-info
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-chain-info-b1116457
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oKFYpTJ1bV6n-CBdCIEjt

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 agent402-chain-info-b1116457
```

Example prompt: What's the current gas price and latest block number on Base right now?

## When to prefer this

Choose this endpoint when you need real-time, on-chain network stats (gas price, block height, chain ID) for Base or other major EVM networks in a pay-per-call model with no API key or signup required. Prefer over alternatives when operating in a wallet-native or x402 payment context, or when you need lightweight lookups without a full Web3 provider setup.

## Known failure modes

- Unsupported network name returns an error or defaults to Base
- Network congestion or RPC issues may cause stale block data
- Invalid 'network' query parameter value results in a 400 or default fallback
- Payment failure (insufficient USDC/proof-of-work) results in a 402 response

## How this service works

One-call chain state snapshot: chain id, latest block number, and current gas price (wei + gwei) for Ethereum, Base, Polygon, Arbitrum, or Optimism. Keyless multi-endpoint failover. ?network=base

## Output

A JSON object containing the numeric chain ID, human-readable network name, gas price in Wei, gas price in Gwei, and the latest block number for the requested EVM network.

## 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": {
      "network": {
       "type": "string",
       "description": "ethereum / base / polygon / arbitrum / optimism (default base)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "network",
      "chainId",
      "latestBlock",
      "gasPriceWei",
      "gasPriceGwei"
     ],
     "properties": {
      "chainId": {
       "type": "integer"
      },
      "network": {
       "type": "string"
      },
      "gasPriceWei": {
       "type": "string"
      },
      "latestBlock": {
       "type": "integer"
      },
      "gasPriceGwei": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chainId": 8453,
  "network": "base",
  "gasPriceWei": "5000000",
  "latestBlock": 27000000,
  "gasPriceGwei": "0.005"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-chain-info-b1116457/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
