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.
1. Create an account
Section titled “1. Create an account”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.
2. Create a key
Section titled “2. Create a key”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.
export SLICE_API_KEY=slice_live_xxxxxxxxxxxxxxxxPick 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.
3. Run code
Section titled “3. Run code”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.
npm install @slicevm/sdkimport { createSlice } from "@slicevm/sdk";
const slice = createSlice(); // remote, because SLICE_API_KEY is setconst 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:
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.
What counts as a run
Section titled “What counts as a run”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.
- Sandbox: options, limits, security model and errors.
- MCP for AI agents: hosted MCP setup for every client, and local mode.
- Functions: deploy code once and call it by name.
- HTTP API reference: every endpoint, field and error code.