Skip to content

Slice Cloud quickstart

Slice Cloud runs TypeScript and JavaScript for you in fresh Slice isolates on our servers. One account gives you two products, one set of API keys and one monthly allowance of runs:

Product What it does Start with
Sandbox Runs untrusted or AI-generated code on demand, with memory and fuel caps, deny-by-default network and egress secret auditing. POST /v1/sandbox/eval, the SDK or MCP
Functions Deploys a TypeScript function once and gives it a versioned endpoint with rollback and per-function limits. POST /v1/functions/<name>/invoke or an MCP tool

The open-source runtime (slice CLI, local MCP server, SDK local mode) stays free and runs on your machine. The cloud is the hosted part. The Free plan needs no card.

Open slicevm.com/console/?mode=signup, enter your email and open the sign-in link we send. Choose Free to start immediately. Already have an account? Use slicevm.com/console.

Choosing Free creates your first key, named default, and shows its secret. To make another, open API keys and press Create key. A secret is shown once: copy it and keep it in a secret manager or an environment variable.

Terminal window
export SLICE_API_KEY=slice_live_xxxxxxxxxxxxxxxx

Pick the narrowest access that works. For a first test Full access is fine; for an AI agent use Sandbox eval only. See Console and API keys.

Terminal window
curl https://api.slicevm.com/v1/sandbox/eval \
-H "Authorization: Bearer $SLICE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"code":"const x: number = 21 * 2; console.log(\"hi\"); x"}'

The value of the last expression comes back as result:

{ "ok": true, "stdout": ["hi"], "result": 42, "violation": null, "telemetry": { "vmExecUs": 18.4, "fuelConsumed": 412 } }

The real response carries every telemetry field; the numbers vary by workload.

Terminal window
npm install @slicevm/sdk
import { createSlice } from "@slicevm/sdk";
const slice = createSlice(); // remote, because SLICE_API_KEY is set
const run = await slice.evalSandbox("[1, 2, 3].map((n) => n * 2)");
console.log(run.ok, run.result); // true [ 2, 4, 6 ]
await slice.close();

Give an AI agent a sandboxed slice_eval_ts tool. In Claude Code:

Terminal window
claude mcp add --transport http slice https://api.slicevm.com/mcp \
--header "Authorization: Bearer $SLICE_API_KEY"

Cursor, Windsurf, VS Code and Claude Desktop are on MCP for AI agents.

One eval, one function invoke, or one MCP tool call is one run. MCP initialize and tools/list are free. Requests rejected for a missing key or a scope the key lacks are not charged, and on console accounts neither is a request that never starts a run (malformed input, an unknown function, the runs-in-flight limit, a busy node). Every key on the account draws on the same monthly allowance: see Plans and limits.