quiet robotBook a call

Sandboxes

REST API

Every endpoint in the Sandboxes API, with its request, response and status codes.

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

Base URL: https://www.quietrobot.ai/app/api/v1

All requests need Authorization: Bearer qr_live_… (see API keys). Request and response bodies are JSON, except file contents, which are raw bytes. Times are ISO 8601 in UTC. Errors follow one format.

Endpoints marked in testing are built but not yet in the product.

Sandboxes

Create a sandbox

POST /sandboxes → 201 with the sandbox

Returns once the sandbox is running. All fields are optional.

JSON
{
  "name": "nightly-tests",
  "template": "base",
  "cpuClass": "standard",
  "cpus": 2,
  "memoryMb": 4096,
  "timeoutSec": 1800,
  "region": "us-virginia",
  "egress": { "mode": "allowlist", "allow": ["pypi.org", "files.pythonhosted.org"] },
  "env": { "CI": "1" },
  "metadata": { "run": "1842" }
}
FieldDefaultNotes
namenoneUp to 80 characters.
templatebaseSee templates.
cpuClassstandardstandard or performance (Team plan). In testing.
cpus1 (2 for performance)1, 2, 4, 8 or 16, up to your plan's limit.
memoryMb1024 (4096 for performance)Multiple of 256, in the range for the class.
timeoutSec60010 to 86,400, up to your plan's limit.
regionwe pickA region code.
egress.modedenydeny, allowlist or open (Team plan).
egress.allowyour org's default listRules for allowlist: domains, IP addresses or CIDR ranges, with an optional port. Up to 200. See Outbound network.
egress.denynoneRules that are always blocked, in allowlist and open mode. In testing.
egress.maxModewhat the rules needThe widest mode the sandbox can be switched to later. In testing.
envnoneVariables set for every command. Names starting with QR_ are ignored.
metadatanoneString labels of your own.
snapshotIdnoneStart with a snapshot's files. In testing.
reservationIdnoneRun on a reserved machine. In testing.
pooltruefalse boots a fresh VM instead of taking a pre-started one. In testing.
secretsnoneNames of secrets the sandbox may use without holding them. Needs allowlist or open. In testing.
identity.hostsnoneHosts the sandbox may prove itself to with QR_IDENTITY_TOKEN. In testing.
autoPauseSecnonePause when idle after this many seconds (60 to 86,400). In testing.

List sandboxes

GET /sandboxes?status=running&limit=100 → { "sandboxes": [ … ] }

Newest first. status is optional. limit defaults to 100, up to 500.

Get a sandbox

GET /sandboxes/{id} → the sandbox

Change the deadline

POST /sandboxes/{id}/timeout with { "timeoutSec": 1800 } → the sandbox

Sets the deadline to now plus timeoutSec. The sandbox must be running.

Change network rules

PUT /sandboxes/{id}/egress with any of { "mode", "allow", "deny" } → the sandbox. In testing.

Fields you leave out stay as they are. A paused sandbox wakes first. 409 egress_too_wide when the rules need more than the sandbox's maxMode. See Outbound network.

Pause and resume

POST /sandboxes/{id}/pause → the sandbox, status: "paused". In testing.

POST /sandboxes/{id}/resume → the sandbox, status: "running". In testing.

See Pause and resume.

See the image

GET /sandboxes/{id}/image → { "name", "fingerprint", "packages": { "python3": "3.11.2-1+b1", … } }. In testing.

Destroy a sandbox

DELETE /sandboxes/{id} → the sandbox, status: "stopped"

The sandbox object

JSON
{
  "id": "sbx_7f3a9c2e1b4d6a",
  "name": "nightly-tests",
  "status": "running",
  "template": "base",
  "image": { "name": "base", "fingerprint": "…" },
  "region": "us-virginia",
  "cpuClass": "standard",
  "cpus": 2,
  "memoryMb": 4096,
  "egress": { "mode": "allowlist", "allow": ["pypi.org", "files.pythonhosted.org"] },
  "metadata": { "run": "1842" },
  "reservationId": null,
  "pausedAt": null,
  "fromSnapshotId": null,
  "warmStart": true,
  "error": null,
  "createdAt": "2026-11-29T17:40:02.118Z",
  "startedAt": "2026-11-29T17:40:02.904Z",
  "deadlineAt": "2026-11-29T18:10:02.904Z",
  "endedAt": null
}
FieldNotes
statusstarting, running, paused, stopped or error. See Lifecycle.
startedAtWhen it was handed to you. Billing starts here.
deadlineAtWhen it stops by itself. While paused, when it will be destroyed if not resumed.
warmStarttrue when it came from a pre-started VM rather than booting one.
errorA plain explanation when status is error.

