> ## 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

# API key (/docs/api-key)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 341 · updated: 2026-07-30 -->
Related: [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), [Overview](/docs/mcp.md)

To use the API key, you can either:

* **Set the API key as the `E2B_API_KEY` environment variable** to avoid passing it each time you create a sandbox.
* Or pass it directly to the `Sandbox` constructor as shown below:

<CodeGroup>
```js title="JavaScript & TypeScript"
import { Sandbox } from 'e2b'

const sandbox = await Sandbox.create({ apiKey: 'YOUR_API_KEY' })
```

```python title="Python"
from e2b import Sandbox

sbx = Sandbox.create(api_key="YOUR_API_KEY")
```
</CodeGroup>

## Where to find API key

You can get your API key at [dashboard](https://e2b.dev/dashboard?tab=keys).

<br />

# Access token

<Warning>`E2B_ACCESS_TOKEN` is deprecated. New access tokens can no longer be generated after **July 1, 2026**, and all access tokens stop working on **August 1, 2026**. Authenticate with `E2B_API_KEY` instead. See the [access token deprecation](/docs/migration/access-token-deprecation).</Warning>

The access token is used only by the interactive CLI login commands `e2b auth login` and `e2b auth configure`, which set up your local workstation. It is **not needed in the SDK**, and you do not need to set it as an environment variable to use the CLI.

## Where to find access token

You can get your **Access token key** at the [dashboard](https://e2b.dev/dashboard/account). After July 1, 2026, new access tokens can no longer be generated.
