# agent402.tools Cheapest Rail Now

> agent402.tools Cheapest Rail Now is a paid API for AI agents from agent402.tools, paid per call via x402, $0.009/call, status unknown (last checked 2026-09-15).

Returns live gas prices across Ethereum and major L2s side-by-side, Base gas tiers, a fee estimate for a given transaction type, and ETH spot price to help an agent pick the cheapest chain to transact on right now.

## Facts

- Endpoint: POST https://agent402.tools/api/skill/cheapest-rail
- Price: $0.009/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-cheapest-rail-now-3c07e248
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7xcmRuqgo3-YFmqnPdbag

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-tools-cheapest-rail-now-3c07e248 -d '<json body>'
```

Example prompt: Check live gas prices across Ethereum, Base, Arbitrum, Optimism, and Polygon right now and tell me which chain is cheapest to transact on, including the ETH spot price and a fee estimate.

## When to prefer this

Use this endpoint when an agent needs to dynamically route an on-chain transaction to whichever network has the lowest gas cost at that moment, or when displaying fee comparisons across Ethereum and L2s to a user before they sign a transaction. Prefer this over manual RPC polling when you need a single bundled view of gas + ETH price across multiple chains simultaneously.

## Known failure modes

- Invalid or unsupported chain name in networks parameter returns an error or omits that chain
- Network connectivity issues fetching live gas data may result in stale or partial results
- Payment failure (insufficient USDC or x402 protocol error) blocks the call
- ETH price feed outage may affect USD cost estimates

## How this service works

Bundled execution of the Cheapest rail right now workflow - Where should an agent transact this minute? Live gas on Ethereum + every major L2 side by side, Base gas tiers, a fee estimate for your transaction type, and ETH spot to price it all in dollars. One x402 payment runs 4 underlying tools (l2-gas-comparison, gas-snapshot, gas-estimate, crypto-price); partial-success per step.

## Output

A bundled response containing real-time gas prices for each requested chain, Base-specific gas tiers, a transaction fee estimate in USD/ETH, and the current ETH spot price — enabling direct cost comparison to choose the cheapest chain to transact on.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "networks": {
   "type": "string",
   "description": "Comma-separated chains to compare (default: ethereum,base,arbitrum,optimism,polygon)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "args": {
   "networks": "ethereum,base,arbitrum,optimism,polygon"
  },
  "pack": "cheapest-rail",
  "steps": [
   {
    "ok": true,
    "slug": "l2-gas-comparison",
    "result": {}
   },
   {
    "ok": true,
    "slug": "gas-snapshot",
    "result": {}
   },
   {
    "ok": true,
    "slug": "gas-estimate",
    "result": {}
   },
   {
    "ok": true,
    "slug": "crypto-price",
    "result": {}
   }
  ],
  "summary": "4/4 steps succeeded"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-cheapest-rail-now-3c07e248/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)
