Files
e2b-dev--e2b/packages/js-sdk
Jakub Novák 2904f3e80b Fix failing write test (#621)
# Description

Sandbox is closed before the test ends, which resulted in error. The
clean up is meant for local testing only
2025-03-20 02:51:42 -07:00
..
2024-11-26 10:34:04 -08:00
2025-03-20 02:51:42 -07:00
2023-09-20 11:21:23 +02:00
2024-10-15 17:00:22 -07:00
2024-11-22 14:45:39 -08:00
2024-10-15 08:26:25 -07:00
2023-11-10 11:45:45 +01:00
2024-11-26 10:43:59 -08:00
2025-02-10 18:13:01 -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 sandbox = 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.