API Reference

All endpoints are HTTPS-only.

Base URL:

https://rpc.astranode.cloud

GET /health

Check service status.

curl
curl https://rpc.astranode.cloud/health

Response:

response.json
{ "ok": true, "ts": 1730190000000 }

GET /quota

Check remaining free quota.

curl
curl https://rpc.astranode.cloud/quota

Response:

response.json
{ "identity": "0xYourWallet", "freeRemaining": 15 }

POST /rpc

JSON-RPC passthrough endpoint.

Example:

curl
curl -X POST https://rpc.astranode.cloud/rpc   -H 'Content-Type: application/json'   -H 'X-PAYER: 0xYourWallet'   -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0x...", "latest"]}'

Successful Response

response.json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1a2b3c..."
}
402 Payment Required (when free quota exceeded)

Response:

response.json
{
  "x402Version": 1,
  "accepts": [
    {
      "scheme": "exact",
      "network": "base:8453",
      "maxAmountRequired": "1000",
      "resource": "https://rpc.astranode.cloud/rpc",
      "description": "Free quota exhausted. Please pay to continue.",
      "payTo": "0xAstraTreasuryWallet",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
    }
  ]
}