# RPC

### Xai public RPC endpoints[​](https://docs.arbitrum.io/build-decentralized-apps/reference/node-providers#arbitrum-public-rpc-endpoints) <a href="#arbitrum-public-rpc-endpoints" id="arbitrum-public-rpc-endpoints"></a>

This section provides an overview of the available public RPC endpoints for different Xai chains and necessary details to interact with them.

<table><thead><tr><th width="126">Name</th><th>RPC Url(s)</th><th>Chain ID</th><th>Block explorer</th><th width="161">Underlying chain</th><th>Tech stack</th></tr></thead><tbody><tr><td>Xai Mainnet</td><td><a href="https://xai-chain.net/rpc">https://xai-chain.net/rpc</a></td><td>660279</td><td><a href="https://explorer.xai-chain.net/">https://explorer.xai-chain.net/</a></td><td>Arbitrum</td><td>Nitro (AnyTrust)</td></tr><tr><td>Xai Testnet</td><td><a href="https://testnet-v2.xai-chain.net/rpc/">https://testnet-v2.xai-chain.net/rpc/</a></td><td>37714555429</td><td><a href="https://testnet-explorer-v2.xai-chain.net/">https://testnet-explorer-v2.xai-chain.net/</a></td><td>Arbitrum</td><td>Nitro (AnyTrust)</td></tr></tbody></table>

{% hint style="warning" %}
Xai public RPCs do not provide Websocket support.
{% endhint %}

### Third-party RPC providers[​](https://docs.arbitrum.io/build-decentralized-apps/reference/node-providers#third-party-rpc-providers) <a href="#third-party-rpc-providers" id="third-party-rpc-providers"></a>

Alternatively, to interact with Xai chain, you can rely on several of the same popular node providers that you are already using on Ethereum or Arbitrum:

<table data-full-width="true"><thead><tr><th width="132">Provider</th><th width="326">Xai Mainnet</th><th width="345">Xai Testnet</th><th>Websocket?</th></tr></thead><tbody><tr><td><a href="https://nirvanalabs.io/blog/tutorialsandguides/create-a-xai-mainnet-node">Nirvana</a></td><td>Click <a href="https://nirvanalabs.io/blog/tutorialsandguides/create-a-xai-mainnet-node">here</a> for details</td><td>Click <a href="https://nirvanalabs.io/blog/tutorialsandguides/create-a-xai-mainnet-node">here</a> for details</td><td>✅</td></tr><tr><td><a href="https://www.quicknode.com/docs/xai">QuickNode</a></td><td><a href="https://xai-mainnet.rpc.quicknode.com/">https://xai-mainnet.rpc.quicknode.com/</a></td><td><a href="https://xai-testnet.rpc.quicknode.com/">https://xai-testnet.rpc.quicknode.com/</a></td><td>✅</td></tr><tr><td><a href="https://www.ankr.com/docs/rpc-service/chains/chains-api/xai/">Ankr</a></td><td><a href="https://rpc.ankr.com/xai">https://rpc.ankr.com/xai</a></td><td><a href="https://rpc.ankr.com/xai_testnet">https://rpc.ankr.com/xai_testnet</a></td><td>❌</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xai-foundation.gitbook.io/xai-network/build-on-xai/developer-tools/rpc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
