# Base Mainnet Chain Head (Block Height & Base Fee)

> Base Mainnet Chain Head (Block Height & Base Fee) is a paid API for AI agents from canary.countersignpay.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-29).

Returns the current block height and base fee per gas in wei for the Base mainnet, read live from the chain at request time.

## Facts

- Endpoint: GET https://canary.countersignpay.com/v1/base/head?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-mainnet-chain-head-block-height-base-fee-1e2c599b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EAr9Mboj7fAjzjJHWQcv3

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 base-mainnet-chain-head-block-height-base-fee-1e2c599b
```

Example prompt: What's the current block height and base fee per gas on Base mainnet right now?

## When to prefer this

Use this endpoint when you need a live, point-in-time snapshot of Base mainnet chain head data — specifically block height and base fee per gas — without running your own node or RPC connection. Ideal for gas estimation, chain synchronization checks, or any agent workflow that needs current on-chain conditions on Base (eip155:8453) specifically, as opposed to Ethereum mainnet or other L2s.

## Known failure modes

- RPC node temporarily unavailable — endpoint may return 5xx or timeout
- Network congestion may cause slight staleness in observedAt timestamp
- Payment failure via x402 protocol returns 402 with payment details
- Invalid method (non-GET) returns error

## How this service works

Current Base mainnet block height and base fee per gas in wei, read from the chain at request time

## Output

Returns a JSON object with four fields: blockHeight (latest block number on Base mainnet as a decimal string), baseFeePerGas (base fee of that block in wei as a decimal string), network (CAIP-2 chain ID, always 'eip155:8453'), and observedAt (ISO 8601 timestamp of when the chain was read).

## 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": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "blockHeight",
      "baseFeePerGas",
      "network",
      "observedAt"
     ],
     "properties": {
      "network": {
       "type": "string",
       "description": "CAIP-2 chain id, always eip155:8453"
      },
      "observedAt": {
       "type": "string",
       "description": "ISO 8601 time the chain was read"
      },
      "blockHeight": {
       "type": "string",
       "description": "Latest block number on Base mainnet, decimal string"
      },
      "baseFeePerGas": {
       "type": "string",
       "description": "Base fee per gas of that block, in wei, decimal string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-mainnet-chain-head-block-height-base-fee-1e2c599b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from canary.countersignpay.com](https://www.zero.xyz/host/canary.countersignpay.com/llms.txt)
