quiet robot

Sandboxes

API reference

Every endpoint of the Sandboxes REST API, its parameters and what it returns, made from the API's own OpenAPI description.

View as Markdown

Sandboxes is in early access. It is free to try, some parts are still in testing, and details may change. Sign up free

Note

This page is made from the OpenAPI description the API serves, so it lists exactly what the API takes. For how the pieces fit together, start with the REST API guide. You can load the same file into Postman, Insomnia or a client generator.

Base address: https://api.quietrobot.ai/api/v1. Every request carries Authorization: Bearer qr_live_.... Read-only keys can make GET requests only. Errors are JSON { "error": { "code", "message" } }; the codes are on Errors.

Endpoints

Sandboxes

Commands

Files

Snapshots

Templates

Volumes

Webhooks

Secrets

Organization

Sandboxes

List sandboxes

HTTP
GET /api/v1/sandboxes
ParameterInTypeNotes
statusquery"starting", "running", "pausing", "paused", "archived", "stopped", "error"

Returns 200 with an object.

Create a sandbox

HTTP
POST /api/v1/sandboxes

Body (JSON):

FieldTypeNotes
namestring
templatestringbase (default), minimal, or one of your own templates by name or id
cpuClass"standard", "performance"Default "standard".
cpus1, 2, 4, 8, 16
memoryMbintegerMultiple of 256
timeoutSecintegerSession length; the plan sets the maximum
regionstringRegion code, e.g. us-virginia or eu-frankfurt
reservationIdstring
snapshotIdstringStart with this snapshot's files
poolbooleanfalse always boots a fresh microVM
durablebooleanKeep this sandbox's files (its home folder) through pauses, the time limit and a lost host. Every pause saves them to object storage first; the time limit pauses instead of deleting; after the plan's warm window the machine is deleted and the sandbox is archived until its next call, which restores the files onto a new microVM. Ends only when deleted. Stored files are billed per GB-month.
ifExists"error", "return"Durable only: when a durable sandbox already has this name, error (409 name_taken) or return that sandbox Default "error".
egressEgress
envobject
metadataobject
secretsstring[]Names of the organization's secrets this sandbox may use. Each arrives as an environment variable holding a stand-in, never the value. Send calls through $QR_GATEWAY_URL// with the stand-in where the key goes; the gateway swaps in the value outside the microVM. Needs egress mode allowlist or open.
identityobjectHosts (your own services) this sandbox may prove itself to. It gets QR_IDENTITY_TOKEN, a stand-in the gateway swaps for a five-minute EdDSA token; check it with /identity/jwks.json
autoPauseSecintegerPause after this many seconds with no commands, file calls or gateway calls, unless programs inside are still working (using CPU or holding a connection open). Any call wakes it again
runExecRequestA first command to run as soon as the sandbox is up, in the same request. The result comes back as run.
volumesobject[]Folders kept between sandboxes. Each is put in place before the sandbox is returned, and saved when it pauses or stops, shortly before its deadline, and on POST /sandboxes/{id}/volumes/sync. One live sandbox holds a volume at a time (409 volume_in_use).
spendCapUsdnumber

Returns 200 with Sandbox.

Returns 201 with CreatedSandbox: Created

Get a sandbox

HTTP
GET /api/v1/sandboxes/{id}
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with Sandbox.

Destroy a sandbox

HTTP
DELETE /api/v1/sandboxes/{id}
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with Sandbox.

Pause a sandbox

HTTP
POST /api/v1/sandboxes/{id}/pause

Freezes memory, files and processes. Paused time doesn't count toward usage. A durable sandbox saves its files to object storage first. 409 paused_storage_full when the plan's paused storage is used up.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with Sandbox.

Resume a paused or archived sandbox

HTTP
POST /api/v1/sandboxes/{id}/resume

Any command or file call also wakes it. An archived durable sandbox wakes cold: a new microVM with its files restored (resumedFrom cold, memoryKept false).

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with Sandbox.

Set the deadline to now + timeoutSec

HTTP
POST /api/v1/sandboxes/{id}/timeout
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Body (JSON):

FieldTypeNotes
timeoutSec (required)integer

Returns 200 with Sandbox.

Change a sandbox's network rules

HTTP
PUT /api/v1/sandboxes/{id}/egress

