> ## Documentation Index
> Fetch the complete documentation index at: https://e2b.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://e2b.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://e2b.manicule.dev/api/mcp.
> Every agent surface: https://e2b.manicule.dev/.well-known/llms-manifest.json

# Running your first Sandbox (/docs/quickstart)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 510 · updated: 2026-07-30 -->
Related: [API key](/docs/api-key.md), [Billing & limits](/docs/billing.md), [E2B CLI](/docs/cli.md), [Running commands in sandbox](/docs/commands.md), [Cookbook](https://github.com/e2b-dev/e2b-cookbook), [Filesystem](/docs/filesystem.md)

> This guide will show you how to start your first E2B Sandbox.

<Steps>
<Step title="Create E2B account">Every new E2B account get $100 in credits. You can sign up [here](https://e2b.dev/auth/sign-up).</Step>

  <Step title="Set your environment variables">
    1. Navigate to the E2B Dashboard.
    2. Copy your [API key](https://e2b.dev/dashboard?tab=keys).
    3. Paste your E2B API key into your .env file.

    ```bash title=".env"
    E2B_API_KEY=e2b_***
    ```
  </Step>

  <Step title="Install E2B SDK">
    Install the E2B SDK to your project by running the following command in your terminal.

    <CodeGroup>
```javascript title="JavaScript & TypeScript"
npm i @e2b/code-interpreter dotenv
```

```python title="Python"
pip install e2b-code-interpreter python-dotenv
```
    </CodeGroup>
  </Step>

  <Step title="Write code for starting sandbox">
    We'll write the minimal code for starting Sandbox, executing Python inside it and listing all files inside the root directory.

    <CodeGroup>
```javascript title="JavaScript & TypeScript"
// index.ts
import 'dotenv/config'
import { Sandbox } from '@e2b/code-interpreter'

const sbx = await Sandbox.create() // Creates a persistent sandbox session
const execution = await sbx.runCode('print("hello world")') // Execute Python inside the sandbox
console.log(execution.logs)

const files = await sbx.files.list('/')
console.log(files)
```

```python title="Python"
# main.py
from dotenv import load_dotenv
load_dotenv()
from e2b_code_interpreter import Sandbox

sbx = Sandbox.create() # Creates a persistent sandbox session
execution = sbx.run_code("print('hello world')") # Execute Python inside the sandbox
print(execution.logs)

files = sbx.files.list("/")
print(files)
```
    </CodeGroup>
  </Step>

  <Step title="Start your first E2B sandbox">
    Run the code with the following command:

    <CodeGroup>
```bash title="JavaScript & TypeScript"
npx tsx ./index.ts
```

```bash title="Python"
python main.py
```
    </CodeGroup>
  </Step>
</Steps>
