Installation
Install a Provider Package
Section titled “Install a Provider Package”Install the provider package for the platform you want to use:
# Pick one (or more) providers
npm install @computesdk/blaxel
npm install @computesdk/cloudflare
npm install @computesdk/codesandbox
npm install @computesdk/daytona
npm install @computesdk/e2b
npm install @computesdk/hopx
npm install @computesdk/modal
npm install @computesdk/namespace
npm install @computesdk/runloop
npm install @computesdk/vercelYou only need to install the providers your project uses.
Provider Credentials
Section titled “Provider Credentials”Each provider requires its own API credentials. Add them to a .env file in the root of your project or export them in your shell:
Blaxel
Section titled “Blaxel”BL_API_KEY=your_blaxel_api_key
BL_WORKSPACE=your_blaxel_workspaceCloudflare
Section titled “Cloudflare”CLOUDFLARE_API_TOKEN=your_cloudflare_api_token
CLOUDFLARE_ACCOUNT_ID=your_cloudflare_account_idCodeSandbox
Section titled “CodeSandbox”CSB_API_KEY=your_codesandbox_api_keyDaytona
Section titled “Daytona”DAYTONA_API_KEY=your_daytona_api_keyE2B_API_KEY=your_e2b_api_keyHOPX_API_KEY=your_hopx_api_keyMODAL_TOKEN_ID=your_modal_token_id
MODAL_TOKEN_SECRET=your_modal_token_secretNamespace
Section titled “Namespace”NSC_TOKEN=your_namespace_nsc_tokenRunloop
Section titled “Runloop”RUNLOOP_API_KEY=your_runloop_api_keyVercel
Section titled “Vercel”VERCEL_TOKEN=your_vercel_token
VERCEL_TEAM_ID=your_team_id
VERCEL_PROJECT_ID=your_project_idRefer to each provider’s documentation page for the full list of supported environment variables and configuration options.
Verify Your Setup
Section titled “Verify Your Setup”After installing a provider and setting credentials, verify everything works:
import { e2b } from '@computesdk/e2b';
const compute = e2b({ apiKey: process.env.E2B_API_KEY });
const sandbox = await compute.sandbox.create();
const result = await sandbox.runCode('print("Hello from ComputeSDK!")');
console.log(result.output); // "Hello from ComputeSDK!"
await sandbox.destroy();Replace the import and configuration with whichever provider you installed.