Fields left out keep their value. Applies to new connections at once, and wakes a paused sandbox. 409 egress_too_wide when the rules need more than the sandbox's maxMode.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Body (JSON):

FieldTypeNotes
mode"deny", "allowlist", "open"deny: no outbound traffic. allowlist: only what allow lists. open: any public address.
allowstring[]Rules: a domain (pypi.org, .github.com), an IP address or a CIDR range (203.0.113.0/24, [2001:db8::/32]), with an optional port (db.example.com:5432, 203.0.113.0/24:8000-8100, example.com:). No port means 80 and 443. Private ranges can't be allowed.
denystring[]Rules that are always blocked, in allowlist and open mode. Same format; no port means every port. Denied domains take no port.
maxMode"deny", "allowlist", "open"The widest mode this sandbox can be switched to later. Set at create; defaults to what its rules need. An allow rule on a port other than 80 or 443 needs open.

Returns 200 with Sandbox.

What learn mode has seen, as allow rules

HTTP
GET /api/v1/sandboxes/{id}/egress/learn
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with an object.

Start learn mode: record the hosts the sandbox reaches

HTTP
POST /api/v1/sandboxes/{id}/egress/learn

With open internet allowed by the plan and maxMode, the sandbox runs open while learning and every website it visits is recorded (ports 80 and 443). Otherwise its rules stay as they are and what it tries to reach, allowed or blocked, is recorded.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with Sandbox.

Stop learn mode and put the old rules back

HTTP
DELETE /api/v1/sandboxes/{id}/egress/learn
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with Sandbox.

Stop learn mode and allow only these hosts

HTTP
POST /api/v1/sandboxes/{id}/egress/learn/apply
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Body (JSON):

FieldTypeNotes
allow (required)string[]

Returns 200 with Sandbox.

Set the sandbox's spend cap

HTTP
PUT /api/v1/sandboxes/{id}/spend-cap

capUsd in dollars, or null for none. An API key may only lower the cap; raising or removing it needs a person in the dashboard. Raising it lets a sandbox the cap paused run again.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Body (JSON):

FieldTypeNotes
capUsd (required)number

Returns 200 with Sandbox.

What did the agent do: a report on one sandbox

HTTP
GET /api/v1/sandboxes/{id}/report

A summary written from the audit log (no AI model), counts, every approval and who decided it, hosts reached and blocked, files, and the timeline. format=pdf returns a PDF file.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox
formatquery"json", "pdf"

Returns 200 with an object.

The sandbox's image and exact package versions

HTTP
GET /api/v1/sandboxes/{id}/image
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with an object.

A sandbox's CPU, memory, disk, runtime, storage and egress

HTTP
GET /api/v1/sandboxes/{id}/metrics

A running sandbox gets a fresh reading first (at most every 10 seconds). Recorded usage, not a bill.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox
hoursqueryintegerHow far back the readings go

Returns 200 with Metrics.

Commands

Run a command

HTTP
POST /api/v1/sandboxes/{id}/exec

Returns the finished execution (200). Returns 202 with status pending_approval if a policy rule holds it for a person, or with status running if it is still going after 90 seconds. Poll GET /executions/{id} until it finishes. With stream: true (or Accept: text/event-stream) the answer is server-sent events: start (the execution), stdout and stderr ({data, offset}), then done ({exitCode, timedOut}). With background: true it answers 202 at once; read its output with GET /executions/{id}/output.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Body (JSON):

FieldTypeNotes
cmd (required)stringShell command
cwdstring
envobject
timeoutMsintegerA plain run: 1 s to 5 min (default 60 s). Streamed: up to 1 hour. Background: no limit of its own unless set (up to 24 hours).
stdinstringWritten to the command's stdin when it starts (at most 1 MB)
streambooleanAnswer with server-sent events as it runs (or send Accept: text/event-stream)
backgroundbooleanAnswer 202 at once and keep it running; read GET /executions/{id}/output
interactivebooleanKeep stdin open for POST /executions/{id}/stdin (needs stream or background). An API key's interactive command needs a person's approval when the organization has approval rules.

Returns 200 with Execution.

Open an interactive terminal

HTTP
POST /api/v1/sandboxes/{id}/terminal

A shell on a pseudo-terminal. Read what it prints from GET /executions/{id}/output, send keys to POST /executions/{id}/stdin, resize with POST /executions/{id}/resize, close with POST /executions/{id}/kill. 201 when open; 202 pending_approval when an API key opens one in an organization with approval rules, since what is typed isn't checked command by command.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Body (JSON):

