Keys / E2B
E2B_API_KEY
The E2B API key your app creates sandboxes with. Each key belongs to one project.
- Expires
- the docs don't say
- API
- none in the API reference; console only
Get it
Create one on console.e2b.dev. The steps aren't recorded yet.
Set it
E2B_API_KEY=...
The JavaScript and Python SDKs read it from this variable when you don't pass a key. The E2B CLI reads it too. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- Create a new key in the same project in the console.
- Deploy it everywhere that reads
E2B_API_KEY. - Check that sandboxes start with the new key, then delete the old one. A deleted key stops working at once.
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.