@tpmjs/tools-e2b
Create a new E2B cloud sandbox from a template with configurable resources and timeout.
Failed to create sandbox with template "base": 401: authorization header is missing
Last checked: 3/6/2026, 4:14:32 AM
Test @tpmjs/tools-e2b (createSandbox) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-e2bpnpm add @tpmjs/tools-e2byarn add @tpmjs/tools-e2bbun add @tpmjs/tools-e2bdeno add npm:@tpmjs/tools-e2bimport { createSandbox } from '@tpmjs/tools-e2b';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { createSandbox } from '@tpmjs/tools-e2b';
const result = await generateText({
model: openai('gpt-4o'),
tools: { createSandbox },
prompt: 'Your prompt here...',
});
console.log(result.text);(envVars?: Record<string, unknown>, metadata?: Record<string, unknown>, template?: string, timeoutMs?: number) => Promise<unknown>Available configuration options
templatestringTemplate ID to use (default: "base" for Code Interpreter)
timeoutMsnumberSandbox timeout in milliseconds (default: 300000 = 5 minutes)
metadataobjectCustom metadata key-value pairs to attach to sandbox
envVarsobjectEnvironment variables to set in the sandbox
Schema extracted: 3/6/2026, 4:14:32 AM
ERROR: No README data found!
Downloads/month
3
GitHub Stars
19
Quality Score