Commands

Run a command

POST /sandboxes/{id}/exec → 200 with the execution, or 202 when held for approval

JSON
{ "cmd": "python3 main.py", "cwd": "/home/sandbox", "env": { "MODE": "test" }, "timeoutMs": 60000 }

Only cmd is required. See Commands and files.

Get, list

GET /executions/{id} → the execution

GET /sandboxes/{id}/executions?status=pending_approval → { "executions": [ … ] }, newest first

Approve or deny

POST /executions/{id}/approve and POST /executions/{id}/deny, with an optional { "note": "…" } → the execution

Dashboard sessions only. An API key gets 403 forbidden. Approving runs the command and returns once it finishes.

The execution object

JSON
{
  "id": "exe_2b9d4f6a8c1e3b",
  "sandboxId": "sbx_7f3a9c2e1b4d6a",
  "status": "completed",
  "cmd": "python3 main.py",
  "cwd": null,
  "envKeys": ["MODE"],
  "exitCode": 0,
  "stdout": "hello from a quiet robot\n",
  "stderr": "",
  "durationMs": 41,
  "timedOut": false,
  "requestedBy": { "kind": "api_key", "id": "key_…", "label": "key ci-agent (qr_live_3f…)" },
  "approval": null,
  "createdAt": "2026-11-29T17:41:12.270Z",
  "finishedAt": "2026-11-29T17:41:12.311Z"
}
FieldNotes
statuspending_approval, running, completed, denied or failed. completed means it ran; check exitCode.
stdout, stderrUp to 64 KB each.
timedOuttrue if it was stopped at timeoutMs.
envKeysThe names of the variables sent. Values are never returned.
approvalWhen a rule held it: { reason, decidedBy, decidedAt, note }. Otherwise null.

Files

RequestBodyResponse
PUT /sandboxes/{id}/files?path=…Raw bytes{ "path", "bytes" }
GET /sandboxes/{id}/files?path=…Raw bytes
DELETE /sandboxes/{id}/files?path=…{ "path" }
GET /sandboxes/{id}/files/list?path=…{ "path", "entries": [{ "name", "path", "type", "size", "modified" }] }

The sandbox must be running. Relative paths are inside /home/sandbox.

Snapshots (in testing)

RequestResponse
POST /sandboxes/{id}/snapshots with optional { "name" }201 with the snapshot
GET /sandboxes/{id}/snapshots{ "snapshots": [ … ] } taken from this sandbox
GET /snapshots{ "snapshots": [ … ] } for your organization
GET /snapshots/{id}The snapshot
DELETE /snapshots/{id}The deleted snapshot

A snapshot is { "id", "name", "status", "sizeBytes", "sourceSandboxId", "createdAt" }, with status creating or ready.

Audit log

GET /audit?limit=100&before=1042&action=exec.run → { "events": [ … ] }

GET /sandboxes/{id}/audit?limit=100&before=1042 → { "events": [ … ] }

Newest first. limit up to 1,000. See Audit log for the event list.

Usage

GET /usage (this month) or GET /usage?days=30 → your plan, vCPU-hours, GB-hours, outbound GB, compute and outbound charges, included usage, overage, reserved machines and a day-by-day breakdown.

Reserved machines (in testing)

GET /reservations → { "reservations": [{ "id", "size", "name", "cpus", "memoryMb", "region", "term", "priceMonthly", "status", "inUseBy", "createdAt", "cancelledAt" }] }

Reserved machines are added by Quiet Robot. There's no API to buy one.

Secrets

See Keys, identity and outbound check. In testing.

CallNotes
GET /secretsNames, hosts and last use. Values never come back.
POST /secretsAdd a secret, or replace one with the same name. Body: name, value, hosts.
DELETE /secrets/:nameDelete it. Its stand-ins stop working at once.
GET /outbound-checkYour outbound check's address. Set it on the dashboard's Policy page.
GET /identity/jwks.jsonThe public key for sandbox identity tokens. No API key needed.