# Riley Craig x402 Agent Store – Chain ID Lookup

> Riley Craig x402 Agent Store – Chain ID Lookup is a paid API for AI agents from store.agentexchange.work, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Returns the numeric chain ID for a specified EVM-compatible blockchain network (e.g. Base, Ethereum, Polygon)

## Facts

- Endpoint: GET https://store.agentexchange.work/chain/chain-id
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/riley-craig-x402-agent-store-chain-id-lookup-4555ccd4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jQsepwV8hgo4KJUfRg-PD

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 riley-craig-x402-agent-store-chain-id-lookup-4555ccd4
```

Example prompt: What is the chain ID for the Base network?

## When to prefer this

Use this endpoint when an AI agent needs to programmatically resolve a human-readable blockchain network name (base, ethereum, optimism, arbitrum, polygon, gnosis) to its canonical numeric chain ID without requiring API keys or signup — ideal for autonomous agents paying per call via x402/USDC micropayments.

## Known failure modes

- Unsupported chain name returns an error or empty response
- Invalid chain parameter value (not one of the six supported enums) may return 400 or default to Base
- Payment failure via x402 protocol returns 402 Payment Required

## How this service works

The EIP-155 chain ID for any supported network via eth_chainId — the read multi-chain agents make to confirm which chain an RPC is on before signing. Across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. Free public RPC; undercuts onesource (Ethereum-only) at $0.001 on 6 chains.

## Output

A JSON object containing the canonical chain name string and its numeric chain ID — for example {"chain":"base","chain_id":8453}. Paid via x402 micropayment of $0.001 USDC on Base, no API key required.

## 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": {
      "chain": {
       "type": "string",
       "description": "base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "chain_id": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/riley-craig-x402-agent-store-chain-id-lookup-4555ccd4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from store.agentexchange.work](https://www.zero.xyz/host/store.agentexchange.work/llms.txt)