FieldTypeNotes
colsinteger
rowsinteger
cmdstringDefaults to a login shell
cwdstring
envobject

Returns 200 with Execution.

List a sandbox's commands

HTTP
GET /api/v1/sandboxes/{id}/executions
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox
statusquerystring

Returns 200 with an object.

Get a command

HTTP
GET /api/v1/executions/{id}
ParameterInTypeNotes
id (required)pathstringExecution ID

Returns 200 with Execution.

List preview URLs

HTTP
GET /api/v1/sandboxes/{id}/ports

Ports reachable from a browser at https://-<sandbox id with - for _>.. A private port needs its token: open shareUrl once (it sets a cookie for that host) or send X-QR-Preview-Token.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with an object.

Set preview URLs

HTTP
PUT /api/v1/sandboxes/{id}/ports

Replaces the list. Private by default. Data sent to visitors counts as the sandbox's outbound data.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Body (JSON):

FieldTypeNotes
ports (required)object[]
rotatebooleanNew tokens for private ports: links shared before stop working

Returns 200 with an object.

Read a live command's output

HTTP
GET /api/v1/executions/{id}/output

Output of a streamed, background or terminal command after byte offsets out and err. With Accept: text/event-stream (or ?stream=1): server-sent events until it ends (stdout, stderr, missed, done), or reconnect ({out, err}) after a long stream.

ParameterInTypeNotes
id (required)pathstringExecution ID
outqueryinteger
errqueryinteger
waitqueryintegerWait up to this many ms (max 25000) for new output

Returns 200 with OutputChunk.

Send input to an interactive command or terminal

HTTP
POST /api/v1/executions/{id}/stdin

JSON {data, close}, or a raw body of any other type with ?close=1. The first 64 KB sent is kept with the command for the audit trail.

ParameterInTypeNotes
id (required)pathstringExecution ID

Body (JSON):

FieldTypeNotes
datastring
closebooleanEnd stdin (a terminal gets ^D)

Returns 200 with an object.

Stop a live command

HTTP
POST /api/v1/executions/{id}/kill
ParameterInTypeNotes
id (required)pathstringExecution ID

Body (JSON):

FieldTypeNotes
signal"TERM", "KILL", "INT", "HUP", "QUIT", "USR1", "USR2"

Returns 200 with Execution.

Resize a terminal

HTTP
POST /api/v1/executions/{id}/resize
ParameterInTypeNotes
id (required)pathstringExecution ID

Body (JSON):

FieldTypeNotes
cols (required)integer
rows (required)integer

Returns 200 with an object.

Approve a held command (signed-in people only)

HTTP
POST /api/v1/executions/{id}/approve
ParameterInTypeNotes
id (required)pathstringExecution ID

Body (JSON):

FieldTypeNotes
notestring

Returns 200 with Execution.

Deny a held command (signed-in people only)

HTTP
POST /api/v1/executions/{id}/deny
ParameterInTypeNotes
id (required)pathstringExecution ID

Body (JSON):

FieldTypeNotes
notestring

Returns 200 with Execution.

Undo a command: put the files back as they were just before it ran

HTTP
POST /api/v1/executions/{id}/undo
ParameterInTypeNotes
id (required)pathstringExecution ID

Returns 200 with an object.

Files

Read a file

HTTP
GET /api/v1/sandboxes/{id}/files
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox
path (required)querystringPath inside the sandbox, relative to the work folder or absolute

Returns 200 with string: File contents

Write a file

HTTP
PUT /api/v1/sandboxes/{id}/files
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox
path (required)querystringPath inside the sandbox, relative to the work folder or absolute

Body: application/octet-stream

Returns 200 with an object.

Delete a file

HTTP
DELETE /api/v1/sandboxes/{id}/files
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox
path (required)querystringPath inside the sandbox, relative to the work folder or absolute

Returns 200 with an object.

List a folder

HTTP
GET /api/v1/sandboxes/{id}/files/list
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox
pathquerystringPath inside the sandbox, relative to the work folder or absolute

Returns 200 with an object.

Snapshots

List a sandbox's snapshots

HTTP
GET /api/v1/sandboxes/{id}/snapshots
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with an object.

Snapshot a sandbox's files

