# agent402.tools EVM JSON-RPC Gateway

> agent402.tools EVM JSON-RPC Gateway is a paid API for AI agents from agent402.tools, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Executes read-only JSON-RPC calls against Ethereum, Base, Polygon, Arbitrum, or Optimism with automatic multi-endpoint failover — no personal node or API key required.

## Facts

- Endpoint: POST https://agent402.tools/api/evm-rpc
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-evm-json-rpc-gateway-2094ae60
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9WTHv264Ek5hcg_P_2OHU

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-evm-json-rpc-gateway-2094ae60 -d '<json body>'
```

Example prompt: What's the current ETH balance of wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Ethereum mainnet, and what's the current gas price?

## When to prefer this

Choose this endpoint when an AI agent needs to read on-chain EVM data (balances, block info, contract state, gas prices, transaction details) across Ethereum, Base, Polygon, Arbitrum, or Optimism without the overhead of provisioning a personal RPC node or managing API keys from providers like Infura or Alchemy. Ideal for pay-per-call workflows where reliable failover across multiple nodes is needed without subscription management.

## Known failure modes

- Method not whitelisted — only a specific set of read-only methods are supported; write methods like eth_sendRawTransaction will be rejected
- Invalid params array — malformed or out-of-range parameters return a JSON-RPC error
- Network name unrecognized — passing an unsupported chain name returns an error; only ethereum/base/polygon/arbitrum/optimism are valid
- Params too large — more than 8 entries or serialized size over 4KB will be rejected
- Payment failure — x402 micropayment of 0.004 USDC not completed means request is not processed
- All upstream RPC nodes down — multi-endpoint failover exhausted, returns a gateway error

## How this service works

Read-only JSON-RPC against Ethereum, Base, Polygon, Arbitrum, or Optimism with built-in multi-endpoint failover - one paid call, no node or API key of your own. Prefer the named reads (block-number, chain-info, block-info, event-logs, erc721-owner, contract-code) for common tasks - they validate inputs and cost less; use this when you need a whitelisted method they do not wrap.

## Output

A standard JSON-RPC response object containing the result field populated with the requested on-chain data (e.g. a hex-encoded balance, block number, gas price, transaction object, or eth_call return value), or a JSON-RPC error object if the method failed or parameters were invalid.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "method": {
   "type": "string",
   "description": "Whitelisted read-only JSON-RPC method (e.g. eth_blockNumber, eth_getBalance, eth_call)."
  },
  "params": {
   "type": "array",
   "description": "JSON-RPC positional parameter array (default []). Max 8 entries, 4KB serialized. eth_call's block parameter defaults to \"latest\"."
  },
  "network": {
   "type": "string",
   "description": "ethereum / base / polygon / arbitrum / optimism (default base)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "method": "eth_blockNumber",
  "result": "0x1a2b3c4",
  "network": "base"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-evm-json-rpc-gateway-2094ae60/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)
