E2B.API key reference
ApiKey
Section titled “ApiKey”Source:
packages/e2b/src/ApiKey.ts
An E2B team API key.
E2B keys are not scoped: every key reaches every sandbox, template, volume and secret in the team. Mint a separate key per app or CI system so you can revoke one without the others.
E2B mints API keys only with a personal access token: set accessToken
in the E2B profile, or E2B_ACCESS_TOKEN in CI. The team defaults to the
token’s default team. E2B shows the key once, at creation; Alchemy keeps it
in state as a Redacted value. A key whose value was lost is replaced.
ApiKey: Creating an API key
Section titled “ApiKey: Creating an API key”A key for CI
export const Ci = E2B.ApiKey("Ci", {});Pass the key to a Worker as a secret
const ci = yield* Ci;yield* GitHub.Secret("E2B_API_KEY", { repository: "my-org/app", value: ci.key });