Skip to content

API keys

E2B keys are not scoped: each one reaches the whole team. Use one key per app or CI system so you can revoke one without the others.

Bindings already do this for you: each host gets its own key, revoked when the host is destroyed.

E2B mints API keys only with a personal access token, the one setup stores in your profile. In CI, set E2B_ACCESS_TOKEN.

src/Keys.ts
import * as E2B from "@alchemy.run/e2b";
export const Ci = E2B.ApiKey("Ci", {});

ci.key is the key, as a Redacted value. E2B shows it once, so Alchemy keeps it in state. Renaming updates the key in place. Destroying it revokes it.

const team = yield* E2B.ReadTeam();
const events = yield* team.events({ limit: 50 });
const metrics = yield* team.metrics({ start, end });

Provide E2B.ReadTeamHttp.