# Onchain Toolkit Gas Price API

> Onchain Toolkit Gas Price API is a paid API for AI agents from onchain-toolkit.bowling-anthony.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Returns live gas prices in gwei plus the cost of a plain ETH transfer for Ethereum, Base, Arbitrum, Optimism, and Polygon, with multi-chain comparison in a single call.

## Facts

- Endpoint: GET https://onchain-toolkit.bowling-anthony.workers.dev/gas
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchain-toolkit-gas-price-api-678b7272
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eybi0vFsyw-zOsaGf4oJ2

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 onchain-toolkit-gas-price-api-678b7272
```

Example prompt: What are the current gas prices on Ethereum, Base, Arbitrum, Optimism, and Polygon — give me the gwei price and the cost of a plain transfer for each chain so I can pick the cheapest one?

## When to prefer this

Use this endpoint when you need real-time gas prices across one or more EVM-compatible chains (Ethereum, Base, Arbitrum, Optimism, Polygon) in a single lightweight call. It is particularly useful for multi-chain fee comparison, pre-flight transaction cost estimation, and automated gas monitoring workflows. Prefer this over reading gas from an RPC node directly when you want a hosted, no-setup solution that covers multiple chains simultaneously.

## Known failure modes

- Chain RPC node is temporarily unavailable, returning a partial or empty response
- Network timeout if an upstream EVM node is slow
- Invalid or unsupported chain name in query params returns an error or empty result
- Rate limiting if called excessively without payment

## How this service works

Live gas price on Ethereum, Base, Arbitrum, Optimism or Polygon, in gwei plus the cost of a plain transfer. Compare several chains in one call.

## Output

Returns a JSON object with an array of chain entries, each containing the chain name and current gas price in gwei, plus the estimated cost of a standard ETH transfer on that chain.

## 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"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chains": [
   {
    "chain": "base",
    "gasPriceGwei": 0.006
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchain-toolkit-gas-price-api-678b7272/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from onchain-toolkit.bowling-anthony.workers.dev](https://www.zero.xyz/host/onchain-toolkit.bowling-anthony.workers.dev/llms.txt)
