A Mistral API key lets whoever holds it call Mistral’s models through the API and have the usage charged to your organization. The key belongs to one workspace and uses that workspace’s quota and rate limits, so the damage is bounded by what the workspace is allowed to do. It does not open your Le Chat conversations and it does not reach your servers. Replace the key first, then look at what it was used for.
Check your GitHub account for leaked secrets — free
- Provider
- Mistral
- Severity
- High
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- Yes
- Revoke at
- Mistral
What a Mistral API key looks like
A Mistral key is 32 letters and digits with no prefix, no dash and no readable marker:
…XXXX Mistral API key (masked, 32 letters and digits, no prefix)
That is what makes it hard to spot: nothing in the string says it belongs to Mistral. What identifies it is the variable name next to it, usually MISTRAL_API_KEY, and a call to api.mistral.ai. This is also why a bare 32-character string found alone cannot be attributed to Mistral with confidence. Do not confuse it with an OpenAI or Anthropic key: those have recognisable prefixes (sk-, sk-ant-), and the Mistral key does not.
How Mistral API keys get leaked
- Hardcoded in a script. A quick client call with
api_key="…"committed as it is. - Environment files.
.envfiles, Docker compose files and notebook configs copied into a repository, under a name likeMISTRAL_API_KEY. - Agent and tool configs. Coding agents, editor plugins and MCP configuration files that store the key in plain text, then land in a public dotfiles repository.
- Browser code. A key placed in front-end JavaScript so a web page can call the API directly, where every visitor can read it.
- Tutorials and shared notebooks. A key pasted in a Colab notebook, a gist, an issue or a screenshot while asking for help.
What to do in the first hour
- Find the key in the console. In Mistral’s admin panel, open the API Keys page. The list shows each key’s type, its workspace, when it expires and when it was last used. A key that was used recently, or from a workspace you did not expect, tells you where to look first.
- Create a new key in the same workspace, with an expiry date if your policy sets one. Mistral does not let you change a key’s workspace, scope or expiry after creation, so create a new one rather than editing the old one.
- Deploy the new key to the application or secret store that used the old one, and confirm that it still works.
- Delete the exposed key. From the same key list, delete the leaked one. In Studio, developers can do the same from their profile, with the trash icon. Requests made with a deleted key are rejected.
- Check usage. Look at the usage reports of the workspace for the period since the exposure: volume you cannot explain, models you do not use. Usage is tracked per workspace, so check each workspace the key could belong to.
- Check who else can create keys. In an organization, admins and members can create keys. Review the member list and the keys listed under each member for ones you do not recognise.
- Look for other keys in the same place. A repository that held a Mistral key often holds other providers’ keys in the same file. Rotate each of them at its own provider, then move the key out of the code. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at Mistral
Mistral keys are managed from the API Keys page of the Mistral console, after you sign in with the account of the organization that owns them. Organization admins see every key across workspaces; developers see their own from the profile in Studio. Find the exposed key and delete it. Mistral’s documentation describes rotation as creating a new key and then deleting the old one. If you cannot find the key, check the other workspaces and organizations your account belongs to, since keys are scoped to the workspace where they were created. The page can change over time, so if the wording differs from this guide, look for the section where keys are created and listed.
How LeakWatch detects it
The rule is called Mistral API Key (contextual). Because the key has no prefix, the rule does not match a bare string: it requires a label such as MISTRAL_API_KEY, followed by = or : and exactly 32 letters and digits, with or without quotes. Strings found without that label are not reported, which keeps false alerts down but means a Mistral key pasted without its variable name will be missed. The severity is high. This type is checked live: LeakWatch sends the smallest possible chat request, limited to a single output token, to see whether Mistral still accepts the key. It reads none of your data.
LeakWatch can check whether a detected key is still active with a read-only request to Mistral. It never reads your data or spends your credits.
FAQ
Can someone read my Le Chat conversations with this key?
No. The API key makes requests to the models under your workspace. It does not open the chat history of Le Chat. What it exposes is your quota, your bill and the ability to run requests as you.
I only found a 32-character string, with no label. Is it a Mistral key?
Not necessarily. Without the variable name or the api.mistral.ai call, you cannot tell. Look at the code around it, or compare its last characters with the keys listed in your Mistral console.
The key was only in a private repository. Should I still replace it?
Yes, if the repository has collaborators, forks or CI logs, or if you are not sure who can read it. Replacing a key is cheap, and a key you doubt is worth less than a new one.