# Agent Rest Stop – Block Lag

> Agent Rest Stop – Block Lag is a paid API for AI agents from agent-gas-station.agent-gas-station.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-31).

Returns how many blocks behind the cached head a given chain's client block is.

## Facts

- Endpoint: POST https://agent-gas-station.agent-gas-station.workers.dev/v1/BlockLag?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-rest-stop-block-lag-acd92393
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CWx71N-J6Or6NXv6pXvVR

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 agent-rest-stop-block-lag-acd92393 -d '<json body>'
```

Example prompt: How many blocks behind is my Ethereum client at block 20500000 right now?

## When to prefer this

Use this endpoint when an agent or service needs to quickly determine whether its cached or local block reference is stale relative to the current chain head — especially before making time-sensitive on-chain decisions or transactions. Prefer it over full node RPC calls when you only need a lightweight block lag number rather than full block data.

## Known failure modes

- Invalid or unsupported chain identifier returns an error
- Malformed or non-numeric client_block string causes a parsing error
- Payment not attached or insufficient USDC results in 402 Payment Required
- Network or worker timeout if upstream chain data is unavailable

## How this service works

How many blocks behind the cached head.

## Output

A numeric value indicating how many blocks the provided client block lags behind the cached chain head for the specified blockchain network.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "type": "string"
  },
  "client_block": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-rest-stop-block-lag-acd92393/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-gas-station.agent-gas-station.workers.dev](https://www.zero.xyz/host/agent-gas-station.agent-gas-station.workers.dev/llms.txt)