HTTP
POST /api/v1/sandboxes/{id}/snapshots
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Body (JSON):

FieldTypeNotes
namestring

Returns 200 with Snapshot.

Fork a sandbox

HTTP
POST /api/v1/sandboxes/{id}/fork

Snapshots the sandbox's files (or uses snapshotId) and starts up to 10 copies with the same settings, each with those files. Memory and running programs aren't copied, and neither is env: pass it again. Copies that fail are listed in errors.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Body (JSON):

FieldTypeNotes
countintegerDefault 1.
snapshotIdstringFork from this snapshot instead of taking a new one
namestringCopies are named -1, -2, ...
envobject
timeoutSecinteger

Returns 200 with an object.

Rewind a sandbox to a snapshot

HTTP
POST /api/v1/sandboxes/{id}/rewind

Puts the sandbox's files back as they were in the snapshot: files made since are deleted. Running programs keep running. With saveCurrent, the files as they are now are snapshotted first, so you can rewind back.

ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Body (JSON):

FieldTypeNotes
snapshotId (required)string
saveCurrentbooleanDefault false.

Returns 200 with an object.

List snapshots

HTTP
GET /api/v1/snapshots

Returns 200 with an object.

Get a snapshot

HTTP
GET /api/v1/snapshots/{id}
ParameterInTypeNotes
id (required)pathstringSnapshot ID

Returns 200 with Snapshot.

Delete a snapshot

HTTP
DELETE /api/v1/snapshots/{id}
ParameterInTypeNotes
id (required)pathstringSnapshot ID

Returns 200 with Snapshot.

Templates

List your templates

HTTP
GET /api/v1/templates

Returns 200 with an object.

Make a template from a Dockerfile

HTTP
POST /api/v1/templates

Builds your own sandbox image from a Dockerfile, in its own microVM. The last stage must start FROM quietrobot/base or quietrobot/minimal; other stages can use any public image. There is no build context: fetch files with RUN or ADD a URL, or COPY --from another stage. CMD, ENTRYPOINT, VOLUME and HEALTHCHECK aren't used. ENV values reach every command. Returns 202 at once; poll GET /templates/{id} until status is ready, then create sandboxes with template set to its name or id. Each plan limits templates, builds a day, build time and image size; build time is billed at Standard rates.

Body (JSON):

FieldTypeNotes
name (required)string2 to 48 lowercase letters, digits or dashes
dockerfile (required)string
descriptionstring
warmPoolobjectKeep this many VMs ready for fast starts (paid plans)

Returns 200 with an object: Accepted: the first build is queued

Get a template by id or name, with recent builds

HTTP
GET /api/v1/templates/{id}
ParameterInTypeNotes
id (required)pathstringTemplate ID

Returns 200 with an object.

Change a template's description or warm pool

HTTP
PATCH /api/v1/templates/{id}
ParameterInTypeNotes
id (required)pathstringTemplate ID

Body (JSON):

FieldTypeNotes
descriptionstring
warmPoolobject

Returns 200 with Template.

Delete a template

HTTP
DELETE /api/v1/templates/{id}

Sandboxes already running from it keep running.

ParameterInTypeNotes
id (required)pathstringTemplate ID

Returns 200 with an object.

Build a template again

HTTP
POST /api/v1/templates/{id}/builds

With a new dockerfile, or with none to rebuild the last one on our latest base image. The template keeps serving its current image until the new build is ready.

ParameterInTypeNotes
id (required)pathstringTemplate ID

Body (JSON):

FieldTypeNotes
dockerfilestring

Returns 200 with an object: Accepted

Get a build and its log

HTTP
GET /api/v1/template-builds/{id}
ParameterInTypeNotes
id (required)pathstringBuild ID

Returns 200 with TemplateBuild.

Volumes

Save a sandbox's volumes now

HTTP
POST /api/v1/sandboxes/{id}/volumes/sync
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with an object.

List volumes

HTTP
GET /api/v1/volumes

Returns 200 with an object.

Make an empty volume

HTTP
POST /api/v1/volumes

Body (JSON):

FieldTypeNotes
name (required)string

Returns 200 with Volume.

Get a volume by id or name

HTTP
GET /api/v1/volumes/{id}
ParameterInTypeNotes
id (required)pathstringVolume ID

Returns 200 with Volume.

Delete a volume and its files

