ClearRun API key help
Create, store and protect ClearRun API keys. A verified free account can create one developer key.
Last updated
Start here
How to create a ClearRun API key
Sign in at api.clearrun.net/account/keys and choose Create API key. Copy the key right away. A verified free account can create one developer key.
How to store your ClearRun API key in an environment variable
Set CLEARRUN_API_KEY to your key. The CLI, SDK and MCP server all read it, and it wins over the file saved by clearrun login. From the ClearRun help center.
What to do if your ClearRun API key leaked
Revoke a leaked ClearRun API key on the API keys page. It stops at once and other keys keep working. Then make a new key and check Usage history for calls.
How to turn API access on or off
On Pro, Business and Enterprise, the API access switch stops those keys when it is off. It does not turn a free developer key on or off.
All API keys articles
How to create a ClearRun API key
Sign in at api.clearrun.net/account/keys and choose Create API key. Copy the key right away. A verified free account can create one developer key.
What to do if your ClearRun API key leaked
Revoke a leaked ClearRun API key on the API keys page. It stops at once and other keys keep working. Then make a new key and check Usage history for calls.
How to revoke a ClearRun API key
Open the API keys page, find the key by its name and first characters, and choose Revoke. The key stops working right away. Your other keys keep working.
How to rotate a ClearRun API key
Create a new key, put it everywhere the old one is used, check that it works, then revoke the old key on the API keys page. From the ClearRun help center.
Why can a free account key be refused?
A verified free account can create one developer key. ClearRun refuses it if the email is unverified, it is a second key, or it is not a developer key.
How to store your ClearRun API key in an environment variable
Set CLEARRUN_API_KEY to your key. The CLI, SDK and MCP server all read it, and it wins over the file saved by clearrun login. From the ClearRun help center.
Where does clearrun login save my API key?
In ~/.config/clearrun/config.json, or $XDG_CONFIG_HOME/clearrun/config.json if you set XDG_CONFIG_HOME. On Windows it is under your user profile folder.
How does ClearRun store my API key?
ClearRun stores only a SHA-256 hash of each key, plus its first 12 characters so you can tell keys apart. A plain answer from the ClearRun help center.
What does a ClearRun API key look like?
It starts with crun_, followed by 48 hexadecimal characters (0 to 9 and a to f). The CLI masks it to the first and last four characters, such as crun...1234.
How to turn API access on or off
On Pro, Business and Enterprise, the API access switch stops those keys when it is off. It does not turn a free developer key on or off.
Other topics
- Get started with ClearRun
- What the ClearRun score means
- ClearRun API, CLI, SDK, and MCP
- ClearRun signed receipts
- ClearRun plans and credits
- ClearRun privacy and data
- ClearRun limits and errors
- ClearRun CLI help
- ClearRun SDK help
- ClearRun MCP help
- ClearRun API help
- Use ClearRun with other tools
- ClearRun best practices