| name | vercel-sandbox |
| description | Guide for creating and managing Vercel sandboxes using ComputeSDK. Use when building applications that need Vercel's globally distributed serverless sandbox environments for code execution with Node.js or Python runtimes. |
Vercel Sandboxes with ComputeSDK
Run code in Vercel's globally distributed serverless environments through ComputeSDK's unified API. Vercel provides fast edge execution with Node.js and Python runtimes — ideal for serverless functions and globally distributed code execution.
Setup
npm install computesdk
COMPUTESDK_API_KEY=your_computesdk_api_key
VERCEL_TOKEN=your_vercel_token
VERCEL_TEAM_ID=your_vercel_team_id
VERCEL_PROJECT_ID=your_vercel_project_id
Get your ComputeSDK key at https://console.computesdk.com/register
Quick Start
import { compute } from 'computesdk';
const sandbox = await compute.sandbox.create();
const result = await sandbox.runCode('print("Hello from Vercel!")');
console.log(result.output);
await sandbox.destroy();
Explicit Configuration
For multi-provider setups or when you want to be explicit:
import { compute } from 'computesdk';
compute.setConfig({
computesdkApiKey: process.env.COMPUTESDK_API_KEY,
provider: 'vercel',
vercel: {
token: process.env.VERCEL_TOKEN,
teamId: process.env.VERCEL_TEAM_ID,
projectId: process.env.VERCEL_PROJECT_ID,
}
});
const sandbox = await compute.sandbox.create();
Vercel Configuration Options
interface VercelConfig {
token?: string;
teamId?: string;
projectId?: string;
runtime?: 'node' | 'python';
timeout?: number;
}
Full API
ComputeSDK provides the same API across all providers: filesystem operations, shell commands, managed servers, overlays, terminals, and client access.
Install the main skill for the complete reference:
npx skills add https://github.com/computesdk/sandbox-skills --skill computesdk
Or see https://www.computesdk.com/docs/reference/sandbox/