You can download data from the sandbox using the files.read() method.
files.read()
import fs from 'fs' import { Sandbox } from '@e2b/code-interpreter' const sandbox = await Sandbox.create() // Read file from sandbox const content = await sandbox.files.read('/path/in/sandbox') // Write file to local filesystem fs.writeFileSync('/local/path', content)
Was this page helpful?