HTTP
DELETE /api/v1/volumes/{id}

Refused (409 volume_in_use) while a live or paused sandbox holds it.

ParameterInTypeNotes
id (required)pathstringVolume ID

Returns 200 with Volume.

Webhooks

List webhook endpoints

HTTP
GET /api/v1/webhooks

Returns 200 with an object.

Add a webhook endpoint

HTTP
POST /api/v1/webhooks

Events are POSTed as JSON {id, type, createdAt, data}, signed the Standard Webhooks way: webhook-id, webhook-timestamp and webhook-signature (v1,, keyed with the base64 part of the secret). Answer 2xx within 10 seconds; anything else is retried for about 11 hours. The URL must be public https.

Body (JSON):

FieldTypeNotes
url (required)string
descriptionstring
eventsstring[]

Returns 200 with Webhook.

Get a webhook endpoint

HTTP
GET /api/v1/webhooks/{id}
ParameterInTypeNotes
id (required)pathstringWebhook ID

Returns 200 with Webhook.

Change a webhook endpoint

HTTP
PATCH /api/v1/webhooks/{id}
ParameterInTypeNotes
id (required)pathstringWebhook ID

Body (JSON):

FieldTypeNotes
urlstring
descriptionstring
eventsstring[]
enabledboolean

Returns 200 with Webhook.

Delete a webhook endpoint

HTTP
DELETE /api/v1/webhooks/{id}
ParameterInTypeNotes
id (required)pathstringWebhook ID

Returns 200 with Webhook.

Send a signed ping now

HTTP
POST /api/v1/webhooks/{id}/test
ParameterInTypeNotes
id (required)pathstringWebhook ID

Returns 200 with an object.

Make a new signing secret

HTTP
POST /api/v1/webhooks/{id}/rotate-secret

The old secret stops working at once.

ParameterInTypeNotes
id (required)pathstringWebhook ID

Returns 200 with Webhook.

Recent deliveries to an endpoint

HTTP
GET /api/v1/webhooks/{id}/deliveries
ParameterInTypeNotes
id (required)pathstringWebhook ID
limitqueryinteger

Returns 200 with an object.

Send a delivery again

HTTP
POST /api/v1/webhooks/{id}/deliveries/{deliveryId}/redeliver
ParameterInTypeNotes
id (required)pathstringWebhook ID
deliveryId (required)pathstring

Returns 200 with WebhookDelivery.

Secrets

List secrets

HTTP
GET /api/v1/secrets

Returns 200 with an object.

Add or replace a secret

HTTP
POST /api/v1/secrets

Stores a key a sandbox can use without holding it. Replacing a value takes effect on the next call from running sandboxes.

Body (JSON):

FieldTypeNotes
name (required)stringA-Z, 0-9 and , starting with a letter; not starting with QR
value (required)stringThe key or token, up to 16 KB. Stored encrypted
hosts (required)string[]

Returns 200 with Secret.

Returns 201 with Secret: Saved

Delete a secret

HTTP
DELETE /api/v1/secrets/{name}

Stand-ins for it stop working at once, in every sandbox.

ParameterInTypeNotes
name (required)pathstring

Returns 200 with Secret.

Your outbound check

HTTP
GET /api/v1/outbound-check

Set or remove it on the dashboard's Policy page (owners and admins).

Returns 200 with an object.

Public key for sandbox identity tokens

HTTP
GET /api/v1/identity/jwks.json

Returns 200 with an object.

Organization

A sandbox's audit log

HTTP
GET /api/v1/sandboxes/{id}/audit
ParameterInTypeNotes
id (required)pathstringSandbox ID, or the name of a durable sandbox

Returns 200 with an object.

The organization's audit log

HTTP
GET /api/v1/audit
ParameterInTypeNotes
beforequeryintegerReturn events with seq below this
limitqueryinteger
actionquerystring

Returns 200 with an object.

Usage this month, and the plan's limits

HTTP
GET /api/v1/usage
ParameterInTypeNotes
daysqueryintegerA rolling window instead of this month

Returns 200 with Usage.

List reserved machines

HTTP
GET /api/v1/reservations

Returns 200 with an object.

Objects

Error

FieldTypeNotes
error (required)object

Egress

