All guides
X Layer

X Layer RPC — Free Endpoint & Developer Guide

Jun 20, 2026·3 min read

X Layer is an Ethereum zkEVM layer-2 from OKX, built with the Polygon CDK. This guide shows how to connect to a free X Layer RPC endpoint on MoltNode — no API key and no signup required.

What is X Layer

X Layer is a zkEVM layer-2 network developed by OKX and built using the Polygon Chain Development Kit (CDK). It batches transactions off-chain and uses zero-knowledge proofs to settle them on Ethereum, inheriting Ethereum's security while offering lower fees and higher throughput than transacting on the base layer directly. Because it is a zkEVM, contract execution mirrors Ethereum's, so the developer experience stays familiar.

X Layer is fully EVM-compatible, which means it speaks the standard eth_* JSON-RPC method set, uses ordinary Ethereum-style addresses, and runs the same Solidity contracts and tooling you already use. Its native gas token is OKB, and the network is identified by chain ID 196. If you have shipped on Ethereum or any other EVM chain, the same patterns carry straight over to X Layer.

X Layer RPC endpoint on MoltNode

MoltNode exposes X Layer at one clean URL that is also a live RPC endpoint:

https://moltnode.ag/xlayer

There is no API key to provision and no account to create. The endpoint speaks JSON-RPC 2.0 over HTTP POST, and CORS is open so browser-based apps can call it directly. The URL is dual-purpose: a GET request opened in a browser returns a human-readable page about the chain, while a POST carrying a JSON-RPC body returns a machine response. The same address serves both people and programs.

To add it to a wallet, create a custom network with the RPC URL https://moltnode.ag/xlayer, chain ID 196, and currency symbol OKB.

Probe it with curl

The fastest way to confirm the X Layer JSON-RPC endpoint is responding is to request the latest block number:

curl -s https://moltnode.ag/xlayer \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'

You will get a JSON object with the current block height, hex-encoded, in the result field. Swap in any other standard method — eth_chainId, eth_getBalance, eth_call — to read whatever your app needs from the X Layer node.

Use it from your app

Every JSON-RPC client works with the free X Layer RPC. Here is a compact viem example pointed at the endpoint:

import { createPublicClient, http } from "viem";

const client = createPublicClient({
  transport: http("https://moltnode.ag/xlayer"),
});

const block = await client.getBlockNumber();
console.log("X Layer block:", block);

The same URL drops into ethers, web3.py, wagmi, or any other library that accepts an HTTP RPC URL — no extra configuration beyond the endpoint.

Reliability & failover

The single moltnode.ag/xlayer URL is backed by upstream node infrastructure, and where more than one provider is configured, requests are tried in order. If the first upstream is unreachable or errors out, MoltNode automatically fails over to the next available provider. Upstream API keys are held server-side and never reach your client, so you get reliable X Layer node access without managing any credentials.

There is no hard rate limit, but the endpoint is a shared, free X Layer node available to everyone. Use it considerately: cache responses, avoid aggressive polling loops, and for high-volume production workloads, treat MoltNode as a fast default and failover layer rather than a single point of dependence.

For humans and agents

The dual GET/POST design serves developers and automated tools from one place. You can paste https://moltnode.ag/xlayer into a browser to read about the chain, while a wallet or script POSTs JSON-RPC to the same URL.

For programmatic discovery, MoltNode publishes a machine-readable catalog of every supported chain at https://moltnode.ag/api/chains and an agent-friendly overview at https://moltnode.ag/llms.txt. An AI agent can fetch the catalog, locate the X Layer entry and its endpoint, and begin issuing eth_* calls without any manual setup.

Closing

The free X Layer RPC endpoint at https://moltnode.ag/xlayer is a no-key, JSON-RPC X Layer node ready for viem, ethers, wallets, and AI agents — with automatic failover built in. Point your client at the URL and start building.