| title | API Key |
|---|---|
| icon | key |
To use the API key, you can either:
- Set the API key as the
E2B_API_KEYenvironment variable to avoid passing it each time you create a sandbox. - Or pass it directly to the
Sandboxconstructor as shown below:
const sandbox = await Sandbox.create({ apiKey: 'YOUR_API_KEY' })
```python Python
from e2b_code_interpreter import Sandbox
sbx = Sandbox.create(api_key="YOUR_API_KEY")
You can get your API key at dashboard.
The access token is used only in the CLI and is not needed in the SDK. There's no need to set it when logging into the CLI using e2b auth login.
You can get your Access token key at the dashboard.