Logo
New RPC users get 35% off their first monthView the offer
Chainstack
Chainstack5 min read

Chainstack API Key Free: How to Get and Use It

A practical guide to getting a free Chainstack API key, using it with RPC endpoints, and managing it securely for development.

TL;DR

Chainstack offers a free tier that includes API keys for accessing RPC endpoints. This guide explains how to sign up, generate a key, use it with endpoints, and follow security best practices. It also covers limitations and alternatives for developers seeking free RPC access.

What Is a Chainstack API Key?

A Chainstack API key is a credential that authenticates requests to Chainstack's RPC endpoints. It allows developers to interact with blockchain networks such as Ethereum, Solana, and Polygon without running their own nodes.

The key is used in the endpoint URL or as a header, depending on the protocol. Chainstack provides both HTTPS and WebSocket endpoints, and the API key is embedded in the URL for HTTPS requests.

  • API keys are required for all RPC requests to Chainstack.
  • Keys are generated per project and can be managed in the Chainstack console.
  • Free tier keys have usage limits that may change; check Chainstack's documentation for current details.

How to Get a Free Chainstack API Key

To obtain a free API key, sign up for a Chainstack account. The free tier typically includes a limited number of requests per month and access to shared nodes.

After registration, create a project and deploy a node. The API key is automatically generated and can be found in the node's access details.

  • Visit the Chainstack website and create an account.
  • Verify your email and log in to the console.
  • Create a new project and select a blockchain network.
  • Deploy a node (free tier options are available).
  • Locate the API key in the node's endpoint URL or in the credentials section.
# Example endpoint URL with API key (replace YOUR_API_KEY)
https://ethereum-mainnet.core.chainstack.com/YOUR_API_KEY

Using Your Chainstack API Key with RPC Endpoints

Once you have the API key, you can use it to send JSON-RPC requests to the node. The key is part of the endpoint URL, so you don't need to set additional headers for basic authentication.

Below is an example of a curl request to get the latest block number on Ethereum. Replace YOUR_API_KEY with your actual key.

  • HTTPS endpoints are used for request-response interactions.
  • WebSocket endpoints (wss://) are available for subscriptions and real-time data.
  • Keep your API key confidential; do not expose it in client-side code.
curl -X POST https://ethereum-mainnet.core.chainstack.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Free Tier Limitations and Considerations

The free tier on Chainstack is designed for development and testing. It includes a limited number of requests per month and may have rate limits. These limits are subject to change, so refer to Chainstack's pricing page for the most current information.

Free tier nodes are shared, which means performance may vary compared to dedicated nodes. For production use, consider upgrading to a paid plan.

  • Request limits: Free tier typically includes a set number of requests per month.
  • Rate limits: Requests per second may be capped.
  • Shared infrastructure: Free nodes are shared among users.
  • No uptime guarantees: Free tier does not include SLA.

Security Best Practices for API Keys

API keys grant access to your Chainstack resources. Treat them like passwords. Avoid committing them to public repositories or embedding them in frontend code.

Use environment variables to store keys and rotate them if compromised. Chainstack allows you to regenerate keys in the console.

  • Store keys in environment variables or secret managers.
  • Restrict key usage to specific IP addresses if supported.
  • Monitor usage for unexpected activity.
  • Regenerate keys periodically or if exposed.

Alternatives for Free RPC Access

If Chainstack's free tier doesn't meet your needs, other providers offer free tiers with different limits. Some popular options include QuickNode, Alchemy, and Infura. Each has its own API key system and usage policies.

When choosing a provider, consider the networks supported, request limits, and whether the free tier includes the features you need, such as WebSocket support or archive data.

  • QuickNode: Offers a free tier with limited requests.
  • Alchemy: Free tier with compute units and enhanced APIs.
  • Infura: Free tier with daily request limits.
  • Compare limits and features before committing.

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started