Setup
Sign up at e2b.dev. Alchemy logs in to E2B in your browser, finds your team, and mints a separate API key for each host that uses a binding.
E2B keys are not scoped: a key reaches every sandbox, template, volume, and secret in the team. Use a separate team for tests.
Add the provider
Section titled “Add the provider”Install @alchemy.run/e2b:
pnpm add https://pkg.alchemy.run/@alchemy.run/e2b/pr:2930:51c662abun add https://pkg.alchemy.run/@alchemy.run/e2b/pr:2930:51c662anpm install https://pkg.alchemy.run/@alchemy.run/e2b/pr:2930:51c662ayarn add https://pkg.alchemy.run/@alchemy.run/e2b/pr:2930:51c662aThen add E2B.providers() next to your cloud’s providers:
import * as E2B from "@alchemy.run/e2b";
providers: Layer.mergeAll(Cloudflare.providers(), E2B.providers()),Log in
Section titled “Log in”alchemy profile edit --add E2BPick Browser login and sign in to E2B. The profile keeps the login, and its token refreshes itself. To paste an access token or API key instead, pick Access token or API key.
See Profiles to learn how profiles work.
Use environment variables in CI
Section titled “Use environment variables in CI”Set E2B_ACCESS_TOKEN and Alchemy uses it instead of your profile:
E2B_ACCESS_TOKEN=sk_e2b_... alchemy deployAn API key (E2B_API_KEY) is enough to deploy resources, but bindings and E2B.ApiKey need the access token: only it can mint keys.