Keys / AI21 Labs
AI21_API_KEY
The AI21 API key your app calls Jamba models and Maestro with. Keys belong to a workspace in AI21 Studio.
- Expires
- the docs don't say
- API
- none; AI21 Studio only
Get it
Create one on studio.ai21.com/v2. The steps aren't recorded yet.
Set it
AI21_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
- In AI21 Studio, open Settings, then API Keys, and create a new key. Copy it; the full key isn't shown again.
- Deploy it everywhere that reads
AI21_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.