Solana
Ready to call this in production?
Free tier covers personal projects. Pay-as-you-go scales without a card.
Solana
Free tier covers personal projects. Pay-as-you-go scales without a card.
curl is the fastest way to probe the Solana JSON-RPC API without installing a single dependency — it is ideal for sanity-checking your TheRPC key, debugging a malformed request, or wiring a quick shell script around methods like getSlot and getBalance. Every Solana RPC call is an HTTP POST carrying a JSON-RPC 2.0 body: set Content-Type: application/json, supply "jsonrpc":"2.0", an id, the method name, and a positional params array (Solana uses positional, not named, parameters). Your API key goes straight into the request URL — https://solana.therpc.io/YOUR_API_KEY — so there is nothing else to configure.
Authentication is part of the endpoint URL: the path segment YOUR_API_KEY, issued from your TheRPC dashboard, authorizes the request. If you prefer to keep the key out of the path, send it instead as Authorization: Bearer YOUR_API_KEY. Either way, every Solana JSON-RPC call must be a POST with the Content-Type: application/json header — GET requests are not accepted.