Sandboxes
Sandboxes (beta): Linux microVMs your code creates with the Python or TypeScript SDK, the API, or the CLI. Each boots from a template, runs commands and moves files, pauses for the price of its storage, and forks into many live copies.
On this page22
Each sandbox is its own Firecracker microVM, with its own kernel. Sandboxes live in your workspace next to your boxes, draw on the same balance, and answer to the same API keys.
Sandboxes and boxes
| Box | Sandbox | |
|---|---|---|
| For | You, working on it every day | Your code and agents, one job at a time |
| Made by | The dashboard or prized box new | The SDKs, the API, the CLI, or the dashboard |
| Lives | Until you delete it | Until you delete it or its run time ends: 24 hours of running by default, up to 7 days, and you can extend it anytime. Paused, it is kept (Paused retention) |
| You reach it with | prized ssh, sync, ports, the browser terminal | Commands and file copies through the API, prized sandbox exec and cp, or SSH: prized sandbox ssh, or any SSH client with SSH access |
| User | Your login user, with sudo | prized, without sudo |
| Billed | By size, hourly from a monthly price (Billing) | Per second, by vCPU, memory, and disk (Billing: Sandboxes) |
- Use a box for the machine you work on: your repo, editor, synced folders, dev servers, and agents that run for days.
- Use a sandbox to run code you did not write or have not read (an agent's tool call, a user's snippet), one clean machine per request or test run, the same job fanned out across many copies, or anything that should be gone afterwards. Three guides walk through it: Run code from an AI agent in an isolated VM, Run an orchestrator agent with a sandbox per task, and Fork a running VM to run work in parallel.
Quickstart
To run your first sandbox:
- Open Sandboxes. New to Prized? It signs you up with the $30 free credit, no card, and opens the dashboard on Sandboxes, with no box tour.
- Click Create API key there and export the key, as below. It reaches sandboxes only and expires after 90 days; the button shows until the workspace has a sandbox. A key from https://prized.dev/dashboard/workspace/api-keys with Full access, or Custom with Sandboxes: Write, works too; new to Prized, that link signs you up the same way. An agent can make your account and its own key with your email address (Agent quickstart).
- Run one tab below. Each creates a sandbox from
prized-base-v1, runs one command, and deletes it. For Python,pip install prizedfirst (Python 3.10 or later, in a venv) and run the tab's file withpython3 hello.py; for TypeScript,npm i @prized/sdkandnode hello.mts(Node 22.18 or later; on Node 18 to 22.17,npx tsx hello.mts) (Sandbox SDK for Python and TypeScript). The curl tab needsjq. It stops at a refused create and prints why, asks for a 60-minute run time so a sandbox left behind deletes itself, and waits up to 3 minutes forrunning, stopping on anything else; a sandbox takes commands as soon as it isrunning. The CLI tab needsprizedv0.21.0 or later: runcurl -fsSL https:/, then the reload line it prints, in the terminal where you exported the key (Windows)./ prized.dev/ install.sh | sh
export PRIZED_API_KEY=dcp_…For the CLI tab, run the reload line if the installer prints one, and skip its sign-in and setup steps: those set up a box, and the exported key is all prized sandbox needs, except prized sandbox ssh, which opens with your prized login (SSH access works with the key).
On the free credit, sandboxes run within the free tier; once the workspace has paid in, the full quotas apply (Who can use sandboxes).
Prefer your coding agent? Use Prized from your coding agent gives it the Prized skill; before your first sandbox, the Sandboxes page shows those steps with your key filled in.
from prized import Sandbox
with Sandbox.create() as sb: # returns once it answers commands
print(sb.exec("python3 --version").stdout, end="")
# Python 3.12.3, then leaving the block deletes the sandboxA burst of creates can wait in starting a minute or two while capacity is added. Every field of a create is on Sandbox API: Create.
States
| State | Meaning |
|---|---|
starting | Booting from its template, or coming back from a pause. |
running | Up: commands and files work from the moment it shows running, and it bills at the running rate. |
pausing | Saving its memory and disk. While its VM still runs, it bills as running; it stops at paused. |
paused | Memory and disk saved, no compute billed. A command or file request resumes it (Pause and resume). |
resizing | Changing shape while paused; it returns to paused, or goes to error if the resize fails partway. |
deleting | Being torn down. A command still running on it, and any request sent to it, answers 410 sandbox_deleted (The edge). |
deleted | Gone: reads answer 404 not_found. |
error | Never came up, lost the machine it ran on, or stopped answering; errorReason gives a short explanation, with recovery guidance when known, and it is removed after autoDeleteMin, or after an hour. One that never came up or lost its machine costs nothing: delete it and create another. One whose errorReason starts with runtime_degraded may still be running and billing (delete it to stop that at once; a pause stops it once the sandbox reaches paused, or at once if its VM has failed). When the reason says it stopped reporting, most often because its commands filled its memory, it is not removed: it goes back to running, with no errorReason, once it reports again. If it has not after an hour, it is paused with its memory and disk kept, or deleted if it cannot be paused; once paused, its autoDeleteMin applies as for any paused sandbox. |
Pause and resume
A paused sandbox keeps its memory as well as its disk: on resume, every process carries on where it stopped. A single resume is usually back to running in under a second. Pause and resume answer 202 at once; read the sandbox until it reaches paused or running, or send them with ?wait= and the answer comes once it has, if that is within about 8 seconds (the hold, plus up to half a second for its last look); past that it answers 202 as before, still pausing or starting, and you read it until it settles (Sandbox API: Waiting). The CLI's create and resume wait that way for you; prized sandbox pause answers at once unless you add --wait.
From the CLI, with a running sandbox's id in $ID (ID=$(prized sandbox create) makes one):
prized sandbox pause $ID --wait
prized sandbox resume $ID- Paused costs storage only. No compute: its disk and saved memory count toward the workspace's paused storage, of which the first 20 GB are included, then $0.05 per GB-month (Billing: Sandboxes).
- Paused is kept. A paused sandbox keeps its memory and disk until you delete it, unless its machine fails or a move to a different kind of machine leaves only its disk (below); on the free tier, until 30 days after its last use (Paused retention).
- Paused frees a Sandboxes slot, not its other quotas. Once a sandbox is
pausedit stops counting toward the Sandboxes quota, and a resume needs a free slot again. It still counts toward disk, and while it keeps CPU and memory reserved for its resume, they count against the workspace's running CPU and memory (Limits: Sandboxes). - Paused state lives on one machine. A paused sandbox's memory and disk stay on the machine it ran on; when that machine is replaced with one of the same kind, they are moved to it unchanged, and a resume meanwhile still works. A move to a different kind of machine carries the disk but not the memory: the sandbox then shows
memoryDiscardedAt, and its next resume starts it fresh, as after a reboot, with its files but not its processes. Connections to its previous machine are released when it moves; reconnect SSH if needed. If the machine fails, or shortly after a pause the sandbox's process there stops unexpectedly, the sandbox goes toerrorand what it held is lost, so keep anything you need outside the sandbox. - A command wakes it. A command, upload, or download sent to a paused or pausing sandbox resumes it, waits for it, and then runs; one sent while a sandbox is still starting or resuming waits the same way. The wait is up to 10 seconds, shared by the requests with the same key that arrive during it (The edge); past that the request answers
503 sandbox_not_readywith nothing run, and a retry picks it up. A sandbox that isresizingis not woken: its requests answer409 sandbox_not_runninguntil the resize ends. It is an ordinary resume: billed at the running rate once it runs, counted as activity, and refused exactly asPOST /resumewould be, with the same error (409 insufficient_balance,429 sandbox_quota_exceeded, and the rest). - Connections idle for about 6 minutes stop working, and a pause counts as idle. A TCP connection the sandbox opened to the internet that carries nothing for about 6 minutes can no longer hear from the other end: the next thing the sandbox sends on it fails at once with a connection reset (
ECONNRESET), and most HTTP clients and agent CLIs then open a new one on their own. A program that only reads is not told, so ping a long-lived stream, or set a TCP keepalive, more often than every 5 minutes. - A command running when it pauses is paused with it, and its answer comes once the sandbox resumes. To end a command, delete the sandbox: the command's request answers
410 sandbox_deletedwithin about 2 seconds. - To never wake one, send the header
Prized-Auto-Resume: falseon the request: a paused or pausing sandbox then answers409 sandbox_not_runningand stays paused. The header only stops the wake: on a running sandbox the request runs and counts as activity like any other, so it holds off automatic pause. To watch a sandbox without keeping it running, readGET /api/v1/sandboxes/{id}instead, which is not activity.
Clocks inside the sandbox
When a sandbox resumes, its wall clock is set to the current time, but its monotonic clock has counted only part of the pause: about the first 15 minutes, in our tests. So after a long pause (more than about 15 minutes):
- Renew what can expire. Refresh tokens, take leases and locks again, reopen connections, drop cached entries, and check in with anything that watches the sandbox's heartbeats, before you rely on them. Run your own script for that as the first command after the resume, or from inside the sandbox once it sees the resume (Spot a resume from inside).
- Read wall time again. Commands sent after the resume read the current time. A process that was already running often reads the old time (from shortly after it paused) for a moment as it resumes, so have it read the time again once it sees the resume.
- Measure a pause with wall time, never with monotonic time (
time.monotonic(),performance.now(), Go'stime.Since,/proc/uptime), which misses most of it.
prized sandbox resume $ID
prized sandbox exec $ID -- ./renew.sh| Inside the sandbox | After a long pause |
|---|---|
| Timeouts, sleeps, and timers | Most count monotonic time (sleep, setTimeout, Python's time.sleep, Go's time.After), so one set before the pause fires late: in our tests, 20-minute timers set just before a 32-minute pause fired 5 minutes after the resume. A job set for a clock time, like a cron entry, goes by wall time instead |
| Caches, tokens, leases, and locks | One that expires by monotonic time still looks valid, though it may have expired during the pause, and the other side may have given a lease or lock to someone else |
| Heartbeats | None went out during the pause, so whatever watches them saw the sandbox go silent |
What we measured, not a promise: monotonic time (CLOCK_BOOTTIME too) moved by the whole pause for pauses of 2 minutes or less, and by 900 to 907 seconds for every pause from 16 minutes to 5 days (13 pauses). Commands we sent after a resume read the right time; in 5 of those 13 pauses, a process that was already running read the old time first, for 0.14 seconds where we could time it.
Spot a resume from inside
A long pause ends with wall time jumping ahead of monotonic time. This loop sees the jump within about a second, once the wall clock is already right:
import time
def on_resume(missed_s):
# renew tokens and leases, reopen connections
print(f"resumed: monotonic time missed {missed_s:.0f} s of the pause", flush=True)
offset = time.time() - time.monotonic()
while True:
time.sleep(1)
now = time.time() - time.monotonic()
if now - offset > 2:
on_resume(now - offset)
offset = nowA shorter pause makes no jump, since both clocks ran through it, but anything that watches your heartbeats still saw the sandbox go quiet for the whole pause. A fork sets its copies' clocks as Do copies share randomness or identity? describes.
Automatic pause and delete
Three create fields bound a sandbox's life, so a forgotten one stops costing money:
| Field | Default | Effect |
|---|---|---|
autoPauseMin | Off | Pause after this many minutes with no activity. |
autoDeleteMin | Off | Delete after this many minutes paused. |
maxRuntimeMin | 1,440 (24 hours); 60 on the free tier | Its run time: delete it after this many minutes of running. Up to 10,080 (7 days); 60 on the free tier. |
Exec and file requests count as activity, and so do requests to its port URLs with your API key or a token; a command keeps its sandbox awake for as long as it runs (a background command does not). An open prized sandbox ssh session counts too, for as long as it is connected, and so does a connection with SSH access while it has a shell, a command or a forwarded port open.
Labels
Label the sandboxes of one run when you create them, then list or delete the whole run with one command:
prized sandbox create --label run=pr-1874
prized sandbox ls --label run=pr-1874
prized sandbox rm --label run=pr-1874Repeat --label to match sandboxes carrying all of them; forks keep their parent's labels unless the fork names its own. The API takes the same selector: GET or DELETE / (Sandbox API: Labels). A sandbox being deleted still counts toward your quota until ls no longer lists it.
Paused retention
How long a paused sandbox is kept, memory and disk together:
| Workspace | A paused sandbox is kept |
|---|---|
| Paid in (a plan or a top-up) | Until you delete it, or its autoDeleteMin does. Never deleted or cut down to its disk alone for its age. |
| Free tier | 30 days after its last use, then deleted (or 3 days after the heads-up below, if that is later). |
- Last use is the create, a resume, a command or file request, a request to one of its port URLs with your API key or a token, or
POST /. Any of them starts the 30 days again; refresh does it without resuming the sandbox or spending its run time. None of them postpones the sandbox's ownapi/ v1/ sandboxes/ {id}/ refresh autoDeleteMin, which counts from the pause. - A heads-up comes first, when it can. Three days before paused retention deletes a free-tier sandbox, the workspace's owners get an email naming it and the date. If no email can be delivered, the delete still happens on schedule. The sandbox's own
autoDeleteMincan delete it sooner, without that email. - Paying in keeps them. Once the workspace has paid in, its paused sandboxes are kept like any paid workspace's.
- Kept means on one machine. Paused state still lives on one machine at a time, and is lost if that machine fails (Pause and resume).
- No backups. Paused state is not backed up. Moving a paused sandbox to a new machine leaves an encrypted copy in our storage for about 30 days, which you cannot restore (Data retention).
Run time
A sandbox is deleted at its expiresAt, the end of its run time, which counts from the create or resume, startup included. On a workspace that has paid in:
- 24 hours by default, up to 7 days. Set
maxRuntimeMinon the create, up to 10,080; a custom plan has no maximum. - The clock stops while paused and restarts on resume. A few seconds after a sandbox reaches
pausedits clock stops: it has noexpiresAtand is not deleted for running out of time; each resume gives it a freshmaxRuntimeMin(up to the maximum) from the resume. One created on the free tier restarts with itsmaxRuntimeMinonce the workspace has paid in, and one created before 2026-10-23 gets itsmaxRuntimeMinat its next resume: the run time it was created with. - Extend anytime.
prized sandbox extend $ID --by 2h, orPOST /, adds time to a running sandbox. It never shortens, and stops at 7 days from now (past that the answer saysapi/ v1/ sandboxes/ {id}/ extend "capped": true); extend again later to keep it going (Sandbox API: Run time). - Or set it exactly.
prized sandbox timeout $ID --in 30m(or--ata time), orPOST /, setsapi/ v1/ sandboxes/ {id}/ timeout expiresAt, earlier or later, up to 7 days from now.
On the free tier a sandbox gets 60 minutes of running in all. Paused time does not count, and a paused one is kept to resume later (30 days after its last use, Paused retention), but a resume carries on the time left instead of starting again, an extend or timeout can only bring the end earlier, and once the 60 minutes are used up a resume answers 429 sandbox_quota_exceeded with reason max_runtime. A sandbox deleted at its 60 minutes is named for the next 7 days, while the workspace is still on the free tier: the Sandboxes page says why it ended beside an Add funds button, prized sandbox ls names it under the list, and get, exec and rm of its id say so instead of "no sandbox". After a top-up from $10, new sandboxes get 24 hours by default, up to 7 days, and a running one can be extended.
One sandbox for an agent that works for days, pausing in between: AI agent sandbox that pauses with memory and runs past 24 hours.
Fork
From the CLI, with a running or paused sandbox's id in $ID, this waits until every copy is running and keeps their ids in COPIES; prized sandbox rm "${COPIES[@]}" deletes them:
COPIES=($(prized sandbox fork $ID --count 3))Over the API, with API and AUTH set as in the quickstart's curl tab and the sandbox's id in SBX:
curl -s -X POST "$API/sandboxes/$SBX/fork" -H @<(echo "$AUTH") -H "Content-Type: application/json" -d '{"count":3}'A fork turns one running or paused sandbox into count live copies: each child has the parent's memory, disk, and every process, as they were at the fork (or at the pause), and starts running. A running parent pauses while it is copied, then keeps running; a paused parent stays paused. A paused parent you resume while a copy forked from it is still starting stays starting until the copy has been taken, usually under a second, so the copy gets the parent as it was. Children are ordinary sandboxes with their own ids, billed and counted like any other.
- The parent must be
runningorpaused. One on its way between them (starting,pausing), orresizing, answers409 parent_not_runningwith itsstate; fork it once it settles. A sandbox resized while paused has no memory to copy until it runs again:409 parent_not_forkablewithreasonresized_while_paused. So does one whose memory a move left behind (memoryDiscardedAt), withreasonmemory_discarded. - The more memory a running parent has used, the longer it pauses. In our tests: about 0.2 seconds idle, 0.7 seconds after using 1 GB, and 2 to 4 seconds after using 2.5 GB, even once it had freed some of it.
- Copies start on the parent's machine. A request takes up to 256, but only as many copies as fit there start; more memory or disk, or a busy machine, fits fewer. New sandboxes start, when they can, on a machine with room to fork them.
- A fork that does not fit makes nothing. It answers
409 fork_capacitywithfits, how many copies fit now: fork that many or fewer (whenfitsis above 0), try again later, or start a new sandbox and fork that (it starts fresh). Keep the parent until the new one isrunning: while it holds its place, the new one cannot take that place on a full machine. The new sandbox and each copy count toward your quota (the free tier allows 10 at once): at the limit, delete sandboxes you no longer need and wait until they are gone (GET /api/v1/sandboxes/{id}answers404, orprized sandbox lsno longer lists them; a sandbox stilldeletingcounts), or raise it: on the free tier by topping up, otherwise by emailing . Copy out what you need before you delete one, and never delete a parent while a copy forked from it is stillstarting: that copy fails. - With no sandbox capacity free, a fork makes nothing, as a create does. It answers
503 sandbox_capacitywith aRetry-Afterheader (seconds), even when the parent's machine has room for the copies; retry after that long. - A fork is all or nothing. Rarely, a copy cannot start after the fork was accepted, for example when the machine filled up in between. Then the fork is undone: every copy is deleted, running ones too, and while each is
deletingitserrorReasonsays why (fork_capacitywhen there was no room). Fork again, or fork fewer. - A sandbox too big to copy cannot fork at all. When its machine cannot hold even one copy beside it, a fork answers
409 parent_not_forkablewithreasonparent_too_big, thefieldthat does not fit (vcpu,memoryMb, ordiskGb), and amessage. That starts past about 81 GB of memory. No retry or smallercounthelps; fork a smaller sandbox. - Fork any time. A sandbox keeps forking for as long as you keep it, running or paused, through our regular platform updates: set one up, pause it, and fork it days or weeks later. If a move to a different kind of machine left only its disk, resume it, then fork it.
- A sandbox whose machine is being replaced cannot fork there. Rarely, a machine is replaced outright, for example to take a security fix. It starts no new sandboxes, and copies start only on their parent's machine, so a fork answers
409 fork_unsupported_hostwithreasonhost_retiringand amessage, and makes nothing. A smallercountdoes not help. A paused sandbox is usually moved to a current machine on its own and forks again once it has moved: pause a running one and retry later, or create a new sandbox, set it up again, and fork that one. - Quota counts every child. A fork that would pass a quota answers
429 sandbox_quota_exceededwithadmitted, how many would have fit, and makes none. - Children inherit the template, shape, environment variables, labels (unless the fork names its own),
autoPauseMin, andautoDeleteMin. - Lifetime. Each child's deletion time is in its
expiresAtin the answer.- Paid workspaces: each child gets a fresh lifetime from the fork: the parent's
maxRuntimeMinby default, ormaxRuntimeMinon the fork request, up to your workspace's maximum (a longer one is cut to it). The parent keeps its own. - Free tier: children keep the parent's deletion time, so forking never extends free time;
maxRuntimeMinon the fork can only shorten it. When the children have under 10 minutes left, the answer carries awarning.
- Paid workspaces: each child gets a fresh lifetime from the fork: the parent's
Resize
A sandbox keeps the vCPU, memory, and disk it was created with: resizing is not available yet. POST / answers 409 resize_rejected with reason resize_unavailable and a message, and leaves the sandbox as it was, paused memory included.
For another shape, create a new sandbox with the resources you need and set it up again; a fork keeps its parent's shape.
Templates
| Template | What is in it |
|---|---|
prized-base-v1 | Ubuntu 24.04, build-essential, git, curl, jq, ripgrep, unzip, Python 3 with pip and venv, Node.js 22 with npm, corepack, and pnpm |
prized-agent-v1 | Everything in prized-base-v1, plus Claude Code and Codex |
prized-docker-v1 | Everything in prized-base-v1, plus Docker Engine with Compose and Buildx. For workspaces that have paid in |
- Shape. Each defaults to 4 vCPU, 8 GB of memory, and a 10 GB disk, and takes 1 to 32 vCPU, 1 to 128 GB of memory, and 10 to 128 GB of disk (2 vCPU and 4 GB at most on the free tier).
GET /lists each template with its defaults and bounds.api/ v1/ sandbox-templates - A template keeps its tools. Its tools are pinned; newer versions arrive as a new template name (
prized-agent-v2), so a sandbox made today has the same tools as one made next month. - A name can get a fixed build. A fix to the image that leaves the tools alone (boot speed, larger shapes) ships as a new build under the same name. New sandboxes start from the new build; a running or paused sandbox keeps the build it started from, and so do its forks.
templateBuildon the sandbox, andbuildinGET /, name the build.api/ v1/ sandbox-templates - No unattended upgrades. A sandbox never upgrades its own system packages; updated packages ship as a new build.
- Agents bring their own sign-in. Nothing is signed in on
prized-agent-v1: pass the key the CLI reads, such asANTHROPIC_API_KEYfor Claude Code, inenvVars. - Docker runs on
prized-docker-v1, once the workspace has paid in.docker,docker compose, anddocker buildwork asprized, without sudo; give images room with--disk 30(Run Docker and Compose in a sandbox). On the free credit alone, a create, fork, or resume from it answers402 template_needs_paymentwith abillingUrl; a plan or a top-up lifts it, and the other two templates run on the free tier. - Docker is root inside the sandbox. Docker's daemon runs as root, so code that can use Docker is root inside that sandbox, which is still its own microVM.
Large sandboxes
A sandbox on any template goes up to 32 vCPU, 128 GB of memory, and 128 GB of disk, on the same machines as every other shape.
- The rate does not change. It is billed per second at the same rates as any shape: the vCPU and memory of 32 vCPU with 128 GB cost 32 times those of a 1 vCPU, 4 GB sandbox, and disk is billed on top by its size.
- It counts against the same quotas. The defaults hold three 32 vCPU, 128 GB sandboxes; four need a higher running-memory quota (email ).
- Forks of a big parent fit few copies, and one past about 81 GB of memory cannot fork (Fork).
Inside a sandbox
| User | prized, without sudo |
| Home | /home/prized |
| Working directory | /home/prized/work, where commands run unless they name another cwd |
| Shell | Commands run under bash -c. prized sandbox ssh ID opens an interactive one, as prized, with your prized login, and any SSH client opens one with SSH access; either starts in /home/prized without the sandbox's envVars. A sandbox created before shells became available cannot open one (409 sandbox_ssh_unavailable); create a new sandbox (CLI: Sandboxes) |
| Files reachable by the API | Anything under /home/prized; symlinks are followed only inside that directory |
| Network | Outbound internet. Nothing reaches a sandbox from the internet but a request to one of its port URLs (with your API key or a token, or on a port you made public) or an SSH connection (prized sandbox ssh or SSH access); sandboxes have no direct network path to each other |
| Installing more | No root, so no apt install, though apt can unpack packages into your home (System packages without root). pip install numpy installs into your home (~/.local), or use a venv: python3 -m venv ~/.venv && ~/.venv/bin/pip install numpy. npm install -g installs into ~/.local too. On prized-docker-v1, apt-get install works inside a container |
Environment variables
envVars on the create are set for every command the sandbox runs, and for every command in its forks; a command's own env overrides them name by name. Up to 32, each name a shell identifier (letters, digits, and _, not starting with a digit) of up to 64 characters, each value up to 16 KiB.
They are stored encrypted, never returned by any route, and erased with the sandbox, so envVars is the place for a key the sandbox's code needs.
Preview a port
Every port of a sandbox but 22 and 81 has an https URL of its own, https://<port>-<sandbox id>.p.prized.dev/ (the _ in the id as -): prized sandbox port ID PORT prints it, and so does the sandbox's previewUrlTemplate with the port filled in. The same port also answers at https://<port>-<sandbox id>.prized.link/, the address to open in a browser. Nothing needs creating first, and the URLs do not change for the sandbox's life. They are private: a request needs your API key or a token, unless you made the port public.
prized sandbox exec $ID --detach -- python3 -m http.server 3000 --bind 127.0.0.1
URL=$(prized sandbox port $ID 3000)
curl -H @<(echo "Prized-Key: $PRIZED_API_KEY") "$URL"| Way in | For | How |
|---|---|---|
| API key | Your own servers and programs | An API key with Sandboxes: Write in the Prized-Key header (or as Authorization: Bearer). Wakes a paused sandbox |
| Token | A person in a browser, and a client that cannot send a header: a WebSocket or EventSource in a web page, a program you hand one port | POST / answers with the port's prized.link URL with a token in it (browserUrl), good for an hour by default (expiresIn, 60 to 86,400 seconds). prized sandbox port ID PORT --token does the same |
| Public | Anyone with the link, webhooks, and anything else that carries no credential | PUT / with {"public": true} makes it public at the port's prized.link URL (preview.browserUrl): anyone with it reaches the port, for 7 days by default (expiresIn, 300 to 2,592,000 seconds); {"public": false} ends it. prized sandbox port ID PORT --public and --private do the same |
- What passes. HTTP, streamed responses such as server-sent events, and WebSockets. An app listening on
127.0.0.1or0.0.0.0answers; it sees itself reached aslocalhost:<port>, with the URL's host inX-Forwarded-Host. - Credentials stop at the URL.
Prized-Key, an API key sent asAuthorization: Bearer, and the token in the URL never reach your app; your app's ownAuthorizationheader does. - Redirects stay on the URL.
fetch, axios, Python's requests andcurl -Lresend headers likePrized-Keyto whatever host a redirect names. So aLocationonlocalhost:<port>comes back as that path on the URL, and one anywhere else comes back asPrized-Location, which no client follows. Follow redirects yourself (redirect: 'manual'infetch), and send the key only to the URL's own origin. In a browser onprized.link, where no key is sent, your app's redirects to other sites (a sign-in provider, say) pass as your app wrote them. - Only the key wakes a paused sandbox. A request with the key resumes it and waits up to 10 seconds, as a command does; with
Prized-Auto-Resume: falseit answers503instead. With a token, or on a public port, a paused sandbox answers503 sandbox_not_runninguntil something resumes it. - Activity. Requests with the key or a token count as activity for
autoPauseMinand as use for Paused retention. Requests on a public port do not, so a crawler cannot keep the sandbox running. - Browsers use
prized.link. With a token or on a public port, theprized.linkURL opens in a browser tab or an iframe. The browser trades the token in the URL for a cookie for that one host, so the page's own scripts, images, fetches and WebSockets work without it; a request another site's page makes to the URL (another sandbox's included) carries the token in the URL itself, and a browser that blocks cookies for embedded sites needs a public port to show the page in an iframe. In an iframe the cookie belongs to the site that embeds it: other pages that site embeds can make the frame load the URL, but cannot send it a form or read its answers. A tab's first visit to each port's URL shows a notice that the page is hosted by a Prized user, with a Continue button; an iframe skips it. Onp.prized.dev, a token or a public port answers programs,fetchfrom a page on another site, and WebSockets, and a page opened in a browser tab, a frame or an embed answers403 ingress_browser_pagewith theprized.linkURL to open instead. - Cookies stay on their host. A cookie your app sets is kept to its own URL's host (a
Domainattribute is removed), so it never reaches another sandbox's port. - Who. The key works on every workspace, the free tier included. Tokens and public ports need a workspace that has paid in (
402 share_links_need_paymenton the free credit alone). A token is made with an API key, by an owner or member (only the owner under theanyoneLinksOwnerOnlypolicy); only the owner makes a port public, and anyone with Sandboxes: Write makes it private again. A workspace has at most 10 public ports at once. - When it ends. A token ends at its expiry, when the key that made it is revoked or expires, or when the port is made public or private again, and a connection opened with it ends with it. Deleting the sandbox ends its URLs, tokens and public ports. A URL reaches only that port of that sandbox.
A token for someone to open in a browser, made with the key:
curl -s -X POST "https://api.prized.dev/api/v1/sandboxes/$ID/ports/3000/token" -H @<(echo "Authorization: Bearer $PRIZED_API_KEY") -H "Content-Type: application/json" -d '{"expiresIn":1800}' | jq -er '.browserUrl // error(tojson)'
# https://3000-sbx-3f9c0a1b2d4e5f60.prized.link/?prized_token=…A token for a WebSocket in a web page, made by your server with the key, then used in the page:
TOKEN_URL=$(curl -s -X POST "https://api.prized.dev/api/v1/sandboxes/$ID/ports/8080/token" -H @<(echo "Authorization: Bearer $PRIZED_API_KEY") -H "Content-Type: application/json" -d '{"expiresIn":1800}' | jq -er '.browserUrl // error(tojson)')const url = new URL(tokenUrl); // the TOKEN_URL your server handed the page
url.protocol = 'wss:';
url.pathname = '/ws';
const socket = new WebSocket(url);The SDKs do the same: preview_url, preview_headers, preview_token and set_port_public in Python, previewUrl, previewHeaders, previewToken and setPortPublic in TypeScript (Sandbox SDK for Python and TypeScript).
The routes and the errors a URL answers are on Sandbox API: Ports at a URL.
SSH access
A program with an API key can open SSH to a sandbox with any SSH client (OpenSSH, ssh2, Paramiko), shells and commands as prized, and forward the sandbox's ports to itself with ssh -L. Ask for access to one sandbox, then connect with the answer:
curl -s -X POST "https://api.prized.dev/api/v1/sandboxes/$SBX/ssh-access" -H "Authorization: Bearer $PRIZED_API_KEY" -H "Content-Type: application/json" -d '{"expiresInMinutes": 60}'
# {"sandboxId":"sbx_3f9c0a1b2d4e5f60","host":"ssh.prized.dev","port":22,"user":"sbx_3f9c0a1b2d4e5f60","password":"…","expiresAt":"2026-11-02T23:00:00.000Z","command":"ssh sbx_3f9c0a1b2d4e5f60@ssh.prized.dev"}Log in as user with password at host and port. To reach a server listening on port 1455 inside the sandbox (an OAuth callback, say) at localhost:1455 on your machine:
ssh -L 1455:localhost:1455 sbx_3f9c0a1b2d4e5f60@ssh.prized.dev| Who | A key with Full access, or Custom with Sandboxes: Write; a prized login; the dashboard. Not a key limited to some boxes, and not a contractor (Who can use sandboxes) |
| Lifetime | expiresInMinutes, 1 to 1,440 (24 hours), 60 if left out. The password works for any number of connections until expiresAt, and every connection made with it ends then too |
| What it opens | The one sandbox, as prized (the user name you log in with is the sandbox's id): shells, commands, scp and sftp, and local forwards (ssh -L) to the sandbox's own ports at localhost, 127.0.0.1 or ::1 (localhost tries 127.0.0.1 first). No remote forwards (ssh -R), agent or X11 forwarding, and no other address |
| A paused sandbox | Not resumed: the connection opens, and its first shell or forward is refused with sandbox … is not running. Resume it first |
| Activity | While a shell, a command or a forward is open, the sandbox counts as in use and does not auto-pause; its run time still applies |
| Ending it early | DELETE / ends every password of the sandbox: it opens nothing new, and a connection made with it closes shortly after. Revoking or rotating the key that asked for it, or removing its member, does the same for theirs |
| Audit log | Asking is a box.session row, and each connection a box.connect row, both as the key (or person) that asked (Teams: What is recorded) |
| Host key | ssh.prized.dev presents SHA256:obSQ9e1wBADEVz58mOOOeXL79ymZcC0tBGLph1CS0I8 (ED25519) |
A sandbox holds up to 100 unexpired passwords at once (429 too_many_ssh_access); a sandbox created before shells became available answers 409 sandbox_ssh_unavailable. Every field is on Sandbox API: SSH access.
Who can use sandboxes
- Owners and members of a workspace, and API keys they made. Contractors do not see sandboxes; their requests answer
404 not_found. - Any balance above zero. A workspace on the free credit alone uses sandboxes within the free tier; one that has paid in (a plan or a top-up) gets the full quotas. An empty balance cannot start one (
409 insufficient_balance). - API keys. A key with Full access reaches sandboxes. A Custom key needs Sandboxes: Read to list them and Sandboxes: Write for everything else, running commands and moving files included. The key an agent got at agent sign-in has Sandboxes: Write, and each sandbox it creates is a row on the audit log. A key limited to some boxes reaches no sandboxes (What a key can do).
- Shells.
prized sandbox sshopens with an owner's or member'sprized login, neverPRIZED_API_KEY: with only a key it stops withprized: not signed in(the API answers a key403 ssh_requires_login, and a Custom or box-limited key403 key_access_denied). A program with a key uses SSH access instead, which takes a Full access key or Sandboxes: Write. Each shell's SSH certificate is a row on the audit log.
Free tier
A workspace whose balance is only free credit (it has not paid in with a plan or a top-up) runs sandboxes within these limits:
| Free tier | Limit |
|---|---|
| Sandboxes at once | 10, counted like the sandbox quota: ones in error count, paused ones count toward the disk below instead |
| Running vCPU and memory, across the workspace | 20 vCPU and 40 GB |
| Per sandbox | Up to 2 vCPU and 4 GB of memory. With no shape asked for, the template's default capped at 2 vCPU and 4 GB |
| Run time | 60 minutes of running in all: maxRuntimeMin defaults to 60, and a larger value on a create is refused. Each sandbox you create gets its own 60 minutes, and at the end it is deleted, memory and disk with it: pause it before then to keep it (kept 30 days after its last use). Paused time does not count, and a resume carries on the time left instead of starting again; a fork's copies keep the parent's deletion time. Paying in (a plan, or a top-up from $10) lifts it: new sandboxes get 24 hours by default, and a running one can be extended (Run time) |
| Paused | Kept 30 days after its last use, then deleted (Paused retention) |
| Disk | 100 GB across the workspace's sandboxes |
- It spends the free credit. Sandboxes draw on it at the sandbox rates, like any compute; an empty balance answers
409 insufficient_balance. - Past a limit the API answers as for any quota (
429 sandbox_quota_exceededwith itsreason, or422 invalid_resources), with"tier": "free"in the body and the limit it hit aslimit: sandboxes forsandbox_limit, vCPU forrunning_vcpuandvcpu, MB forrunning_memoryandmemoryMb, GB forretained_disk, minutes formax_runtime. For example,{"error": "sandbox_quota_exceeded", "reason": "running_memory", "tier": "free", "limit": 40960}. A top-up or a plan lifts the workspace to the full quotas, and the answer says so: itsmessagenames the limit and links the Billing page ("The free tier runs sandboxes of up to 2 vCPU each. Ask for a smaller shape, or lift it with a top-up (from $10) or a plan: https://prized.dev/dashboard/billing?lift=sandboxes#credit"), andbillingcarries the same for a program (Billing hints). - Sandboxes made while paying resume on the free tier only if they fit it: one bigger than 2 vCPU or 4 GB answers
422 invalid_resources, and one with more than an hour of run time left answers429 sandbox_quota_exceededwithreasonmax_runtimeuntil the workspace pays in. Its run time is never shortened, and its clock does not restart. - A fork's copies keep the parent's deletion time instead of starting their own (Fork).
- Templates.
prized-base-v1andprized-agent-v1;prized-docker-v1needs a workspace that has paid in (Templates). - The free credit's rules hold. One process at full CPU for 30 minutes pauses the workspace's boxes and sandboxes (Free credit).
- Switched off. If free-tier access is switched off for your workspace, a create, resume, or fork on the free credit alone answers
409 paid_balance_requireduntil the workspace has paid in.
Dashboard
Sandboxes in the dashboard's sidebar lists every sandbox in the workspace with its template, shape, state, and what it costs an hour, against the workspace's quotas. Create, pause, resume, and delete from there; before the first sandbox, it offers a key in one click and the first sandbox by your coding agent with the Prized skill (Use Prized from your coding agent), the Python SDK, the TypeScript SDK, curl, or the CLI, with the key filled in (Quickstart). New sandbox makes one with no key, from a phone too. A key made there stays at the top of the list after your first sandbox appears, until Done or you leave the page. With the CLI, skip the installer's sign-in and setup steps (they are for boxes): the key is all prized sandbox needs. A sandbox's own page starts with how to run a command in it while it runs, from the CLI and over the API, with its id and address filled in; then its countdowns to auto-pause and deletion, live CPU and memory, its processes, and its events. The Templates tab lists the catalog, and API docs opens the Sandbox API reference.
Not yet
| Not yet | Instead |
|---|---|
| Templates from your own Dockerfile or image, or saving a sandbox as a template | Install what you need at the start of each run, or once in a sandbox you then fork (Use a sandbox as your own template); once the workspace has paid in, build and run your image with Docker on prized-docker-v1 (Run Docker and Compose in a sandbox) |
| Resizing a sandbox's vCPU, memory, or disk | Create a new sandbox with the shape you need |
| Forking a box into sandboxes | Fork a sandbox |
| Egress allow and deny lists | Every sandbox has outbound internet |
| More than 32 vCPU or 128 GB of memory | |
| More than 128 GB of disk | A bigger box |
| GPUs | |
Regions other than us-west-2 (Oregon) | |
| A terminal in the dashboard | prized sandbox ssh or SSH access for a shell, and ssh -L for any TCP port (a database client, say); commands and file copies through the API, or prized sandbox exec and cp |
| Streaming output from the API | The SDKs stream it (on_stdout, onStdout); or start a background process and read its output by offset |