{"openapi":"3.1.0","info":{"title":"Quiet Robot Sandboxes API","version":"1.0.0","description":"Isolated Firecracker microVMs for AI agents. Authenticate with an API key from the dashboard: `Authorization: Bearer qr_live_…`. Read-only keys can make GET requests only. No API key can approve or deny commands; that needs a signed-in person. Requests are rate limited per key (600 a minute, 30 sandbox creates a minute by default); over the limit you get 429 with Retry-After."},"servers":[{"url":"https://www.quietrobot.ai/app/api/v1"}],"security":[{"bearer":[]}],"tags":[{"name":"Sandboxes"},{"name":"Commands"},{"name":"Files"},{"name":"Snapshots"},{"name":"Templates"},{"name":"Volumes"},{"name":"Webhooks"},{"name":"Secrets"},{"name":"Organization"},{"name":"GitHub Actions runners"},{"name":"Agent Playground"}],"paths":{"/sandboxes":{"post":{"summary":"Create a sandbox","operationId":"createSandbox","tags":["Sandboxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSandbox"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedSandbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/LimitReached"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"summary":"List sandboxes","operationId":"listSandboxes","tags":["Sandboxes"],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["starting","running","pausing","paused","archived","stopped","error"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sandboxes":{"type":"array","items":{"$ref":"#/components/schemas/Sandbox"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}":{"get":{"summary":"Get a sandbox","operationId":"getSandbox","tags":["Sandboxes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"summary":"Destroy a sandbox","operationId":"destroySandbox","tags":["Sandboxes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/pause":{"post":{"summary":"Pause a sandbox","operationId":"pauseSandbox","tags":["Sandboxes"],"description":"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.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/resume":{"post":{"summary":"Resume a paused or archived sandbox","operationId":"resumeSandbox","tags":["Sandboxes"],"description":"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).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/timeout":{"post":{"summary":"Set the deadline to now + timeoutSec","operationId":"setSandboxTimeout","tags":["Sandboxes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["timeoutSec"],"properties":{"timeoutSec":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/egress":{"put":{"summary":"Change a sandbox's network rules","operationId":"setSandboxEgress","tags":["Sandboxes"],"description":"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.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Egress"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/egress/learn":{"post":{"summary":"Start learn mode: record the hosts the sandbox reaches","operationId":"startEgressLearn","tags":["Sandboxes"],"description":"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.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"summary":"What learn mode has seen, as allow rules","operationId":"getEgressLearn","tags":["Sandboxes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"how":{"anyOf":[{"type":"string","enum":["open","watch"]},{"type":"null"}]},"suggestions":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"hits":{"type":"integer"},"blocked":{"type":"boolean"},"alreadyAllowed":{"type":"boolean"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"summary":"Stop learn mode and put the old rules back","operationId":"stopEgressLearn","tags":["Sandboxes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/egress/learn/apply":{"post":{"summary":"Stop learn mode and allow only these hosts","operationId":"applyEgressLearn","tags":["Sandboxes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["allow"],"properties":{"allow":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/spend-cap":{"put":{"summary":"Set the sandbox's spend cap","operationId":"setSandboxSpendCap","tags":["Sandboxes"],"description":"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.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["capUsd"],"properties":{"capUsd":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":100000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/report":{"get":{"summary":"What did the agent do: a report on one sandbox","operationId":"getSandboxReport","tags":["Sandboxes"],"description":"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.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","pdf"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/image":{"get":{"summary":"The sandbox's image and exact package versions","operationId":"getSandboxImage","tags":["Sandboxes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/exec":{"post":{"summary":"Run a command","operationId":"execCommand","tags":["Commands"],"description":"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.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Execution"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/terminal":{"post":{"summary":"Open an interactive terminal","operationId":"openTerminal","tags":["Commands"],"description":"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.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cols":{"type":"integer"},"rows":{"type":"integer"},"cmd":{"type":"string","description":"Defaults to a login shell"},"cwd":{"type":"string"},"env":{"type":"object","additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Execution"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/executions":{"get":{"summary":"List a sandbox's commands","operationId":"listExecutions","tags":["Commands"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"},{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"executions":{"type":"array","items":{"$ref":"#/components/schemas/Execution"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/executions/{id}":{"get":{"summary":"Get a command","operationId":"getExecution","tags":["Commands"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Execution ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Execution"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/ports":{"get":{"summary":"List preview URLs","operationId":"listPorts","tags":["Commands"],"description":"Ports reachable from a browser at a readable address, https://<name>.<preview domain> (the older https://<port>-<sandbox id with - for _>.<preview domain> still works). A private port needs a link: open shareUrl, a short link that sets a cookie for the address and lands on the clean URL, or send X-QR-Preview-Token.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"ports":{"type":"array","items":{"$ref":"#/components/schemas/ExposedPort"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"put":{"summary":"Set preview URLs","operationId":"setPorts","tags":["Commands"],"description":"Replaces the list. Private by default, with no expiry by default. A port with expiresIn or expiresAt refuses every request (410) after that time, public or private. A port already shared that sends neither keeps the expiry it had; send expiresAt: null to lift it. Data sent to visitors counts as the sandbox's outbound data.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ports"],"properties":{"ports":{"type":"array","maxItems":15,"items":{"type":"object","required":["port"],"properties":{"port":{"type":"integer"},"access":{"type":"string","enum":["private","public"]},"name":{"type":"string","description":"Words for the address, such as \"meeting-meter\" (a random tail is added). Left out: the port keeps its address; a new port is named after the sandbox"},"expiresIn":{"oneOf":[{"type":"string","description":"A duration from now: \"30m\", \"1h\", \"24h\", \"7d\", \"2w\" (a minute to a year)"},{"type":"integer","description":"Seconds from now"}]},"expiresAt":{"anyOf":[{"type":"string","description":"When the port stops answering (ISO 8601, within a year); null for never"},{"type":"null"}]}}}},"rotate":{"type":"boolean","description":"New tokens and short links for private ports: links shared before stop working"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"ports":{"type":"array","items":{"$ref":"#/components/schemas/ExposedPort"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/ports/{port}/links":{"get":{"summary":"List a port's short links","operationId":"listPortLinks","tags":["Commands"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"},{"name":"port","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":65535}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"port":{"type":"integer"},"links":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"shareUrl":{"type":"string"},"standing":{"type":"boolean","description":"The port's own link, its shareUrl"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expired":{"type":"boolean"},"createdAt":{"type":"string"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"summary":"Make an expiring private link","operationId":"createPortLink","tags":["Commands"],"description":"A short link to one private port that stops working at its own time, never later than the port's expiry. Visitors after that get 410 Link expired, and an open WebSocket is closed. Revoke one with DELETE; rotate: true on PUT /sandboxes/{id}/ports revokes them all. 404 if the port isn't shared, 409 if it is public or has expired.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"},{"name":"port","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":65535}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresIn":{"oneOf":[{"type":"string","description":"A duration from now: \"30m\", \"1h\", \"24h\", \"7d\", \"2w\" (a minute to a year)"},{"type":"integer","description":"Seconds from now"}]},"expiresAt":{"type":"string","description":"When the link stops working (ISO 8601, within a year)"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortLink"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortLink"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/ports/{port}/links/{code}":{"delete":{"summary":"Revoke a short link","operationId":"revokePortLink","tags":["Commands"],"description":"The link stops working at once, also for browsers it already signed in. Revoking a port's standing link (its shareUrl) gives the port a new one.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"},{"name":"port","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":65535}},{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/executions/{id}/output":{"get":{"summary":"Read a live command's output","operationId":"readOutput","tags":["Commands"],"description":"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.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Execution ID"},{"name":"out","in":"query","schema":{"type":"integer"}},{"name":"err","in":"query","schema":{"type":"integer"}},{"name":"wait","in":"query","schema":{"type":"integer"},"description":"Wait up to this many ms (max 25000) for new output"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutputChunk"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/executions/{id}/stdin":{"post":{"summary":"Send input to an interactive command or terminal","operationId":"writeStdin","tags":["Commands"],"description":"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.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Execution ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string"},"close":{"type":"boolean","description":"End stdin (a terminal gets ^D)"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"written":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/executions/{id}/kill":{"post":{"summary":"Stop a live command","operationId":"killExecution","tags":["Commands"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Execution ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signal":{"type":"string","enum":["TERM","KILL","INT","HUP","QUIT","USR1","USR2"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Execution"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/executions/{id}/resize":{"post":{"summary":"Resize a terminal","operationId":"resizeTerminal","tags":["Commands"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Execution ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["cols","rows"],"properties":{"cols":{"type":"integer"},"rows":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cols":{"type":"integer"},"rows":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/executions/{id}/approve":{"post":{"summary":"Approve a held command (signed-in people only)","operationId":"approveExecution","tags":["Commands"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Execution ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Execution"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/executions/{id}/deny":{"post":{"summary":"Deny a held command (signed-in people only)","operationId":"denyExecution","tags":["Commands"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Execution ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Execution"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/executions/{id}/undo":{"post":{"summary":"Undo a command: put the files back as they were just before it ran","operationId":"undoExecution","tags":["Commands"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Execution ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sandbox":{"$ref":"#/components/schemas/Sandbox"},"savedSnapshot":{"anyOf":[{"$ref":"#/components/schemas/Snapshot"},{"type":"null"}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/files":{"get":{"summary":"Read a file","operationId":"readFile","tags":["Files"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"},{"name":"path","in":"query","required":true,"schema":{"type":"string"},"description":"Path inside the sandbox, relative to the work folder or absolute"}],"responses":{"200":{"description":"File contents","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"put":{"summary":"Write a file","operationId":"writeFile","tags":["Files"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"},{"name":"path","in":"query","required":true,"schema":{"type":"string"},"description":"Path inside the sandbox, relative to the work folder or absolute"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"delete":{"summary":"Delete a file","operationId":"deleteFile","tags":["Files"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"},{"name":"path","in":"query","required":true,"schema":{"type":"string"},"description":"Path inside the sandbox, relative to the work folder or absolute"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/files/list":{"get":{"summary":"List a folder","operationId":"listFiles","tags":["Files"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"},{"name":"path","in":"query","required":false,"schema":{"type":"string"},"description":"Path inside the sandbox, relative to the work folder or absolute"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/FileEntry"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/snapshots":{"post":{"summary":"Snapshot a sandbox's files","operationId":"createSnapshot","tags":["Snapshots"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"summary":"List a sandbox's snapshots","operationId":"listSandboxSnapshots","tags":["Snapshots"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"snapshots":{"type":"array","items":{"$ref":"#/components/schemas/Snapshot"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/fork":{"post":{"summary":"Fork a sandbox","operationId":"forkSandbox","tags":["Snapshots"],"description":"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. To resize a sandbox, fork it with a new cpuClass, cpus or memoryMb (a running sandbox's size can't change); to widen a locked one, fork it with new egress rules.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":10,"default":1},"snapshotId":{"type":"string","description":"Fork from this snapshot instead of taking a new one"},"name":{"type":"string","description":"Copies are named <name>-1, <name>-2, ..."},"env":{"type":"object","additionalProperties":{"type":"string"}},"timeoutSec":{"type":"integer","minimum":10},"cpuClass":{"type":"string","enum":["standard","performance"],"description":"A different CPU class for the copies"},"cpus":{"type":"integer","description":"A different number of vCPUs for the copies"},"memoryMb":{"type":"integer","description":"A different memory size for the copies"},"egress":{"allOf":[{"$ref":"#/components/schemas/Egress"}],"description":"Rules for the copies, replacing the source's"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"$ref":"#/components/schemas/Snapshot"},"sandboxes":{"type":"array","items":{"$ref":"#/components/schemas/Sandbox"}},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/rewind":{"post":{"summary":"Rewind a sandbox to a snapshot","operationId":"rewindSandbox","tags":["Snapshots"],"description":"Puts the sandbox's files back as they were in the snapshot: files made since are deleted. Running programs keep running, except template services that break when their files change under them (Postgres): those are stopped first and started again after, and listed in restarted. With saveCurrent, the files as they are now are snapshotted first, so you can rewind back.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["snapshotId"],"properties":{"snapshotId":{"type":"string"},"saveCurrent":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sandbox":{"$ref":"#/components/schemas/Sandbox"},"savedSnapshot":{"anyOf":[{"$ref":"#/components/schemas/Snapshot"},{"type":"null"}]},"restarted":{"type":"array","items":{"type":"string"},"description":"Services stopped around the rewind and started again, such as Postgres"},"warnings":{"type":"array","items":{"type":"string"},"description":"A service that didn't start again, and the command that starts it"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/snapshots":{"get":{"summary":"List snapshots","operationId":"listSnapshots","tags":["Snapshots"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"snapshots":{"type":"array","items":{"$ref":"#/components/schemas/Snapshot"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/snapshots/{id}":{"get":{"summary":"Get a snapshot","operationId":"getSnapshot","tags":["Snapshots"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Snapshot ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"summary":"Delete a snapshot","operationId":"deleteSnapshot","tags":["Snapshots"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Snapshot ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/secrets":{"get":{"summary":"List secrets","operationId":"listSecrets","tags":["Secrets"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secrets":{"type":"array","items":{"$ref":"#/components/schemas/Secret"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"summary":"Add or replace a secret","operationId":"putSecret","tags":["Secrets"],"description":"Stores a key a sandbox can use without holding it. Replacing a value takes effect on the next call from running sandboxes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutSecret"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}}},"201":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/secrets/{name}":{"delete":{"summary":"Delete a secret","operationId":"deleteSecret","tags":["Secrets"],"description":"Stand-ins for it stop working at once, in every sandbox.","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outbound-check":{"get":{"summary":"Your outbound check","operationId":"getOutboundCheck","tags":["Secrets"],"description":"Set or remove it on the dashboard's Rules page (owners and admins).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/identity/jwks.json":{"get":{"summary":"Public key for sandbox identity tokens","operationId":"getIdentityJwks","tags":["Secrets"],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/sandboxes/{id}/audit":{"get":{"summary":"A sandbox's audit log","operationId":"getSandboxAudit","tags":["Organization"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/AuditEvent"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/audit":{"get":{"summary":"The organization's audit log","operationId":"getAudit","tags":["Organization"],"parameters":[{"name":"before","in":"query","schema":{"type":"integer"},"description":"Return events with seq below this"},{"name":"limit","in":"query","schema":{"type":"integer"}},{"name":"action","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/AuditEvent"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/metrics":{"get":{"summary":"A sandbox's CPU, memory, disk, runtime, storage and egress","operationId":"getSandboxMetrics","tags":["Sandboxes"],"description":"A running sandbox gets a fresh reading first (at most every 10 seconds). Recorded usage, not a bill.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"},{"name":"hours","in":"query","schema":{"type":"integer","minimum":1,"maximum":168,"default":24},"description":"How far back the readings go"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metrics"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sandboxes/{id}/volumes/sync":{"post":{"summary":"Save a sandbox's volumes now","operationId":"syncVolumes","tags":["Volumes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Sandbox ID, or the name of a durable sandbox"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"volumes":{"type":"array","items":{"$ref":"#/components/schemas/VolumeSave"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/templates":{"get":{"summary":"List your templates and ours","operationId":"listTemplates","tags":["Templates"],"description":"templates: your own. official: ours that can start now, each with its default size, the helper that starts its long-running part (start), and the port that part listens on.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/Template"}},"official":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Pass as template when you create a sandbox"},"title":{"type":"string"},"description":{"type":"string"},"cpus":{"type":"integer"},"memoryMb":{"type":"integer"},"start":{"anyOf":[{"type":"string","description":"Run this in the sandbox to start the template's long-running part, e.g. qr-desktop start"},{"type":"null"}]},"port":{"anyOf":[{"type":"integer","description":"The port that part listens on; expose it for a preview link"},{"type":"null"}]},"extendWith":{"type":"string","description":"The FROM line for a template of your own built on this one"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"summary":"Make a template from a Dockerfile","operationId":"createTemplate","tags":["Templates"],"description":"Builds your own sandbox image from a Dockerfile, in its own microVM. The last stage must start FROM one of our templates (quietrobot/base, quietrobot/minimal, quietrobot/browser, ...); 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.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","dockerfile"],"properties":{"name":{"type":"string","description":"2 to 48 lowercase letters, digits or dashes"},"dockerfile":{"type":"string"},"description":{"type":"string"},"warmPool":{"description":"Spares kept ready for fast starts (paid plans): one size, a list of up to 3, a number (spares at 1 vCPU / 2 GB), 0 for none, or null for automatic (one spare once the template is in regular use)","oneOf":[{"type":"object","properties":{"size":{"type":"integer"},"cpus":{"type":"integer"},"memoryMb":{"type":"integer"},"egress":{"type":"string","enum":["deny","allowlist","open"]},"cpuClass":{"type":"string","enum":["standard","performance"]}}},{"type":"array","maxItems":3,"items":{"type":"object","properties":{"size":{"type":"integer"},"cpus":{"type":"integer"},"memoryMb":{"type":"integer"},"egress":{"type":"string","enum":["deny","allowlist","open"]},"cpuClass":{"type":"string","enum":["standard","performance"]}}}},{"type":"integer"}]}}}}}},"responses":{"200":{"description":"Accepted: the first build is queued","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Template"},{"type":"object","properties":{"warnings":{"type":"array","items":{"type":"string"}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/templates/{id}":{"get":{"summary":"Get a template by id or name, with recent builds","operationId":"getTemplate","tags":["Templates"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Template ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Template"},{"type":"object","properties":{"builds":{"type":"array","items":{"$ref":"#/components/schemas/TemplateBuild"}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"summary":"Change a template's description or warm pool","operationId":"updateTemplate","tags":["Templates"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Template ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string"},"warmPool":{"anyOf":[{"type":"object"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"summary":"Delete a template","operationId":"deleteTemplate","tags":["Templates"],"description":"Sandboxes already running from it keep running.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Template ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/templates/{id}/builds":{"post":{"summary":"Build a template again","operationId":"rebuildTemplate","tags":["Templates"],"description":"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.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Template ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dockerfile":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"build":{"$ref":"#/components/schemas/TemplateBuild"},"warnings":{"type":"array","items":{"type":"string"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/template-builds/{id}":{"get":{"summary":"Get a build and its log","operationId":"getTemplateBuild","tags":["Templates"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Build ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateBuild"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/volumes":{"get":{"summary":"List volumes","operationId":"listVolumes","tags":["Volumes"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"volumes":{"type":"array","items":{"$ref":"#/components/schemas/Volume"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"summary":"Make an empty volume","operationId":"createVolume","tags":["Volumes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Volume"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/volumes/{id}":{"get":{"summary":"Get a volume by id or name","operationId":"getVolume","tags":["Volumes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Volume ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Volume"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"summary":"Delete a volume and its files","operationId":"deleteVolume","tags":["Volumes"],"description":"Refused (409 volume_in_use) while a live or paused sandbox holds it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Volume ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Volume"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhooks":{"get":{"summary":"List webhook endpoints","operationId":"listWebhooks","tags":["Webhooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"events":{"type":"array","items":{"type":"string"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"summary":"Add a webhook endpoint","operationId":"createWebhook","tags":["Webhooks"],"description":"Events are POSTed as JSON {id, type, createdAt, data}, signed the Standard Webhooks way: webhook-id, webhook-timestamp and webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>, 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.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhooks/{id}":{"get":{"summary":"Get a webhook endpoint","operationId":"getWebhook","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Webhook ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"summary":"Change a webhook endpoint","operationId":"updateWebhook","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Webhook ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"summary":"Delete a webhook endpoint","operationId":"deleteWebhook","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Webhook ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhooks/{id}/test":{"post":{"summary":"Send a signed ping now","operationId":"testWebhook","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Webhook ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"anyOf":[{"type":"integer"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"event":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/graph-templates":{"get":{"summary":"List the playground's graphs","operationId":"listGraphTemplates","tags":["Agent Playground"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"shape":{"type":"string"},"description":{"type":"string"},"guards":{"$ref":"#/components/schemas/Guards"},"graph":{"$ref":"#/components/schemas/Graph"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/graphs/simulate":{"post":{"summary":"Simulate a graph","operationId":"simulateGraph","tags":["Agent Playground"],"description":"Plays the graph 2,000 times with each step's estimated time and pass rate (from this graph's past runs once a step has run 3 times, else its hints), your prices and measured start times, and the runner's own guard rules. Answers what a run likely costs, how often a guard stops it, and the most it can cost.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"graph":{"$ref":"#/components/schemas/Graph"},"template":{"type":"string"},"guards":{"$ref":"#/components/schemas/Guards"},"size":{"$ref":"#/components/schemas/RunSize"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"graph":{"type":"string"},"template":{"anyOf":[{"type":"string"},{"type":"null"}]},"guards":{"$ref":"#/components/schemas/Guards"},"size":{"$ref":"#/components/schemas/RunSize"},"forecast":{"$ref":"#/components/schemas/Forecast"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/runs":{"get":{"summary":"List graph runs","operationId":"listRuns","tags":["Agent Playground"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/Run"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"summary":"Start a graph run","operationId":"startRun","tags":["Agent Playground"],"description":"Runs a graph (or a playground template) on real sandboxes, saving a checkpoint after each step that passes. Guards are checked on the server between steps, and the budget is also each run sandbox's spend cap. mode external makes a run your own code reports steps to (LangGraph and other frameworks).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"graph":{"$ref":"#/components/schemas/Graph"},"template":{"type":"string"},"guards":{"$ref":"#/components/schemas/Guards"},"size":{"$ref":"#/components/schemas/RunSize"},"mode":{"type":"string","enum":["managed","external"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"201":{"description":"Started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/runs/{id}":{"get":{"summary":"Get a graph run and its steps","operationId":"getRun","tags":["Agent Playground"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Run ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/runs/{id}/cancel":{"post":{"summary":"Cancel a graph run","operationId":"cancelRun","tags":["Agent Playground"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Run ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/runs/{id}/steps":{"post":{"summary":"Report a step of an external run","operationId":"reportRunStep","tags":["Agent Playground"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Run ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["node"],"properties":{"node":{"type":"string"},"status":{"type":"string","enum":["running","waiting","ok","fail","skipped"]},"label":{"type":"string"},"sandboxId":{"type":"string"},"snapshotId":{"type":"string"},"message":{"type":"string"},"output":{"type":"string"},"startedAt":{"type":"string"},"finishedAt":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"step":{"oneOf":[{"$ref":"#/components/schemas/RunStep"},{"type":"null"}]},"stop":{"type":"boolean","description":"A guard was reached: stop the run"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/runs/{id}/finish":{"post":{"summary":"Finish an external run","operationId":"finishRun","tags":["Agent Playground"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Run ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["done","failed"]},"error":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/github-runners":{"get":{"summary":"List GitHub Actions runner pools","operationId":"listRunnerPools","tags":["GitHub Actions runners"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"type":"string","enum":["repo","org"]},"owner":{"type":"string"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"runsOn":{"type":"array","items":{"type":"string"},"description":"Labels a workflow can put in runs-on"},"template":{"type":"string"},"cpuClass":{"type":"string"},"cpus":{"type":"integer"},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"egress":{"type":"object","properties":{"mode":{"type":"string"},"allow":{"type":"array","items":{"type":"string"}}}},"allowSudo":{"type":"boolean"},"maxRunners":{"type":"integer"},"jobTimeoutSec":{"type":"integer"},"enabled":{"type":"boolean"},"webhookUrl":{"type":"string","description":"Paste into GitHub: Settings > Webhooks > Add webhook, content type application/json, event Workflow jobs"},"webhookSecret":{"type":"string","description":"Only in the answer to create and rotate-secret"},"lastEventAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"summary":"Add a GitHub Actions runner pool","operationId":"createRunnerPool","tags":["GitHub Actions runners"],"description":"Each queued job in the repository or organization whose runs-on asks for quietrobot (or quietrobot-4cpu, quietrobot-performance-8cpu, ...) gets a fresh sandbox running GitHub's runner for that one job; the sandbox is destroyed when the job ends and billed by the second. The token needs Administration: Read and write (repository) or Self-hosted runners: Read and write (organization); it is stored encrypted and never enters a sandbox. Add the webhookUrl and webhookSecret from the answer to GitHub with the Workflow jobs event.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"repository":{"type":"string","description":"owner/name"},"organization":{"type":"string"},"token":{"type":"string","description":"A GitHub token, fine-grained is best"},"labels":{"type":"array","items":{"type":"string"},"description":"Extra labels a job may ask for besides quietrobot"},"template":{"type":"string","description":"github-runner (default) or your own template built FROM quietrobot/github-runner"},"cpuClass":{"type":"string","enum":["standard","performance"]},"cpus":{"type":"integer","enum":[1,2,4,8,16]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"egress":{"type":"object","properties":{"mode":{"type":"string","enum":["allowlist","open"]},"allow":{"type":"array","items":{"type":"string"}}}},"allowSudo":{"type":"boolean","description":"Root for job steps (sudo). Only a signed-in person can turn it on"},"maxRunners":{"type":"integer"},"jobTimeoutSec":{"type":"integer"},"enabled":{"type":"boolean"},"name":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"type":"string","enum":["repo","org"]},"owner":{"type":"string"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"runsOn":{"type":"array","items":{"type":"string"},"description":"Labels a workflow can put in runs-on"},"template":{"type":"string"},"cpuClass":{"type":"string"},"cpus":{"type":"integer"},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"egress":{"type":"object","properties":{"mode":{"type":"string"},"allow":{"type":"array","items":{"type":"string"}}}},"allowSudo":{"type":"boolean"},"maxRunners":{"type":"integer"},"jobTimeoutSec":{"type":"integer"},"enabled":{"type":"boolean"},"webhookUrl":{"type":"string","description":"Paste into GitHub: Settings > Webhooks > Add webhook, content type application/json, event Workflow jobs"},"webhookSecret":{"type":"string","description":"Only in the answer to create and rotate-secret"},"lastEventAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/github-runners/{id}":{"get":{"summary":"Get a runner pool and its latest jobs","operationId":"getRunnerPool","tags":["GitHub Actions runners"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Runner pool ID"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"type":"string","enum":["repo","org"]},"owner":{"type":"string"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"runsOn":{"type":"array","items":{"type":"string"},"description":"Labels a workflow can put in runs-on"},"template":{"type":"string"},"cpuClass":{"type":"string"},"cpus":{"type":"integer"},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"egress":{"type":"object","properties":{"mode":{"type":"string"},"allow":{"type":"array","items":{"type":"string"}}}},"allowSudo":{"type":"boolean"},"maxRunners":{"type":"integer"},"jobTimeoutSec":{"type":"integer"},"enabled":{"type":"boolean"},"webhookUrl":{"type":"string","description":"Paste into GitHub: Settings > Webhooks > Add webhook, content type application/json, event Workflow jobs"},"webhookSecret":{"type":"string","description":"Only in the answer to create and rotate-secret"},"lastEventAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"summary":"Change a runner pool","operationId":"updateRunnerPool","tags":["GitHub Actions runners"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Runner pool ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"labels":{"type":"array","items":{"type":"string"},"description":"Extra labels a job may ask for besides quietrobot"},"template":{"type":"string","description":"github-runner (default) or your own template built FROM quietrobot/github-runner"},"cpuClass":{"type":"string","enum":["standard","performance"]},"cpus":{"type":"integer","enum":[1,2,4,8,16]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"egress":{"type":"object","properties":{"mode":{"type":"string","enum":["allowlist","open"]},"allow":{"type":"array","items":{"type":"string"}}}},"allowSudo":{"type":"boolean","description":"Root for job steps (sudo). Only a signed-in person can turn it on"},"maxRunners":{"type":"integer"},"jobTimeoutSec":{"type":"integer"},"enabled":{"type":"boolean"},"name":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"type":"string","enum":["repo","org"]},"owner":{"type":"string"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"runsOn":{"type":"array","items":{"type":"string"},"description":"Labels a workflow can put in runs-on"},"template":{"type":"string"},"cpuClass":{"type":"string"},"cpus":{"type":"integer"},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"egress":{"type":"object","properties":{"mode":{"type":"string"},"allow":{"type":"array","items":{"type":"string"}}}},"allowSudo":{"type":"boolean"},"maxRunners":{"type":"integer"},"jobTimeoutSec":{"type":"integer"},"enabled":{"type":"boolean"},"webhookUrl":{"type":"string","description":"Paste into GitHub: Settings > Webhooks > Add webhook, content type application/json, event Workflow jobs"},"webhookSecret":{"type":"string","description":"Only in the answer to create and rotate-secret"},"lastEventAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"summary":"Remove a runner pool","operationId":"deleteRunnerPool","tags":["GitHub Actions runners"],"description":"Its running runners are stopped.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Runner pool ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/github-runners/{id}/rotate-secret":{"post":{"summary":"Make a new webhook secret","operationId":"rotateRunnerPoolSecret","tags":["GitHub Actions runners"],"description":"Paste it into the webhook on GitHub: the old one stops working at once.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Runner pool ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"type":"string","enum":["repo","org"]},"owner":{"type":"string"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"runsOn":{"type":"array","items":{"type":"string"},"description":"Labels a workflow can put in runs-on"},"template":{"type":"string"},"cpuClass":{"type":"string"},"cpus":{"type":"integer"},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"egress":{"type":"object","properties":{"mode":{"type":"string"},"allow":{"type":"array","items":{"type":"string"}}}},"allowSudo":{"type":"boolean"},"maxRunners":{"type":"integer"},"jobTimeoutSec":{"type":"integer"},"enabled":{"type":"boolean"},"webhookUrl":{"type":"string","description":"Paste into GitHub: Settings > Webhooks > Add webhook, content type application/json, event Workflow jobs"},"webhookSecret":{"type":"string","description":"Only in the answer to create and rotate-secret"},"lastEventAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhooks/{id}/rotate-secret":{"post":{"summary":"Make a new signing secret","operationId":"rotateWebhookSecret","tags":["Webhooks"],"description":"The old secret stops working at once.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Webhook ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhooks/{id}/deliveries":{"get":{"summary":"Recent deliveries to an endpoint","operationId":"listWebhookDeliveries","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Webhook ID"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhooks/{id}/deliveries/{deliveryId}/redeliver":{"post":{"summary":"Send a delivery again","operationId":"redeliverWebhook","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Webhook ID"},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/policy":{"get":{"summary":"Your organization's rules","operationId":"getPolicy","tags":["Organization"],"description":"Read-only: the defaults new sandboxes get, the approval rules that hold commands, Undo checkpoints, who is emailed about held commands, and the outbound check. Owners and admins change them on the dashboard's Rules page, so an API key can't loosen them.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"defaults":{"type":"object","properties":{"egressMode":{"type":"string"},"egressAllow":{"type":"array","items":{"type":"string"}},"egressDeny":{"type":"array","items":{"type":"string"},"description":"Always-block rules a sandbox gets when it's started without its own"},"egressLock":{"type":"boolean","description":"Whether sandboxes started without egress.lock are locked"},"timeoutSec":{"type":"integer"},"maxConcurrent":{"type":"integer"},"spendCapUsd":{"anyOf":[{"type":"number"},{"type":"null"}]}}},"approvalRules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pattern":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"}}}},"checkpointRisky":{"type":"boolean","description":"Held and sudo commands save the files first, so they can be undone"},"approvalEmail":{"type":"string","enum":["managers","everyone","off"]},"outboundCheck":{"type":"object","properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/usage":{"get":{"summary":"Usage this month, and the plan's limits","operationId":"getUsage","tags":["Organization"],"parameters":[{"name":"days","in":"query","schema":{"type":"integer"},"description":"A rolling window instead of this month"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/reservations":{"get":{"summary":"List reserved machines","operationId":"listReservations","tags":["Organization"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"reservations":{"type":"array","items":{"type":"object"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API key (qr_live_…)"}},"schemas":{"Graph":{"type":"object","required":["nodes"],"description":"Steps, forks, a judge and edges that branch on pass or fail and may loop back (Agent Playground: graphs and loops on real sandboxes).","properties":{"name":{"type":"string"},"template":{"type":"string","description":"The template the run's first sandbox starts from; default base"},"start":{"type":"string","description":"The first step's id; default the first node"},"rewindTo":{"type":"string","description":"When a guard stops the run, rewind the main sandbox to this step's checkpoint"},"nodes":{"type":"array","maxItems":40,"items":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["run","fork","judge","end"]},"cmd":{"type":"string","description":"run: the shell command; exit 0 passes"},"cwd":{"type":"string"},"files":{"type":"object","additionalProperties":{"type":"string"},"description":"run: files written first, path relative to the home folder"},"timeoutMs":{"type":"integer"},"sandbox":{"type":"string","description":"run: main (default) or a lane a fork made"},"checkpoint":{"type":"boolean","description":"run: save a checkpoint after it passes (default true)"},"lanes":{"type":"array","items":{"type":"string"},"description":"fork: 2 to 10 lane names"},"metric":{"type":"string","description":"judge: the number lanes print as their last JSON line, like ms"},"best":{"type":"string","enum":["min","max"]},"estSec":{"type":"number","description":"Simulator hint"},"passRate":{"type":"number","description":"Simulator hint, 0 to 1"},"x":{"type":"number"},"y":{"type":"number"}}}},"edges":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"when":{"type":"string","enum":["pass","fail","always"],"description":"Default pass"}}}}}},"Guards":{"type":"object","properties":{"maxLoops":{"type":"integer","minimum":1,"maximum":50,"default":5},"timeSec":{"type":"integer","minimum":10,"maximum":3600,"default":300},"budgetUsd":{"type":"number","minimum":0.01,"maximum":5,"default":0.25}}},"RunSize":{"type":"object","properties":{"cpuClass":{"type":"string","enum":["standard","performance"]},"cpus":{"type":"integer"},"memoryMb":{"type":"integer"}}},"Forecast":{"type":"object","description":"The simulator's answer: 2,000 simulated runs at your prices","properties":{"trials":{"type":"integer"},"costUsd":{"type":"object"},"seconds":{"type":"object"},"loops":{"type":"object"},"outcomes":{"type":"object"},"guardHits":{"type":"object"},"maxSandboxes":{"type":"integer"},"worstCaseUsd":{"type":"number"},"worstCaseWhy":{"type":"string"},"estimates":{"type":"object"},"hourlyUsd":{"type":"number"}}},"RunStep":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer"},"node":{"type":"string"},"label":{"type":"string"},"status":{"type":"string","enum":["running","waiting","ok","fail","stopped","skipped"]},"sandboxId":{"anyOf":[{"type":"string"},{"type":"null"}]},"executionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"snapshotId":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"output":{"anyOf":[{"type":"string"},{"type":"null"}]},"costUsd":{"type":"number","description":"The run's spend when the step ended"},"startedAt":{"type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"type":["integer","null"]}}},"Run":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"template":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"type":"string","enum":["managed","external"]},"status":{"type":"string","enum":["queued","running","done","failed","stopped","cancelled"]},"guards":{"$ref":"#/components/schemas/Guards"},"size":{"$ref":"#/components/schemas/RunSize"},"loops":{"type":"integer"},"costUsd":{"type":"number"},"elapsedSec":{"type":"number"},"stopReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"sandboxes":{"type":"object","additionalProperties":{"type":"string"}},"metadata":{"type":"object"},"graph":{"$ref":"#/components/schemas/Graph"},"forecast":{"oneOf":[{"$ref":"#/components/schemas/Forecast"},{"type":"null"}]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/RunStep"}},"createdAt":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Machine-readable code, e.g. rate_limited"},"message":{"type":"string"}}}}},"Egress":{"type":"object","properties":{"mode":{"type":"string","enum":["deny","allowlist","open"],"description":"deny: no outbound traffic. allowlist: only what allow lists. open: any public address. Left out: the organization's saved default from the dashboard's Rules page (open for new organizations)."},"allow":{"type":"array","items":{"type":"string"},"description":"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."},"deny":{"type":"array","items":{"type":"string"},"description":"Rules that are always blocked, in allowlist and open mode. Same format; no port means every port. Denied domains take no port. Left out: the organization's saved always-block rules; send [] for none."},"maxMode":{"type":"string","enum":["deny","allowlist","open"],"description":"The widest mode this sandbox can be switched to later. Set at create; by default open, so the rules can be widened while it runs. An allow rule on a port other than 80 or 443 needs open."},"lock":{"type":"boolean","description":"Create only. true fixes the outside firewall (enforced by the host, outside the VM) to exactly what these rules need, so the sandbox can never be widened, even by root inside it. Copies keep the lock. Can't be sent with maxMode. Left out: the organization's saved default (off unless an owner turned it on); send false for an unlocked sandbox."},"locked":{"type":"boolean","description":"In answers: whether the sandbox was started locked."}}},"Sandbox":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["starting","running","pausing","paused","archived","stopped","error"],"description":"pausing: a durable sandbox saving its files. archived: a durable sandbox whose machine was deleted; its files are kept and any call wakes it."},"template":{"type":"string","description":"One of ours (base, minimal, code-interpreter, browser, desktop, coding-agent, fullstack-js, go, rust, postgres, github-runner), or the id of one of your own templates (tpl_...)"},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"cpuClass":{"type":"string","enum":["standard","performance"]},"reservationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"fromSnapshotId":{"anyOf":[{"type":"string"},{"type":"null"}]},"warmStart":{"type":"boolean","description":"Handed out from a pre-started microVM"},"cpus":{"type":"integer"},"memoryMb":{"type":"integer"},"egress":{"$ref":"#/components/schemas/Egress"},"secrets":{"type":"array","items":{"type":"string"},"description":"Names of the secrets this sandbox may use through the gateway"},"identity":{"type":"object","properties":{"hosts":{"type":"array","items":{"type":"string"}}}},"autoPauseSec":{"anyOf":[{"type":"integer"},{"type":"null"}]},"lastActiveAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"durable":{"type":"boolean"},"storage":{"anyOf":[{"type":"object","description":"Durable sandboxes only: where it is kept and its last saved copy of files.","properties":{"tier":{"anyOf":[{"type":"string","enum":["hot","warm","cold"],"description":"hot: running. warm: paused, memory kept. cold: archived, files only."},{"type":"null"}]},"sizeBytes":{"anyOf":[{"type":"integer","description":"Compressed size of the last saved copy"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},{"type":"null"}]},"resumedFrom":{"anyOf":[{"type":"string","enum":["warm","cold"],"description":"How a durable sandbox last woke"},{"type":"null"}]},"memoryKept":{"anyOf":[{"type":"boolean","description":"false: it woke cold, so programs that were running started fresh; files are as they were"},{"type":"null"}]},"spend":{"type":"object","description":"Spend so far (running time at the size's price plus data sent out) and the sandbox's spend cap","properties":{"capUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"spentUsd":{"type":"number"},"warnedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"stoppedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"stoppedBy":{"anyOf":[{"type":"string","enum":["sandbox","key"],"description":"Whose cap paused it: its own, or its API key's monthly cap"},{"type":"null"}]}}},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deadlineAt":{"type":"string","format":"date-time"},"endedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"Secret":{"type":"object","description":"A stored key or token. The value is write-only: it is never returned.","properties":{"name":{"type":"string","description":"Environment variable name the stand-in arrives under, e.g. OPENAI_API_KEY"},"hosts":{"type":"array","items":{"type":"string"},"description":"The only hosts the value may be sent to; *.example.com allowed"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"PutSecret":{"type":"object","required":["name","value","hosts"],"properties":{"name":{"type":"string","description":"A-Z, 0-9 and _, starting with a letter; not starting with QR_"},"value":{"type":"string","description":"The key or token, up to 16 KB. Stored encrypted"},"hosts":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":20}}},"CreateSandbox":{"type":"object","properties":{"name":{"type":"string"},"template":{"type":"string","description":"One of ours: base (default), minimal, code-interpreter, browser, desktop, coding-agent, fullstack-js, go, rust, postgres or github-runner (GET /templates lists them under official); or one of your own templates by name or id. Without cpus or memoryMb, the size is 1 vCPU and 2 GB (desktop 2 vCPU and 2 GB, github-runner 2 vCPU and 4 GB; Performance 2 vCPU and 4 GB)."},"cpuClass":{"type":"string","enum":["standard","performance"],"default":"standard"},"cpus":{"type":"integer","enum":[1,2,4,8,16]},"memoryMb":{"type":"integer","description":"Multiple of 256"},"timeoutSec":{"type":"integer","minimum":10,"description":"Session length; the plan sets the maximum"},"region":{"type":"string","description":"Region code, e.g. us-virginia or eu-frankfurt"},"reservationId":{"type":"string"},"snapshotId":{"type":"string","description":"Start with this snapshot's files"},"pool":{"type":"boolean","description":"false always boots a fresh microVM"},"durable":{"type":"boolean","description":"Keep 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":{"type":"string","enum":["error","return"],"default":"error","description":"Durable only: when a durable sandbox already has this name, error (409 name_taken) or return that sandbox"},"egress":{"$ref":"#/components/schemas/Egress"},"env":{"type":"object","additionalProperties":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"secrets":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"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/<host>/<path> with the stand-in where the key goes; the gateway swaps in the value outside the microVM. Needs egress mode allowlist or open."},"identity":{"type":"object","properties":{"hosts":{"type":"array","items":{"type":"string"},"maxItems":20}},"description":"Hosts (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"},"autoPauseSec":{"type":"integer","minimum":60,"maximum":86400,"description":"Pause 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"},"run":{"$ref":"#/components/schemas/ExecRequest","description":"A first command to run as soon as the sandbox is up, in the same request. The result comes back as run."},"volumes":{"type":"array","maxItems":5,"items":{"type":"object","required":["path"],"properties":{"id":{"type":"string","description":"A volume id (vol_...)"},"name":{"type":"string","description":"A volume name; a new name makes an empty volume"},"path":{"type":"string","description":"A folder in /home/sandbox, e.g. data or cache/pip"}}},"description":"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)."},"spendCapUsd":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":100000,"description":"The most this sandbox may cost, in dollars. At 80% your owners and admins are emailed; at 100% it is paused until someone raises the cap. Unset = your organization's default; an API key may only set one at or under that default"},{"type":"null"}]}}},"CreatedSandbox":{"allOf":[{"$ref":"#/components/schemas/Sandbox"},{"type":"object","properties":{"run":{"description":"Only when the request had run: the finished execution, or an error if it couldn't run (the sandbox is still created).","oneOf":[{"$ref":"#/components/schemas/Execution"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}]}}}]},"ExecRequest":{"type":"object","required":["cmd"],"properties":{"cmd":{"type":"string","description":"Shell command"},"cwd":{"type":"string"},"env":{"type":"object","additionalProperties":{"type":"string"}},"timeoutMs":{"type":"integer","description":"A 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)."},"stdin":{"type":"string","description":"Written to the command's stdin when it starts (at most 1 MB)"},"stream":{"type":"boolean","description":"Answer with server-sent events as it runs (or send Accept: text/event-stream)"},"background":{"type":"boolean","description":"Answer 202 at once and keep it running; read GET /executions/{id}/output"},"interactive":{"type":"boolean","description":"Keep 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":{"type":"object","properties":{"port":{"type":"integer"},"access":{"type":"string","enum":["private","public"]},"name":{"anyOf":[{"type":"string","description":"The address's name, e.g. meeting-meter-k7qm2x"},{"type":"null"}]},"url":{"anyOf":[{"type":"string","description":"The readable address, e.g. https://meeting-meter-k7qm2x.quietrobot.dev"},{"type":"null"}]},"shareUrl":{"anyOf":[{"type":"string","description":"The link to give people. Private: a short link (https://s.quietrobot.dev/<code>) that signs a browser in and lands on url, with no token in the address. Public: url"},{"type":"null"}]},"token":{"anyOf":[{"type":"string","description":"Send as X-QR-Preview-Token from a program instead of opening shareUrl"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","description":"When the port stops answering (ISO 8601), or null for never"},{"type":"null"}]},"expired":{"type":"boolean","description":"Past expiresAt: every request to the port is refused, and shareUrl and token are null"}}},"PortLink":{"type":"object","properties":{"port":{"type":"integer"},"code":{"type":"string","description":"The link's code, to revoke it"},"url":{"type":"string"},"shareUrl":{"type":"string","description":"A short link that signs the browser in until it expires or is revoked, then lands on url"},"token":{"type":"string","description":"Send as X-QR-Preview-Token instead of opening shareUrl"},"expiresAt":{"anyOf":[{"type":"string","description":"When the link stops working (ISO 8601): the time asked for, or the port's own expiry if sooner"},{"type":"null"}]}}},"OutputChunk":{"type":"object","properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"out":{"type":"integer","description":"stdout byte offset to ask from next"},"err":{"type":"integer","description":"stderr byte offset to ask from next"},"missed":{"type":"integer","description":"Bytes that fell out of the 2 MB buffer before they were read"},"done":{"type":"boolean"},"exitCode":{"anyOf":[{"type":"integer"},{"type":"null"}]},"timedOut":{"type":"boolean"},"endReason":{"anyOf":[{"type":"string","enum":["closed","sandbox_destroyed","sandbox_expired","sandbox_stopped","sandbox_restarted"],"description":"Why a live command or terminal ended: closed when it ended by itself, otherwise the sandbox went first (destroyed, reached its time limit, stopped, restarted). Its output up to then is kept in stdout and stderr."},{"type":"null"}]}}},"Execution":{"type":"object","properties":{"id":{"type":"string"},"sandboxId":{"type":"string"},"status":{"type":"string","enum":["pending_approval","running","completed","denied","failed"]},"cmd":{"type":"string"},"cwd":{"anyOf":[{"type":"string"},{"type":"null"}]},"envKeys":{"type":"array","items":{"type":"string"}},"exitCode":{"anyOf":[{"type":"integer"},{"type":"null"}]},"stdout":{"anyOf":[{"type":"string"},{"type":"null"}]},"stderr":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer"},{"type":"null"}]},"timedOut":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"endReason":{"anyOf":[{"type":"string","enum":["closed","sandbox_destroyed","sandbox_expired","sandbox_stopped","sandbox_restarted"],"description":"Why a live command or terminal ended: closed when it ended by itself, otherwise the sandbox went first (destroyed, reached its time limit, stopped, restarted). Its output up to then is kept in stdout and stderr."},{"type":"null"}]},"mode":{"type":"string","enum":["run","stream","background","terminal"]},"interactive":{"type":"boolean"},"requestedBy":{"type":"object","properties":{"kind":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"approval":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"decidedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"checkpointSnapshotId":{"anyOf":[{"type":"string","description":"Files saved just before a held or sudo command ran. POST /executions/{id}/undo rewinds to them."},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"Template":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["building","ready","failed"],"description":"ready once a build has finished; a template keeps its last good image while a rebuild runs"},"base":{"anyOf":[{"type":"string","description":"Which of our templates it's built on (FROM quietrobot/<base>)","enum":["base","minimal","code-interpreter","browser","desktop","coding-agent","fullstack-js","go","rust","postgres","github-runner"]},{"type":"null"}]},"sizeBytes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"upToDate":{"anyOf":[{"type":"boolean","description":"False once our base image has had updates since the last build. Rebuild to pick them up."},{"type":"null"}]},"warmPool":{"anyOf":[{"type":"array","description":"The owner's pools; null when automatic","items":{"type":"object","properties":{"size":{"type":"integer"},"cpus":{"type":"integer"},"memoryMb":{"type":"integer"},"egress":{"type":"string","enum":["deny","allowlist","open"]},"cpuClass":{"type":"string","enum":["standard","performance"]}}}},{"type":"null"}]},"warmPoolMode":{"type":"string","enum":["auto","custom","off"]},"env":{"type":"array","items":{"type":"string"},"description":"Names of the variables the Dockerfile set with ENV. Every command gets them."},"latestBuild":{"anyOf":[{"$ref":"#/components/schemas/TemplateBuild"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"TemplateBuild":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["queued","building","sealing","ready","failed","cancelled"]},"base":{"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"sizeBytes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"log":{"type":"string","description":"The end of the build output (GET /template-builds/{id} only)"},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"Volume":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sizeBytes":{"type":"integer","description":"Compressed size of the last save"},"attachedTo":{"anyOf":[{"type":"string","description":"The sandbox holding it"},{"type":"null"}]},"path":{"anyOf":[{"type":"string","description":"Where it was last put"},{"type":"null"}]},"savedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}}},"VolumeSave":{"type":"object","properties":{"volumeId":{"type":"string"},"name":{"type":"string"},"ok":{"type":"boolean"},"sizeBytes":{"type":"integer"},"error":{"type":"string"}}},"Metrics":{"type":"object","description":"Readings of the whole microVM, about once a minute while it runs, kept 7 days. CPU is % of the sandbox's vCPUs.","properties":{"sandboxId":{"type":"string"},"status":{"type":"string"},"cpus":{"type":"integer"},"memoryMb":{"type":"integer"},"sampledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"runtime":{"type":"object","properties":{"runningSec":{"type":"integer"},"pausedSec":{"type":"integer"}}},"cpu":{"type":"object","properties":{"currentPct":{"anyOf":[{"type":"number"},{"type":"null"}]},"averagePct":{"anyOf":[{"type":"number"},{"type":"null"}]},"peakPct":{"anyOf":[{"type":"number"},{"type":"null"}]}}},"memory":{"type":"object","properties":{"allocatedMb":{"type":"integer"},"currentMb":{"anyOf":[{"type":"integer"},{"type":"null"}]},"peakMb":{"anyOf":[{"type":"integer"},{"type":"null"}]}}},"disk":{"type":"object","properties":{"currentMb":{"anyOf":[{"type":"integer"},{"type":"null"}]},"peakMb":{"anyOf":[{"type":"integer"},{"type":"null"}]}}},"storage":{"type":"object","properties":{"volumes":{"type":"array","items":{"$ref":"#/components/schemas/Volume"}},"volumesBytes":{"type":"integer"}}},"egress":{"type":"object","properties":{"bytesOut":{"type":"integer"}}},"samples":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"cpuPct":{"anyOf":[{"type":"number"},{"type":"null"}]},"memoryMb":{"type":"integer"},"diskMb":{"type":"integer"}}}}}},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"string"},"description":"Event names or groups (sandbox.*, approval.*, *). Default: sandbox.*, approval.*, volume.save_failed"},"enabled":{"type":"boolean"},"failingSince":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastDeliveryAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastStatus":{"anyOf":[{"type":"integer"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"secret":{"type":"string","description":"Only when created or rotated: the signing secret (whsec_...). Shown once."}}},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","description":"Also the webhook-id header"},"event":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed"]},"attempts":{"type":"integer"},"nextAttemptAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastStatus":{"anyOf":[{"type":"integer"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"payload":{"type":"object"}}},"Snapshot":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["manual","checkpoint"]},"status":{"type":"string","enum":["creating","ready"]},"sizeBytes":{"type":"integer"},"sourceSandboxId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}}},"AuditEvent":{"type":"object","properties":{"seq":{"type":"integer"},"sandboxId":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorKind":{"type":"string"},"actorLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"detail":{"type":"object"},"createdAt":{"type":"string","format":"date-time"}}},"FileEntry":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"type":{"type":"string","description":"file or dir"},"size":{"type":"integer"},"modified":{"type":"string"}}},"Usage":{"type":"object","description":"Usage for the window. limits is set on plans with hard monthly limits (Free).","properties":{"since":{"type":"string","format":"date-time"},"plan":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"limits":{"anyOf":[{"type":"object","properties":{"usd":{"anyOf":[{"type":"number","description":"Free usage a month, in US dollars at list price"},{"type":"null"}]},"egressGb":{"anyOf":[{"type":"number"},{"type":"null"}]},"concurrent":{"type":"integer"}}},{"type":"null"}]},"sandboxes":{"type":"integer"},"executions":{"type":"integer"},"cpuHours":{"type":"number"},"gbHours":{"type":"number"},"egressGb":{"type":"number"},"pastCapStorageUsd":{"type":"number","description":"Files kept past the plan's paused-storage limit because a spend cap paused a sandbox. Charged on every plan, Free included."},"bySandbox":{"type":"array","description":"Each sandbox in the window, most expensive first (at most 100)","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"hours":{"type":"number"},"cpuHours":{"type":"number"},"gbHours":{"type":"number"},"egressBytes":{"type":"integer"},"priceUsd":{"type":"number"},"reserved":{"type":"boolean"}}}},"storage":{"type":"object","description":"What's stored now. Recorded; not billed yet.","properties":{"volumes":{"type":"integer"},"volumesGb":{"type":"number"},"snapshots":{"type":"integer"},"snapshotsGb":{"type":"number"}}}},"additionalProperties":true}},"responses":{"BadRequest":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing, invalid, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Not allowed, e.g. a read-only key writing (insufficient_scope) or a plan limit (plan_limit)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"LimitReached":{"description":"A monthly free limit is used up (usage_limit)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests (rate_limited)","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}