@tpmjs/tools-e2b
Upload a file to the E2B sandbox from base64 content or a URL. Requires E2B_API_KEY.
Test @tpmjs/tools-e2b (uploadFile) 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 { uploadFile } from '@tpmjs/tools-e2b';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { uploadFile } from '@tpmjs/tools-e2b';
const result = await generateText({
model: openai('gpt-4o'),
tools: { uploadFile },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
sandboxIdstringID of the sandbox
pathstringDestination path in sandbox
contentstringBase64 encoded file content
urlstringURL to fetch file from (alternative to content)
Schema extracted: 1/20/2026, 3:49:51 AM
ERROR: No README data found!
Downloads/month
0
Quality Score