Authentication
Authenticate NodeFlare RPC requests with an API key in the URL path or an HTTP header. Use several keys per account, rotate without downtime and restrict a key.
NodeFlare uses API keys for authentication. Include your key in every request.
Via URL path (recommended)
https://rpc.nodeflare.app/eth/v1/nf_live_YOUR_KEYVia HTTP header
curl https://rpc.nodeflare.app/eth/v1/ \
-H "X-API-Key: nf_live_YOUR_KEY" \
-X POST \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'The Data API (/data/*) reads the key from a header only: Authorization: Bearer nf_live_YOUR_KEY or x-api-key. A key in the URL path is not read there.
Key format
All NodeFlare API keys follow the format nf_live_ followed by a 64-character hex string.
Get your key from your dashboard.
Several keys per account
Every account has a main key. You can add named keys next to it in the dashboard, for example one per app or environment, and revoke each one on its own.
| Plan | Keys, including the main key |
|---|---|
| Free | 2 |
| Hacker | 3 |
| Starter | 5 |
| Pro | 10 |
| Scale | 25 |
All keys of an account share its plan: one monthly compute-unit quota and one rate limit. A second key does not add quota or requests per second. The dashboard shows how many compute units each additional key used this month.
Rotating a key without downtime
When you rotate a key you choose how long the old one keeps working: 1 hour, 24 hours, 7 days, or not at all. During that period both keys are accepted, so you can deploy the new key first and let the old one run out. The dashboard lists the old key with the time it has left, shows whether it is still being used, and lets you stop it early.
Choose "stop it now" for a key that has leaked. A stopped or revoked key is refused in every region within a few minutes.
Restricting a key
An additional key can be limited to what it is meant for. Each restriction is optional; the main key is never restricted.
| Restriction | Example | Use |
|---|---|---|
| Origins | app.example.com, *.example.com | A key that ships in browser code. Other websites cannot use a copied key. A script outside a browser can forge the Origin header, so this does not protect a server key. |
| IP addresses | 203.0.113.7, 10.0.0.0/8 | A server with a fixed address. IPv4 and IPv6, single addresses or CIDR ranges. |
| Chains | eth, base | The chain names used in the endpoint URL. |
| Methods | eth_call, net_*, eth_get* | Exact method names, or a prefix ending in *. Applied to every call in a batch and every WebSocket message. |
How the lists are applied:
- A request must pass every list that is set. Each list holds up to 20 entries.
- An origin entry is a host name without scheme or port.
*.example.comcovers every subdomain but notexample.comitself; add both if you need both.localhostis allowed, for development. - A key with an origin list refuses requests that carry no
Originheader, which includes calls made from your own server during server-side rendering. Use a separate key there. - A new or changed restriction and a revoked key take effect within about a minute; allow a few minutes before you rely on it everywhere.
A key with a method list only accepts plain JSON-RPC calls: each call may contain jsonrpc, id, method and params and nothing else, and no object inside params may have a member named method. This keeps the check identical to what the node executes.
A request outside a key's restrictions gets HTTP 403 with "error": "key_restricted" and is not charged. On a WebSocket a refused method gets a JSON-RPC error and the socket stays open. A key restricted to chains or methods cannot be used on the data API or the answer endpoint, which are not bound to one chain or method.
Public endpoint (no API key)
Every chain also has a public endpoint that works without an API key:
https://rpc.nodeflare.app/{chain}/publicThe public endpoint is rate-limited to 50 requests per 10 seconds per IP and blocks heavy methods (eth_getLogs, trace_*, debug_*). It's suitable for quick tests and lightweight integrations. Sign up for a free account to get a key with higher limits and full method access.