Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix codesnippet in docs for API Key (#699)
Jakub Nováke1f1d9666ead
diff --git a/apps/web/src/app/(docs)/docs/quickstart/api-key/page.mdx b/apps/web/src/app/(docs)/docs/api-key/page.mdxsimilarity index 71%rename from apps/web/src/app/(docs)/docs/quickstart/api-key/page.mdxrename to apps/web/src/app/(docs)/docs/api-key/page.mdxindex a6adf4757..08b427caf 100644--- a/apps/web/src/app/(docs)/docs/quickstart/api-key/page.mdx+++ b/apps/web/src/app/(docs)/docs/api-key/page.mdx@@ -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>diff --git a/apps/web/src/components/Navigation/routes.tsx b/apps/web/src/components/Navigation/routes.tsxindex 7d540605c..4fa961828 100644--- a/apps/web/src/components/Navigation/routes.tsx+++ b/apps/web/src/components/Navigation/routes.tsx@@ -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 {@@ -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',