Free XLayer RPC Endpoint
Chain ID 196 · OKB · multi-region with automatic failover
XLayer (Chain ID 196) is OKX's zkEVM L2 with OKB as gas token. NodeFlare serves XLayer RPC from dedicated US-West nodes with automatic failover.
Public endpoint — no API key
HTTPS
https://rpc.nodeflare.app/xlayer/publicNeed higher limits? Use a keyed endpoint https://rpc.nodeflare.app/xlayer/v1/{YOUR_KEY} — get a free key →
Connect to XLayer
curl -s -X POST https://rpc.nodeflare.app/xlayer/public \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider(
"https://rpc.nodeflare.app/xlayer/public"
);
const block = await provider.getBlockNumber();import { createPublicClient, http } from "viem";
const client = createPublicClient({
transport: http("https://rpc.nodeflare.app/xlayer/public"),
});
const block = await client.getBlockNumber();from web3 import Web3
w3 = Web3(Web3.HTTPProvider(
"https://rpc.nodeflare.app/xlayer/public"
))
print(w3.eth.block_number)Add XLayer to your wallet
Network details for MetaMask, Rabby, or any EVM wallet — XLayer chain ID 196 (0xc4).
| Network name | XLayer |
| RPC URL | https://rpc.nodeflare.app/xlayer/public |
| Chain ID | 196 |
| Currency symbol | OKB |
| Block explorer | https://www.oklink.com/x-layer |
Built for XLayer
Exchange-adjacent DeFi and apps targeting the OKX ecosystem on XLayer. Every request routes to the nearest healthy node, with automatic failover and no per-request throttling — the gaps public endpoints leave.
Dedicated XLayer RPC node — your own path, not a shared pool
NodeFlare runs its own dedicated XLayer node on bare-metal — not a reseller of Alchemy or Infura, and not a shared free-for-all pool. A free or paid key gives you a dedicated endpoint path with your own rate limits, no per-request throttling, and full access to heavy methods (eth_getLogs, trace_*, debug_*) — your own XLayer RPC without running the node yourself.
XLayer RPC — FAQ
What is XLayer's chain ID?
XLayer's chain ID is 196 (hex 0xc4). Its native currency is OKB and its block explorer is www.oklink.com/x-layer. You can connect with NodeFlare's free public RPC at https://rpc.nodeflare.app/xlayer/public — no API key required.
How do I add XLayer to MetaMask?
In MetaMask, open the network menu → "Add a network" → "Add a network manually", then enter — Network name: XLayer; New RPC URL: https://rpc.nodeflare.app/xlayer/public; Chain ID: 196; Currency symbol: OKB; Block explorer URL: https://www.oklink.com/x-layer. Save, then switch to XLayer. The endpoint is free and needs no account.
What is the XLayer RPC URL?
NodeFlare's public XLayer RPC URL is https://rpc.nodeflare.app/xlayer/public over HTTPS. No API key is required for the public endpoint.
Is the XLayer RPC free?
Yes. The public XLayer endpoint is free with no sign-up. A free API key unlocks higher rate limits, heavy methods, and a dedicated path — 2,000,000 compute units per month, no credit card.
What are the XLayer RPC rate limits?
The public endpoint is limited to 2 requests/second per IP. A free key gives 10 requests/second; paid plans scale to 500 req/s. Every plan includes all 22 supported chains.
Is NodeFlare a good XLayer RPC provider?
NodeFlare is an independent XLayer RPC provider that runs its own nodes — not a reseller or aggregator of third-party backends. The public endpoint is free with no sign-up; a free API key adds higher rate limits, and heavy methods (eth_getLogs, trace_*, debug_*) — 2,000,000 compute units per month, no credit card.
Is there a dedicated XLayer RPC node?
Yes. NodeFlare runs its own dedicated XLayer node(s), and every request is routed to the nearest healthy node with automatic failover. A free or paid key gives you a dedicated endpoint path with your own rate limits and full access to archive methods like eth_getLogs and debug_traceTransaction.
Go deeper
- Full XLayer API reference → — supported methods, WebSocket, regions
- Rate limits & compute-unit costs → — what each method costs against your quota
- Pay per request with x402 → — XLayer calls in USDC from $0.001, no account:
POST /xlayer/x402 - RPC for trading bots → and indexers → — low-latency, eth_getLogs-heavy workloads
- Screen a XLayer token for scams → — ownership, honeypot check, holder concentration → one risk score
- Onchain tools for AI agents → — token-safety, wallet intelligence and RPC over MCP / x402
Build on XLayer with a free key
Higher limits, a dedicated path, and automatic failover — every chain included. No credit card.
Get your free API key →XLayer RPC methods
Per-method docs for XLayer — parameters, compute-unit cost, and copy-paste examples.