E2B

API

Cloud sandboxes for running AI-generated code

Price
Free credits, then paid
Access
API key

About

Cloud sandboxes, each a Firecracker microVM, for running AI-generated code and agent workloads, controlled through Python and JavaScript SDKs. Sandboxes are CPU-only, with no GPUs. The open-source infrastructure can be self-hosted.

What you can do with it

  • Run LLM-generated Python or JavaScript in an isolated cloud sandbox
  • Give an agent its own Linux VM to run commands and edit files
  • Pause, snapshot and resume sandboxes to keep an agent's state

Get started

  1. Sign up for E2B (new accounts get $100 in credits)
  2. Copy your API key into E2B_API_KEY
  3. Install the e2b-code-interpreter SDK

Example

# pip install e2b-code-interpreter; the SDK reads E2B_API_KEY from the environment
from e2b_code_interpreter import Sandbox

sbx = Sandbox.create()
execution = sbx.run_code("print('hello world')")
print(execution.logs)

Details

Hosting
Hosted service, Self-hosted
Available in
Worldwide
Official SDKs
JavaScript/TypeScript, Python
MCP server
None

Tasks

Alternatives

Other tools for the same tasks.

Last checked on .