> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# E2B

> Manage E2B code-execution sandboxes - list, create, inspect, and kill cloud sandboxes and browse available templates

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key from `E2B_API_KEY` is sent as the `X-API-Key` header.
* **Docs**: [https://e2b.dev/docs/api-reference](https://e2b.dev/docs/api-reference)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable      | Required | Description                                                                                                                                                     |
| ------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `E2B_API_KEY` | Yes      | E2B API key (starts with e2b\_), created in the E2B Dashboard under Keys; same env var used by the E2B SDKs and CLI [Docs](https://e2b.dev/dashboard?tab=keys). |

## Setup

1. **Create an E2B account**: Sign up at [https://e2b.dev](https://e2b.dev) - the free hobby tier includes sandbox usage credits, so no payment method is needed to test.
2. **Get an API key**: Open the E2B Dashboard ([https://e2b.dev/dashboard](https://e2b.dev/dashboard)), go to the Keys tab, and copy your API key (starts with e2b\_) or create a new one.
3. **Set the environment variable**: Copy the key into your .env as E2B\_API\_KEY.
4. **Verify access**: Run List Templates and List Sandboxes to confirm the key works.

* The platform REST API is served on [https://api.e2b.app](https://api.e2b.app) and authenticates with the X-API-Key header
* Sandboxes are killed automatically when their timeout (TTL) elapses unless autoPause is set
* Running sandboxes consume billable compute - kill sandboxes you no longer need
* Code execution, filesystem, and process control inside a sandbox are SDK-first (served per sandbox on \{port}-\{sandboxID}.e2b.app) and are not covered by these platform tools

Provider API reference: [https://e2b.dev/docs/api-reference](https://e2b.dev/docs/api-reference)

## Tools

| Tool                | Access | Description                                                                                                                                                                                                  |
| ------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| List Sandboxes      | Read   | List all running sandboxes, optionally filtered by metadata key/value pairs                                                                                                                                  |
| Create Sandbox      | Write  | Create a new sandbox from a template (starts a billable running sandbox)                                                                                                                                     |
| Get Sandbox         | Read   | Get a sandbox by ID, including template, state, resources, and start/end times                                                                                                                               |
| Kill Sandbox        | Write  | Kill a sandbox by ID, immediately terminating it and discarding its state                                                                                                                                    |
| List Templates      | Read   | List all sandbox templates available to the account, with CPU, memory, and disk defaults                                                                                                                     |
| Pause Sandbox       | Write  | Pause a running sandbox, preserving its state so it can be resumed later - the middle ground between running and killed (returns 204 on success)                                                             |
| Resume Sandbox      | Write  | Resume a paused sandbox with its preserved state and a fresh timeout                                                                                                                                         |
| Set Sandbox Timeout | Write  | Reset a running sandbox's TTL: the sandbox will expire the given number of seconds from now (each call overwrites the previous timeout) - use this to keep a sandbox alive mid-task (returns 204 on success) |

## Example prompts

* List my running E2B sandboxes with their template, state, and expiry time.
* Create a new E2B sandbox from the base template with a 5 minute timeout and show me its ID.
* List my running E2B sandboxes and kill any that I confirm are no longer needed.
