Berachain

Berachain

cURL

curl is the fastest way to probe Berachain without pulling in an SDK — ideal for sanity-checking your endpoint, debugging a failing call, or wiring up a shell script or CI health check. Every Berachain JSON-RPC request is an HTTP POST carrying Content-Type: application/json, and your API key lives in the URL path: https://berachain.therpc.io/YOUR_API_KEY. Since Berachain is an EVM L1 (chain ID 80094), the method names — eth_blockNumber, eth_getBalance, and the rest — are the standard ones, and BERA balances come back in hex wei.

Your Berachain API key can travel two ways: in the URL path (https://berachain.therpc.io/YOUR_API_KEY) or as a Authorization: Bearer YOUR_API_KEY header. Either way, the request itself must always be an HTTP POST with Content-Type: application/json — Berachain's JSON-RPC endpoint does not answer GET requests.

Basic Usage

curl -X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
https://berachain.therpc.io/YOUR_API_KEY

Authentication

curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
https://berachain.therpc.io/YOUR_API_KEY

Common Operations

curl -X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x742d35Cc6634C0532925a3b844Bc454e4438f44e","latest"],"id":1}' \
https://berachain.therpc.io/YOUR_API_KEY
curl -X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],"id":1}' \
https://berachain.therpc.io/YOUR_API_KEY

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.