Keys / Mistral AI
MISTRAL_API_KEY
The Mistral API key your app calls Mistral models with. Each key belongs to one Workspace.
- Expires
- you choose, or never
- API
- list, create and delete, with an Enterprise admin key (beta)
Get it
Create one on console.mistral.ai/api-keys. The steps aren't recorded yet.
Set it
MISTRAL_API_KEY=...
The Python and TypeScript SDKs read it from this variable when you don't pass a key. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- Create a new key in the same Workspace, with the same connector access scope.
- Deploy it everywhere that reads
MISTRAL_API_KEY. - Check that requests succeed with the new key, then delete the old one.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.