Mistral API Key: How to Get One and Keep It Safe
You create a Mistral API key in the Mistral console under API Keys, by selecting "New key". Add a payment method first, because Mistral keeps API keys inactive until billing is set up.
The full key appears only once, so copy it before you close the dialog.
Steps checked against Mistral's own docs in Nov 2026. Menus change, so if a screen looks different, follow the linked docs.
How to get a Mistral API key
- Sign in to the Mistral console and set up billing on a plan with API access.
- Open API Keys and select "New key".
- Give it a name, set an expiration date and choose its connector access scope.
- Create the key and copy it. You can't see the full key again after you close the confirmation dialog.
- Save it as an environment variable called
MISTRAL_API_KEY. Mistral's SDKs and examples read it from there.
Admins can also create keys in the Admin Panel under API, then API Keys, and choose which workspace each key belongs to (Mistral: API keys).
After you create a key, you can't change its workspace, connector scope or expiration date. Pick them carefully, or create a new key later.
Check a key you already have
Not sure which service a key in your config belongs to, or whether you just pasted one somewhere? Paste it below to see what it is and how to revoke it.
Runs only in your browser. The check happens on this page. What you paste isn't sent anywhere, saved or logged, and the checker never contacts the provider. Want proof? Open your browser's network tab, or turn off Wi-Fi, and paste.
What a Mistral API key looks like
Mistral doesn't publish a key format, and its keys have no prefix like sk- or hf_. The secret-scanning rule sets we checked (gitleaks and trufflehog) have no Mistral rule either.
So the checker on this page only flags a Mistral key when the word mistral (as in MISTRAL_API_KEY=) appears next to it. A bare Mistral key looks like any other random string, which is exactly why it slips past pattern-based tools.
How to store your Mistral API key safely
- Keep it in
MISTRAL_API_KEYor a secret manager, never in your code. - Set an expiration date on every key and rotate keys regularly. Mistral's own quickstart recommends both.
- Admins can turn on an API key expiration policy to cap how long any key can live. It's off by default.
- Use one key per app and workspace, so you can delete one without breaking the others.
Never paste your Mistral API key into an AI chat
It usually happens while debugging. The error sits next to a config file, you paste the whole thing into ChatGPT or Claude, and the key goes in with everything else.
Once it's sent, the key is stored on someone else's servers, in the chat history, and possibly in training data, depending on your account settings. Deleting the chat doesn't take it back, so treat any key you pasted as exposed and rotate it.
We wrote a step-by-step guide for that moment: what to do in the first hour after pasting an API key into ChatGPT. And if a tool you installed might have read your keys, see how to check whether your AI keys were exposed.
What to do if your Mistral API key leaks
Rotate first and investigate second. A key that no longer works can't be misused.
- Create a new key in the Mistral console and update your apps.
- Delete the exposed key. Mistral describes rotation exactly this way: create a new key, then delete the old one.
- Check usage for requests you didn't make since the key was exposed.
How Sequirly catches keys at the paste
We build Sequirly, a browser extension that checks what you're about to send to ChatGPT, Claude, Gemini and other AI tools. When a prompt contains an API key, a password or other sensitive data, Sequirly warns you before it leaves your browser, so you can remove it and send the rest.
The check runs inside your browser, and Sequirly says it never sees, stores or sends the values it finds.
There's plenty it doesn't do, so you know where the gaps are:
- It doesn't scan your code, repos or servers. Use a secret scanner such as gitleaks for that.
- It doesn't revoke keys or check whether a key is live. Rotation is still on you.
- It only knows keys by their shape, so a key with no prefix (like Mistral's) can slip past it, just as it slips past the checker above.
- It warns before it blocks, so a person can still choose to send.
Curious how to test that claim yourself? Our post on whether Sequirly is safe to install walks through a network test you can run.
Common Questions
How do I get a Mistral API key?
Sign in to the Mistral console, set up billing, open API Keys and select "New key". Name it, set an expiration date, create it and copy it, because it's shown only once.
Why isn't my Mistral API key working?
Mistral keeps API keys inactive until a payment method is on file. If your balance reaches zero, requests beyond your included usage fail with HTTP status 402.
Can I see my Mistral API key again?
No. Mistral shows the full key only once, when you create it. If you lose it, create a new key and delete the old one.
Does a Mistral API key expire?
It expires on the date you set when you create it, and admins can enforce a maximum lifetime with an expiration policy.
Sources
- Mistral docs: Create your first API key (checked Nov 2026)
- Mistral docs: API keys (admin) (checked Nov 2026)
- Mistral docs: Billing (checked Nov 2026)
- Mistral docs: Workspaces (checked Nov 2026)
Guides for other API keys
Catch the key before it leaves
If you'd like a warning the next time a key ends up in a prompt, try Sequirly now. Or if you'd rather talk it through with us first, book a quick demo.