Files
e2b-dev--e2b/packages/js-sdk
Jakub Novák f123091e9a Allow to block network from SDK (#834)
# Description

This pull request introduces the ability to control internet access for
sandboxes, enhancing security for sensitive workloads.
2025-07-31 02:34:57 -07:00
..
2023-09-20 11:21:23 +02:00
2025-06-05 07:10:07 -07:00
2025-07-30 19:25:33 +00:00
2024-10-15 08:26:25 -07:00
2024-11-26 10:43:59 -08:00

e2b logo

Last 1 month downloads for the JavaScript SDK

What is E2B?

E2B is an open-source infrastructure that allows you to run AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our JavaScript SDK or Python SDK.

Run your first Sandbox

1. Install SDK

npm i @e2b/code-interpreter

2. Get your E2B API key

  1. Sign up to E2B here.
  2. Get your API key here.
  3. Set environment variable with your API key
E2B_API_KEY=e2b_***

3. Execute code with code interpreter inside Sandbox

import { Sandbox } from '@e2b/code-interpreter'

const sbx = await Sandbox.create()
await sbx.runCode('x = 1')

const execution = await sbx.runCode('x+=1; x')
console.log(execution.text)  // outputs 2

4. Check docs

Visit E2B documentation.

5. E2B cookbook

Visit our Cookbook to get inspired by examples with different LLMs and AI frameworks.