An Alchemy API key lets whoever holds it send requests to Alchemy’s node infrastructure under your account. Those requests are billed to you and count against your plan’s limits, and they can be used to read blockchain data or to send transactions through any wallet connected to the key. A leaked key is rarely a data breach in itself, but it can run up a large bill and get your app rate-limited for its real users. Revoke or replace the key first, then look at what it was used for.
Check your GitHub account for leaked secrets — free
- Provider
- Alchemy
- Severity
- High
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What an Alchemy API Key looks like
Alchemy keys come in two common shapes. Older keys are a bare string of letters and digits, about 32 characters long, with no prefix at all. Newer keys often begin with alcht_, followed by a mix of letters and digits:
alcht_…XXXX newer Alchemy key (masked)
XXXX… older Alchemy key without a prefix (masked)
Because the older form has no prefix, the value on its own tells you little. The word Alchemy, or a variable name that contains it, is usually what identifies it in a file. The full RPC URL that contains the key is also a secret, even though it looks like an ordinary web address. Some Alchemy keys are for a single app, and an app can have separate keys for each network it uses, so one leak may mean several keys to replace.
How Alchemy API Keys get leaked
- RPC URLs in front-end code. A node URL that includes the key is placed in a JavaScript bundle, where anyone who loads the page can copy it.
- Environment files committed by accident. A
.envfile with an Alchemy key pushed to a public repository. - Mobile and desktop builds. A key compiled into an app package, which can be extracted from the package with little effort.
- Tutorials and examples. A key copied from a sample project, a tutorial or an AI assistant output, then left in place.
- Logs and screenshots. A debug print of the RPC URL, a CI log, or a screenshot of a configuration page shared in a support thread.
What to do in the first hour
- Replace the key. Sign in to the Alchemy dashboard and open the account settings. Create a new app or key for the affected service, then stop the old one. Do this before you clean up the code.
- Move the new key out of the client. If the app calls the node from a browser or a phone, route the calls through your own server or a proxy, so the key is not in the bundle.
- Check usage. Review the dashboard usage for the period since the exposure. Look for spikes in requests, for networks you do not use, and for traffic at unusual hours.
- Check the bill. Compare the charges with your normal pattern. If you see a large difference, contact Alchemy support and ask for a review, since usage can lag the dashboard.
- Review allowlists. If the app lets you restrict which domains or contract addresses can use a key, tighten those settings on the new key.
- Check connected wallets and transactions. If the key was used by a service that also signs transactions, review the wallets and recent transactions on the affected networks. The node key alone does not sign anything, but a leaked key found next to a private key is a much bigger problem.
- Clean the repository. Remove the value from current files, add the environment file to
.gitignore, and rewrite history if the repository was public. See I accidentally pushed an API key to GitHub for the full order of steps.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at Alchemy
Alchemy issues keys per app, and each app is managed from the Alchemy dashboard. Open the app that holds the exposed key, then look in its settings for the option to manage or replace the key. Because the key is what your application uses to reach the network, check the usage page and the list of networks before you stop it, so that you know which services will be affected. Replacing the key is usually the cleanest route, because it lets you deploy the new value first. We could not confirm the exact menu wording and placement for revocation from Alchemy’s own documentation, so verify it in the dashboard before relying on any description of it. If your account has more than one app, check each one, since a repository often holds keys for several.
How LeakWatch detects it
The rule is called “Alchemy API Key”. It looks for the word alchemy followed within a short distance by a value that is either 32 letters, digits or underscores, or an alcht_ value with 30 letters or digits after the prefix, with word boundaries around the value. Because the older form has no prefix, the rule relies on the nearby word, so a bare string that does not sit near the name will not be reported. The severity is high, with the SaaS impact class. This type is not checked live: LeakWatch does not send the value to Alchemy, so a finding means a matching value was seen next to the name, not that the key still works.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
Is an Alchemy key as dangerous as a wallet private key?
No. A node key lets someone use your Alchemy quota and read blockchain data through your app. It does not, on its own, sign transactions. A private key or seed phrase is far more serious, and it should be treated as a separate incident if it was in the same place.
Can I just restrict the key instead of replacing it?
Allowlisting a key to specific domains helps against casual abuse, since a browser sends the origin. It does not protect against a server-side script that spoofs the header, so for a key that has leaked, replacing it is the right step.
How do I stop this from happening again?
Keep node calls on the server or behind a proxy, store keys in the environment of the process that uses them, and set usage alerts so that unexpected traffic is noticed quickly.