# agentsvc.io Gas Price API

> agentsvc.io Gas Price API is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Returns current gas prices, base fees, and estimated transaction costs in USD across major EVM-compatible blockchains

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/gas-price?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentsvc-io-gas-price-api-284c4617
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XOkuEzLvPzt1pCa-sp6gd

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 agentsvc-io-gas-price-api-284c4617 -d '<json body>'
```

Example prompt: Check the current gas prices on Ethereum and Base right now — I want to see the base fee, priority fees, and roughly how much an ERC-20 transfer and a swap would cost in USD on each chain.

## When to prefer this

Use this endpoint when an agent needs real-time, multi-chain gas price data with USD cost estimates for common transaction types. Ideal for DeFi agents deciding which chain to route a transaction on, wallets estimating fees before signing, or any workflow that needs to gate execution on gas conditions. Covers 7 major EVM chains in a single call with structured cost breakdowns.

## Known failure modes

- Invalid chain name in array returns validation error
- Network timeout if upstream RPC nodes are slow
- Empty chains array may return empty results
- Unsupported chain enum value rejected with schema error
- Payment failure via x402 if insufficient USDC balance

## How this service works

86 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, screenshots and PDF, PDF, OCR and document conversion, news, paper and developer search and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.

## Output

Returns a JSON object with per-chain data including: chain name and ID, native token (e.g. ETH) price in USD, current gas price and base fee in gwei, low/medium/high priority fees in gwei, and estimated USD costs for common operations (swap, ETH transfer, ERC-20 transfer). Also includes a timestamp and a note about L2 cost caveats.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chains": {
   "type": "array",
   "items": {
    "enum": [
     "ethereum",
     "base",
     "arbitrum",
     "optimism",
     "polygon",
     "bsc",
     "avalanche"
    ],
    "type": "string"
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "note": "L2 costs exclude the L1 data fee, which can dominate on rollups.",
   "chains": [
    {
     "chain": "base",
     "chain_id": 8453,
     "native_usd": 2710.355,
     "est_cost_usd": {
      "swap": 0.002927,
      "eth_transfer": 0.000342,
      "erc20_transfer": 0.001057
     },
     "native_token": "ETH",
     "base_fee_gwei": 0.005,
     "gas_price_gwei": 0.006,
     "priority_fee_gwei": {
      "low": 0.00004,
      "high": 0.007469,
      "medium": 0.001059
     }
    },
    {
     "chain": "ethereum",
     "chain_id": 1,
     "native_usd": 2710.355,
     "est_cost_usd": {
      "swap": 0.429372,
      "eth_transfer": 0.050093,
      "erc20_transfer": 0.155051
     },
     "native_token": "ETH",
     "base_fee_gwei": 0.854496,
     "gas_price_gwei": 0.880105,
     "priority_fee_gwei": {
      "low": 0.2387,
      "high": 12.90606,
      "medium": 1.694767
     }
    }
   ],
   "checked_at": "2026-10-06T14:17:44.635Z"
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentsvc-io-gas-price-api-284c4617/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsvc.io](https://www.zero.xyz/host/agentsvc.io/llms.txt)
