Benchmarked
Superserve
Last updated
Was this helpful?
Was this helpful?
npm install @computesdk/superserveSUPERSERVE_API_KEY=your_api_keyimport { superserve } from '@computesdk/superserve';
const compute = superserve({
apiKey: process.env.SUPERSERVE_API_KEY,
});
// Create sandbox
const sandbox = await compute.sandbox.create();
// Run a command
const result = await sandbox.runCommand('echo "Hello from Superserve!"');
console.log(result.stdout); // "Hello from Superserve!"
// Clean up
await sandbox.destroy();interface SuperserveConfig {
/** Superserve API key. Falls back to `SUPERSERVE_API_KEY` env var. */
apiKey?: string;
/** API base URL. Falls back to `SUPERSERVE_BASE_URL` env var, then `https://api.superserve.ai`. */
baseUrl?: string;
/** Default sandbox idle timeout in milliseconds. */
timeout?: number;
}