spawnd gives an AI agent a secure Firecracker microVM over a REST call. Create a sandbox, run untrusted code inside it, expose a port, snapshot and fork it — and pay only for the resource-seconds you allocate.
The primary consumer of spawnd is a machine — an agent or app driving sandboxes at scale, not a human clicking around. A sandbox is one Firecracker microVM running a generic Ubuntu rootfs with common toolchains preinstalled (Node, Python, Go, Rust, and the usual build utilities). Guest code is hostile by default and isolated by construction; it cannot reach the host, the control plane, or another sandbox.
REST / SDK API
The primary surface. Create, exec, files, ports, and the full lifecycle.
SSH & terminal
A browser terminal or SSH into the VM for human sessions.
Preview URLs
Expose a guest port at <id>--<workspace>.spawnd.oonamy.xyz via reverse proxy.
MCP server
Sandbox control as MCP tools, so LLM clients drive VMs directly.
Quickstart
From zero to a running sandbox with curl. Base URL is https://spawnd.oonamy.xyz.
Request a magic link
In dev mode the sign-in link is returned inline as devLink.
Two disjoint auth surfaces share one port. A session JWT cannot drive the sandbox SDK, and an API key cannot manage keys.
Org API key
All sandbox and usage calls. Sent as a bearer token:
Authorization: Bearer sk_live_...
Stored as a sha256 hash + 20-char prefix; the secret is shown once at creation.
Session JWT
Dashboard and key-management calls (/auth/*, /v1/keys):
Authorization: Bearer <jwt>
Issued by the passwordless magic-link flow. No passwords anywhere.
Magic link, dev mode. With no email provider configured the sign-in link is returned in the response (devLink) and logged — never dropped. The console auto-provisions your default API key on first authenticated load.
Sandboxes & sizes
template accepts a named size preset. Allocation (vCPU + memory) is fixed at create time and is the basis for resource-seconds billing. Unknown names fall back to the base size.
Name
vCPU
Memory
Use for
smallbox / base
1
2048 MiB
Light scripts, quick execs — cheapest.
box / default
2
4096 MiB
The default. General-purpose agent work.
bigbox
4
8192 MiB
Heavy compilation, parallel workloads.
megabox
8
16384 MiB
The largest box — big builds, many parallel jobs.
Lifecycle
Every sandbox supports the full lifecycle, and every verb is idempotent: kill on a dead sandbox succeeds, pause on a paused VM is a no-op, and create with the same idempotency key returns the same sandbox.
Verb
Meaning
create
Allocate a sandbox from a template; resumes from the warm pool when it can.
start
Bring a created sandbox to running.
exec
Run a command inside the guest and get its stdout, stderr, and exit code.
snapshot
Capture full VM state (memory + disk) as a restorable artifact.
fork
Copy-on-write clone from a snapshot — cheap children from one parent state.
pause
Snapshot memory + state and freeze CPU; billing drops to the paused rate.
resume
Un-freeze a paused VM back to running.
stop
Graceful shutdown.
kill
Hard teardown; release every host resource immediately. Terminal.
Legal states: creating, running, paused, stopping, stopped, killed, plus transient snapshotting and forking. killed is terminal. Cold starts use snapshot-restore from a warm pool, so create and resume are sub-second.
Guest code is treated as hostile. Each VM boots under jailer (chroot + dropped privileges) in its own network namespace, with a per-VM tap device and double-NAT'd outbound internet. From inside a sandbox there is no route to the host, no route to the control plane, and no route to another sandbox; /dev/kvm and host files are unreachable. Isolation is enforced by construction, not by trusting the guest.
Billing — resource-seconds
spawnd bills allocated resource-seconds, not flat wall-clock, so cost scales with size. Both dimensions derive from the create-time allocation × time:
vCPU-secondsvcpu × seconds
GiB-seconds(memMib / 1024) × seconds
Allocation is fixed at create, so billing is deterministic and unforgeable — the guest cannot change its own vcpu/memMib.
State
Billed
Rate class
running
vCPU-s + GiB-s, live
active
snapshotting, forking
live (still running)
active
paused
vCPU-s + GiB-s, paused rate
paused
creating
not billed until guest ping ok
—
stopped, killed
not billed
—
API · Auth
The passwordless sign-in flow. No auth required to start it; the token is the credential.
POST/auth/magic-linknone
Find-or-create the org + user, mint a single-use token, and send the sign-in link. devLink is present only in dev mode.
Every API error is { code, message, retryable }. Only capacity is generally worth retrying.
Code
Meaning
HTTP
unauthorized
Missing, invalid, or wrong-surface credential
401
not_found
No such sandbox or resource for this org
404
invalid_state
The verb is illegal for the sandbox's current state
409
quota_exceeded
Org quota reached
429
capacity
No host slot right now (retryable)
503
guest_timeout
The guest did not respond in time
504
internal
Unexpected server error
500
CLI
The spawn CLI wraps the same REST API. Authenticate once with your org API key, then drive sandboxes from the terminal.
Command
Does
spawn smallbox
Create and enter a smallbox (1 vCPU / 2048 MiB).
spawn bigbox
Create and enter a bigbox (4 vCPU / 8192 MiB).
spawn ls
List your org's sandboxes.
spawn exec <id> -- <cmd>
Run a command inside a sandbox and stream the result.
spawn fork <id>
Copy-on-write clone a sandbox from its latest snapshot.
spawn rm <id>
Kill a sandbox and reap its resources.
# create a bigbox, run a build, then tear it down
spawn bigbox
spawn exec sbx_123 -- cargo build --release
spawn rm sbx_123
MCP server
The orchestrator exposes sandbox control as an MCP server, so any MCP client — an IDE, an agent framework, an LLM app — can drive sandboxes as tools. Register it with your org API key as the bearer credential.
Expose a guest port to the public internet with POST /v1/sandboxes/:id/ports. The response url is http://<sandbox-id>--<workspace>.spawnd.oonamy.xyz — a single DNS label (double-dash separator) so one *.spawnd.oonamy.xyz wildcard covers every preview — routed by the HTTP Host header. Previews are org-scoped by construction and never outlive their VM — stopping or killing the sandbox deregisters the mapping.
# start a dev server in the sandbox, expose it, share the URL
spawn exec sbx_123 -- python3 -m http.server 8000 &
curl -s -X POST https://spawnd.oonamy.xyz/v1/sandboxes/sbx_123/ports \
-H 'Authorization: Bearer sk_live_...' \
-H 'Content-Type: application/json' -d '{"port":8000}'
# → { "url": "http://sbx_123--acme.spawnd.oonamy.xyz" }
# routed by Host header, so it is testable locally:
curl -H 'Host: sbx_123--acme.spawnd.oonamy.xyz' http://127.0.0.1:8080/
Everything on this page is also available as one self-contained markdown file for agents to ingest.