Free XLayer RPC Endpoint
Chain ID 196 · OKB · one configured primary region
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 |
A wallet polls its RPC continuously. The keyless URL above allows 50 requests per 10 seconds per IP and has a daily cap per IP: enough to try the network in a wallet, but a wallet left open can reach the cap. For daily use, enter your keyed URL https://rpc.nodeflare.app/xlayer/v1/{YOUR_KEY} instead. A free key allows 10 requests per second, and the dashboard adds XLayer to MetaMask with that URL in one click. Get a free key →
Built for XLayer
Exchange-adjacent DeFi and apps targeting the OKX ecosystem on XLayer. Requests use configured regional preferences and available upstreams. Plan rate limits, compute units and method-specific concurrency limits apply.
XLayer node coverage and routing
A NodeFlare-operated primary node region. A public third-party RPC backstop is configured after our own nodes. Region labels describe routing configuration rather than a guarantee that every gateway has a local node. A standard API key uses shared infrastructure with its own plan limits; dedicated capacity is scoped separately. Historical state, tracing and WebSocket support vary by chain and node.
On successful HTTP RPC responses, nf-region: fallback identifies an external backstop and nf-region: cache identifies a cached response. See our routing disclosure and availability terms.
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; Chain ID: 196; Currency symbol: OKB; Block explorer URL: https://www.oklink.com/x-layer; New RPC URL: your keyed NodeFlare URL, https://rpc.nodeflare.app/xlayer/v1/{YOUR_KEY}. A free key allows 10 requests per second. The keyless URL https://rpc.nodeflare.app/xlayer/public is enough to try the network in a wallet: it allows 50 requests per 10 seconds per IP and has a daily cap per IP, which a wallet left open can reach.
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 provides higher rate limits and 3,000,000 compute units per month, no credit card. Heavy HTTP methods depend on node support and are subject to compute-unit and concurrency limits.
What are the XLayer RPC rate limits?
The public endpoint is limited to 50 requests per 10 seconds per IP. A free key gives 10 requests/second; standard paid plans scale to 1500 req/s. Every plan includes all 17 supported chains.
Is NodeFlare a good XLayer RPC provider?
NodeFlare operates its own primary XLayer nodes. A NodeFlare-operated primary node region. A public third-party RPC backstop is configured after our own nodes. A free key provides 3,000,000 CU per month and higher limits. Method support and historical coverage depend on the node and requested block.
Is there a dedicated XLayer RPC node?
A standard key gives an authenticated endpoint on shared NodeFlare infrastructure, with plan-specific limits. Dedicated capacity is scoped separately by inquiry. A NodeFlare-operated primary node region. A public third-party RPC backstop is configured after our own nodes. Historical state and traces must be checked for your specific methods and block ranges; a key does not guarantee complete archive coverage.
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
- Guide: Free XLayer RPC Endpoint →
- XLayer honeypot checker → — transfer simulation, holder concentration and ownership for any XLayer token; also as an API
- Compare XLayer gas prices → — live gas price and transaction cost next to the other chains, and a free token approval checker →
- Moving XLayer traffic from another provider? Compare NodeFlare with Alchemy, Infura and QuickNode →
- Onchain tools for AI agents → — token-safety, wallet intelligence and RPC over MCP / x402
Build on XLayer with a free key
Higher limits and an authenticated endpoint — every supported 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.