Create a key for CI
Create keys in the dashboard under API keys (owners and admins). Give CI its own key, with the least access it needs and an expiry:
Options on every key:
- Expiry: 7, 30, 90 or 365 days, or never.
- Sandbox list: limit the key to specific sandbox IDs. Other sandboxes answer “not found” to it.
usage:read and billing:read scopes existed do not have them. Key management is a dashboard action: API keys cannot create, list or revoke keys (the /v1/api-keys routes accept dashboard sessions only, see the API reference).
Use it in a job
Store the key as a CI secret and expose it asE2B_API_KEY (or ANONA_API_KEY) together with E2B_DOMAIN:
sweep.sh
The CLI with a key
The CLI takes--api-key, else ANONA_COMPUTE_API_KEY or E2B_API_KEY, else the profile; a key wins over a browser sign-in. To keep one in a profile:
key_profile.sh