FieldTypeNotes
mode"deny", "allowlist", "open"deny: no outbound traffic. allowlist: only what allow lists. open: any public address.
allowstring[]Rules: a domain (pypi.org, .github.com), an IP address or a CIDR range (203.0.113.0/24, [2001:db8::/32]), with an optional port (db.example.com:5432, 203.0.113.0/24:8000-8100, example.com:). No port means 80 and 443. Private ranges can't be allowed.
denystring[]Rules that are always blocked, in allowlist and open mode. Same format; no port means every port. Denied domains take no port.
maxMode"deny", "allowlist", "open"The widest mode this sandbox can be switched to later. Set at create; defaults to what its rules need. An allow rule on a port other than 80 or 443 needs open.

Sandbox

FieldTypeNotes
idstring
namestring
status"starting", "running", "pausing", "paused", "archived", "stopped", "error"pausing: a durable sandbox saving its files. archived: a durable sandbox whose machine was deleted; its files are kept and any call wakes it.
templatestringbase, minimal, or the id of one of your own templates (tpl_...)
regionstring
cpuClass"standard", "performance"
reservationIdstring
pausedAtstring
fromSnapshotIdstring
warmStartbooleanHanded out from a pre-started microVM
cpusinteger
memoryMbinteger
egressEgress
secretsstring[]Names of the secrets this sandbox may use through the gateway
identityobject
autoPauseSecinteger
lastActiveAtstring
durableboolean
storageobject
resumedFrom"warm", "cold"
memoryKeptboolean
spendobjectSpend so far (running time at the size's price plus data sent out) and the sandbox's spend cap
metadataobject
errorstring
createdAtstring
startedAtstring
deadlineAtstring
endedAtstring

Secret

A stored key or token. The value is write-only: it is never returned.

FieldTypeNotes
namestringEnvironment variable name the stand-in arrives under, e.g. OPENAI_API_KEY
hostsstring[]The only hosts the value may be sent to; *.example.com allowed
createdAtstring
updatedAtstring
lastUsedAtstring

PutSecret

FieldTypeNotes
name (required)stringA-Z, 0-9 and , starting with a letter; not starting with QR
value (required)stringThe key or token, up to 16 KB. Stored encrypted
hosts (required)string[]

CreateSandbox

FieldTypeNotes
namestring
templatestringbase (default), minimal, or one of your own templates by name or id
cpuClass"standard", "performance"Default "standard".
cpus1, 2, 4, 8, 16
memoryMbintegerMultiple of 256
timeoutSecintegerSession length; the plan sets the maximum
regionstringRegion code, e.g. us-virginia or eu-frankfurt
reservationIdstring
snapshotIdstringStart with this snapshot's files
poolbooleanfalse always boots a fresh microVM
durablebooleanKeep this sandbox's files (its home folder) through pauses, the time limit and a lost host. Every pause saves them to object storage first; the time limit pauses instead of deleting; after the plan's warm window the machine is deleted and the sandbox is archived until its next call, which restores the files onto a new microVM. Ends only when deleted. Stored files are billed per GB-month.
ifExists"error", "return"Durable only: when a durable sandbox already has this name, error (409 name_taken) or return that sandbox Default "error".
egressEgress
envobject
metadataobject
secretsstring[]Names of the organization's secrets this sandbox may use. Each arrives as an environment variable holding a stand-in, never the value. Send calls through $QR_GATEWAY_URL// with the stand-in where the key goes; the gateway swaps in the value outside the microVM. Needs egress mode allowlist or open.
identityobjectHosts (your own services) this sandbox may prove itself to. It gets QR_IDENTITY_TOKEN, a stand-in the gateway swaps for a five-minute EdDSA token; check it with /identity/jwks.json
autoPauseSecintegerPause after this many seconds with no commands, file calls or gateway calls, unless programs inside are still working (using CPU or holding a connection open). Any call wakes it again
runExecRequestA first command to run as soon as the sandbox is up, in the same request. The result comes back as run.
volumesobject[]Folders kept between sandboxes. Each is put in place before the sandbox is returned, and saved when it pauses or stops, shortly before its deadline, and on POST /sandboxes/{id}/volumes/sync. One live sandbox holds a volume at a time (409 volume_in_use).
spendCapUsdnumber

ExecRequest

FieldTypeNotes
cmd (required)stringShell command
cwdstring
envobject
timeoutMsintegerA plain run: 1 s to 5 min (default 60 s). Streamed: up to 1 hour. Background: no limit of its own unless set (up to 24 hours).
stdinstringWritten to the command's stdin when it starts (at most 1 MB)
streambooleanAnswer with server-sent events as it runs (or send Accept: text/event-stream)
backgroundbooleanAnswer 202 at once and keep it running; read GET /executions/{id}/output
interactivebooleanKeep stdin open for POST /executions/{id}/stdin (needs stream or background). An API key's interactive command needs a person's approval when the organization has approval rules.

ExposedPort

FieldTypeNotes
portinteger
access"private", "public"
urlstring
shareUrlstring
tokenstring

OutputChunk

FieldTypeNotes
stdoutstring
stderrstring
outintegerstdout byte offset to ask from next
errintegerstderr byte offset to ask from next
missedintegerBytes that fell out of the 2 MB buffer before they were read
doneboolean
exitCodeinteger
timedOutboolean

Execution

FieldTypeNotes
idstring
sandboxIdstring
status"pending_approval", "running", "completed", "denied", "failed"
cmdstring
cwdstring
envKeysstring[]
exitCodeinteger
stdoutstring
stderrstring
durationMsinteger
timedOutboolean
mode"run", "stream", "background", "terminal"
interactiveboolean
requestedByobject
approvalobject
checkpointSnapshotIdstring
createdAtstring
finishedAtstring

Template

FieldTypeNotes
idstring
namestring
descriptionstring
status"building", "ready", "failed"ready once a build has finished; a template keeps its last good image while a rebuild runs
base"base", "minimal"
sizeBytesinteger
upToDateboolean
warmPoolobject
envstring[]Names of the variables the Dockerfile set with ENV. Every command gets them.
latestBuildTemplateBuild
createdAtstring
updatedAtstring

TemplateBuild

FieldTypeNotes
idstring
templateIdstring
status"queued", "building", "sealing", "ready", "failed", "cancelled"
basestring
errorstring
sizeBytesinteger
logstringThe end of the build output (GET /template-builds/{id} only)
createdAtstring
startedAtstring
endedAtstring

Volume

FieldTypeNotes
idstring
namestring
sizeBytesintegerCompressed size of the last save
attachedTostring
pathstring
savedAtstring
createdAtstring

VolumeSave

FieldTypeNotes
volumeIdstring
namestring
okboolean
sizeBytesinteger
errorstring

Metrics

Readings of the whole microVM, about once a minute while it runs, kept 7 days. CPU is % of the sandbox's vCPUs.

FieldTypeNotes
sandboxIdstring
statusstring
cpusinteger
memoryMbinteger
sampledAtstring
runtimeobject
cpuobject
memoryobject
diskobject
storageobject
egressobject
samplesobject[]

Webhook

FieldTypeNotes
idstring
urlstring
descriptionstring
eventsstring[]Event names or groups (sandbox., approval., ). Default: sandbox., approval.*, volume.save_failed
enabledboolean
failingSincestring
lastDeliveryAtstring
lastStatusinteger
createdAtstring
secretstringOnly when created or rotated: the signing secret (whsec_...). Shown once.

WebhookDelivery

FieldTypeNotes
idstringAlso the webhook-id header
eventstring
status"pending", "delivered", "failed"
attemptsinteger
nextAttemptAtstring
lastStatusinteger
lastErrorstring
createdAtstring
deliveredAtstring
payloadobject

Snapshot

FieldTypeNotes
idstring
namestring
kind"manual", "checkpoint"
status"creating", "ready"
sizeBytesinteger
sourceSandboxIdstring
createdAtstring

AuditEvent

FieldTypeNotes
seqinteger
sandboxIdstring
actorKindstring
actorLabelstring
actionstring
detailobject
createdAtstring

FileEntry

FieldTypeNotes
namestring
pathstring
typestringfile or dir
sizeinteger
modifiedstring

Usage

Usage for the window. limits is set on plans with hard monthly limits (Free).

FieldTypeNotes
sincestring
planobject
limitsobject
sandboxesinteger
executionsinteger
cpuHoursnumber
gbHoursnumber
egressGbnumber
pastCapStorageUsdnumberFiles kept past the plan's paused-storage limit because a spend cap paused a sandbox. Charged on every plan, Free included.
bySandboxobject[]Each sandbox in the window, most expensive first (at most 100)
storageobjectWhat's stored now. Recorded; not billed yet.