Quickstart
Spawn your first sandbox in 30 seconds — curl, Python, and TypeScript.
You'll need an API key. Sign in at dev.pandastack.ai, open
Settings → Tokens, and create one. It looks like dam_xxx….
export PANDASTACK_API_KEY=dam_xxxxxxxxxxxxxxxx
export PANDASTACK_API=https://api-dev.pandastack.aicurl
# 1. Create a sandbox from the code-interpreter template.
SBX=$(curl -sX POST "$PANDASTACK_API/v1/sandboxes" \
-H "authorization: Bearer $PANDASTACK_API_KEY" \
-H "content-type: application/json" \
-d '{"template":"code-interpreter","cpu":1,"memory_mb":512}' \
| jq -r .id)
echo "sandbox: $SBX"
# 2. Run a command inside it.
curl -sX POST "$PANDASTACK_API/v1/sandboxes/$SBX/exec" \
-H "authorization: Bearer $PANDASTACK_API_KEY" \
-H "content-type: application/json" \
-d '{"cmd":"python -c \"print(2+2)\""}'
# 3. Delete it when you're done.
curl -sX DELETE "$PANDASTACK_API/v1/sandboxes/$SBX" \
-H "authorization: Bearer $PANDASTACK_API_KEY"Python
pip install pandastackfrom pandastack import Sandbox
with Sandbox(template="code-interpreter") as sb:
result = sb.run("python -c 'print(2+2)'")
print(result.stdout) # "4\n"
# Mutate the filesystem
sb.write("/tmp/data.csv", "a,b\n1,2\n")
print(sb.read("/tmp/data.csv"))TypeScript / Node.js
npm install @pandastack/sdkimport { Sandbox } from "@pandastack/sdk";
const sb = await Sandbox.create({ template: "code-interpreter" });
const { stdout } = await sb.run(`python -c "print(2+2)"`);
console.log(stdout); // "4\n"
await sb.close();What just happened
When you POST to /v1/sandboxes, the orchestrator:
- Allocates a NATID slot (private IP + isolated netns) from a pre-warmed pool — ~5 ms.
- Restores a Firecracker snapshot of the template — ~240 ms for
code-interpreter. - Clones the template rootfs via XFS reflink — ~5 ms (copy-on-write, not byte copy).
- Returns the sandbox ID before SSH is even reachable; subsequent
execcalls block on SSH ready.
That's why total wall-clock from POST to 200 OK is consistently under 300 ms.
Next steps
- Templates — list of pre-baked rootfs images.
- Forks — clone a running sandbox in 50 ms.
- Python SDK reference — full API surface.