# Base Network Snapshot

> Base Network Snapshot is a paid API for AI agents from api.zfinia.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-18).

Returns current Base blockchain state — block height, gas price in wei, and chain head age — all read atomically at the same block, with built-in staleness and chain validation guards.

## Facts

- Endpoint: POST https://api.zfinia.com/x402/v1/base-network-snapshot?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-network-snapshot-2a600e49
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__DpX1K1RWm6U5tW6usB8y

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-network-snapshot-2a600e49 -d '<json body>'
```

Example prompt: Before I submit my transaction, can you check if the Base mainnet is ready — specifically the current block height, gas price in wei, and how stale the chain head is right now?

## When to prefer this

Use this endpoint when you need a single atomic snapshot of Base network state — block height, gas price, and chain freshness — all read at the same block, with built-in safety guards that refuse stale or wrong-chain reads without charging. Prefer this over rolling your own RPC calls when you need guaranteed consistency across these three values and want automatic staleness protection before committing to a transaction.

## Known failure modes

- Wrong chain detected — endpoint refuses and does not charge if it is not on Base mainnet (chain_id 8453)
- Stale chain head — endpoint refuses and does not charge if the head age exceeds acceptable threshold
- RPC upstream failure — upstream node unavailable, resulting in an error response
- x402 payment not completed — request rejected before processing if payment challenge is not satisfied
- Network timeout — upstream RPC calls take too long to complete

## How this service works

Is Base ready to transact right now? One call returns the current block height, gas price in wei and how many seconds old the chain head is, all read at the same block. Refuses before payment if the endpoint is on the wrong chain or its head is stale, so you are never charged for a reading that is quietly out of date.

## Output

Returns a JSON object containing: the decimal block height at which all values were read, the block hash, gas price in wei as a string, head timestamp as a Unix integer, head age in seconds, chain identifier ('base'), chain ID (8453), number of upstream RPC calls consumed, a unique request ID, and the service version. The endpoint refuses and does not charge if the chain is wrong or the head is stale.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {},
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "request_id",
      "service_id",
      "service_version",
      "chain",
      "chain_id",
      "block_number",
      "block_hash",
      "rpc_calls",
      "gas_price_wei",
      "head_timestamp",
      "head_age_seconds"
     ],
     "properties": {
      "chain": {
       "const": "base"
      },
      "chain_id": {
       "const": 8453
      },
      "rpc_calls": {
       "type": "integer",
       "description": "Upstream RPC calls this response cost."
      },
      "block_hash": {
       "type": "string",
       "description": "Hash of that block."
      },
      "request_id": {
       "type": "string",
       "description": "Delivery request identifier; also returned in x-foundry-request-id."
      },
      "service_id": {
       "type": "string",
       "description": "Canonical service identifier."
      },
      "block_number": {
       "type": "string",
       "description": "Decimal block height every value in this response was read at."
      },
      "gas_price_wei": {
       "type": "string"
      },
      "head_timestamp": {
       "type": "integer"
      },
      "service_version": {
       "type": "string",
       "description": "Version of the invoked service."
      },
      "head_age_seconds": {
       "type": "integer"
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-network-snapshot-2a600e49/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.zfinia.com](https://www.zero.xyz/host/api.zfinia.com/llms.txt)
