Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,11 @@ To use the API key, you can either:
import { Sandbox } from '@e2b/code-interpreter'

const sandbox = await Sandbox.create({ apiKey: 'YOUR_API_KEY' })
await sandbox.notebook.execCell('x = 1')

const execution = await sandbox.notebook.execCell('x+=1; x')
console.log(execution.text) // outputs 2

await sandbox.close()
```
```python {{ language: 'python' }}
from e2b_code_interpreter import CodeInterpreter
from e2b_code_interpreter import Sandbox

with CodeInterpreter(api_key="YOUR_API_KEY") as code_interpreter:
sandbox.notebook.exec_cell("x = 1")
execution = sandbox.notebook.exec_cell("x+=1; x")
print(execution.text) # outputs 2
sbx = Sandbox(api_key="YOUR_API_KEY")
```
</CodeGroup>

Expand Down
11 changes: 6 additions & 5 deletions apps/web/src/components/Navigation/routes.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Braces, CheckCircle, Home, MessagesSquare } from 'lucide-react'
import { Braces, CheckCircle, Home, KeyRound, MessagesSquare } from 'lucide-react'
import sdkRefRoutesJson from './sdkRefRoutes.json'

enum Tag {
Expand Down Expand Up @@ -58,12 +58,13 @@ export const docRoutes: NavGroup[] = [
title: 'Install custom packages',
href: '/docs/quickstart/install-custom-packages',
},
{
title: 'API Key',
href: '/docs/quickstart/api-key',
},
],
},
{
title: 'API Key',
href: '/docs/api-key',
icon: <KeyRound size={16} />,
},
{
title: 'Cookbook',
href: 'https://github.com/e2b-dev/e2b-cookbook',
Expand Down