Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.09 KB

File metadata and controls

40 lines (25 loc) · 1.09 KB

import Link from 'next/link'

API Key

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:
```js {{ language: 'js' }} import { Sandbox } from '@e2b/code-interpreter'

const sandbox = await Sandbox.create({ apiKey: 'YOUR_API_KEY' })

```python {{ language: 'python' }}
from e2b_code_interpreter import Sandbox

sbx = Sandbox.create(api_key="YOUR_API_KEY")

Where to find API key

You can get your API key at dashboard.


Access Token

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.

To authenticate without the browser, you can set `E2B_ACCESS_TOKEN` as an environment variable. This is useful for CI/CD pipelines.

Where to find Access token

You can get your Access token key at the dashboard.