API reference
RelayGuard exposes standard EVM JSON-RPC over HTTPS. Workspace and environment are resolved from your API key — not from the URL path.
Base URL
https://gateway.0xrelayguard.com
Authentication
Send your API key on every request. For apps and server-side code, prefer a header:
Authorization: Bearer rg_live_...
Or:
X-RelayGuard-Key: rg_live_...
For tools that only accept an RPC URL (Foundry Cast, some Hardhat configs), append the key as a query parameter:
https://gateway.0xrelayguard.com/rpc/ethereum?key=rg_live_...
URL-based keys are convenient for local dev but may appear in proxy logs and shell history. Use Bearer auth in production services.
JSON-RPC
POST /rpc/:chain
Content-Type: application/json
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}Supported chains (beta): ethereum, polygon, arbitrum, base, optimism.
Failover: eligible read methods may retry on another healthy provider. eth_sendRawTransaction is never automatically retried.
Security Mode
Use POST /rpc/:chain for all traffic. When Security Mode is enabled, methods in your dashboard policy automatically require quorum; other methods route normally. See Security Mode.
Status
GET /status Authorization: Bearer rg_live_...
Returns runtime mode, provider health, block lag, and last check times for your workspace.
Error responses
401 unauthorized— missing or invalid API key429 rate_limited— per-key rate limit exceeded503 no providers configured— add providers in the dashboard503 no healthy providers available— all providers failing or lagging