# Base RPC JSON-RPC Gateway (x402 Pay-per-Call)

> Base RPC JSON-RPC Gateway (x402 Pay-per-Call) is a paid API for AI agents from kr-x402-mvp.kgy5612.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Proxies JSON-RPC calls to the Base blockchain (e.g. eth_blockNumber, eth_getBalance, eth_call) with micropayment access via x402/USDC on Base — no API key required.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/v1/base?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-rpc-json-rpc-gateway-x402-pay-per-call-a04144d7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_I61l7LQoonFcVUZXvUt84

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 base-rpc-json-rpc-gateway-x402-pay-per-call-a04144d7
```

Example prompt: What's the current block number on Base? Use a pay-per-call RPC — no API key needed, just run eth_blockNumber.

## When to prefer this

Choose this endpoint when your AI agent needs raw Base blockchain JSON-RPC access without managing an API key or subscription — ideal for autonomous agents that pay per call with USDC via x402. Best for lightweight, real-time onchain lookups (balances, block numbers, contract reads) on Base L2 where a traditional RPC provider account is impractical.

## Known failure modes

- Invalid or unsupported JSON-RPC method returns an error object
- Malformed params array causes parse/invalid-params error
- Payment failure (insufficient USDC balance) results in 402 response before the call is executed
- Upstream dRPC timeout or outage returns latency spike or 5xx
- Missing required 'method' query param falls back to eth_blockNumber silently

## How this service works

Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.

## Output

A JSON-RPC 2.0 response object containing the result of the requested method (e.g. block number as hex, balance in wei, or eth_call return data), plus metadata: chain ('base'), chain_id (8453), upstream URL (base.drpc.org), and latency in milliseconds.

## 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",
     "properties": {
      "method": {
       "type": "string",
       "examples": [
        "eth_blockNumber",
        "eth_getBalance",
        "eth_call"
       ],
       "description": "JSON-RPC method (default eth_blockNumber)"
      },
      "params": {
       "type": "string",
       "examples": [
        "[]",
        "[\"0xe4be4d0bd82d8e68203deff81f79ede0529f2617\",\"latest\"]"
       ],
       "description": "URL-encoded JSON array of params (default [])"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": 1,
  "chain": "base",
  "result": "0x32c8f1a",
  "jsonrpc": "2.0",
  "chain_id": 8453,
  "upstream": "https://base.drpc.org",
  "latency_ms": 84
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-rpc-json-rpc-gateway-x402-pay-per-call-a04144d7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kr-x402-mvp.kgy5612.workers.dev](https://www.zero.xyz/host/kr-x402-mvp.kgy5612.workers.dev/llms.txt)
