# Base Chain JSON-RPC via x402 Micropayment

> Base Chain JSON-RPC via x402 Micropayment 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-11-02).

Execute JSON-RPC calls against the Base (L2) blockchain, paying $0.002 USDC per call via the x402 protocol — no API key required.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/api/v1/rpc/base?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-chain-json-rpc-via-x402-micropayment-6add0457
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_snR5frYAD4MM9M_Nh0u7C

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-chain-json-rpc-via-x402-micropayment-6add0457
```

Example prompt: Check the current ETH balance of wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 on Base using eth_getBalance — pay per call, no API key needed.

## When to prefer this

Choose this endpoint when your AI agent needs trustless, key-free access to Base chain RPC calls and can pay per-use in USDC via x402. Ideal for autonomous trading or onchain agents that need real-time blockchain state (balances, block number, contract reads) without provisioning API keys or committing to a subscription. Prefer over alternatives when operating on Base L2 specifically and when the x402 micropayment model fits your agent's wallet infrastructure.

## Known failure modes

- Payment not included or insufficient USDC via x402 → 402 Payment Required response
- Invalid JSON-RPC method name → JSON-RPC error with code -32601
- Malformed params array (not valid URL-encoded JSON) → parse error or JSON-RPC -32602
- Contract call reverts → JSON-RPC execution error -32000
- Upstream RPC (drpc.org) timeout or outage → 503 or timeout error
- Address not checksummed correctly → may return zero balance or error depending on method

## 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 method result (e.g. hex block number, hex balance, or eth_call return data), chain identifier ('base'), chain_id (8453), upstream RPC URL used, and round-trip 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-chain-json-rpc-via-x402-micropayment-6add0457/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)
