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

# API key

> Authenticate the E2B SDKs and CLI with your API key. Set E2B_API_KEY as an environment variable or pass the key to Sandbox.create, and find it in the console.

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 `Sandbox.create` as shown below:

```js JavaScript & TypeScript theme={"theme":"css-variables"}
import { Sandbox } from 'e2b'

const sandbox = await Sandbox.create({ apiKey: 'YOUR_API_KEY' })
```

```python Python theme={"theme":"css-variables"}
from e2b import Sandbox

sbx = Sandbox.create(api_key="YOUR_API_KEY")
```

## Where to find API key

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

The same API key authenticates both the SDKs and the [CLI](https://docs.e2b.dev/cli/auth.md).
