Skip to content
sandboxrouting

Google Cloud Run sandboxes

cloudrun, free every month, gVisor isolation.

$5.22 every month

About 33 h of a 2 vCPU, 4 GiB sandbox a month, at $0.158/h with every vCPU busy. The router reserves that much for each live box, so it never runs past the tier.

Terms

Free usage
240k vCPU-s + 450k GiB-s (≈ $5.22; billing account)
Free limits
Preview; needs the execd image
Paid after
$0.158/h (2 vCPU / 4 GiB)
Card
required
Adapter's note
Instance-based free tier: 240,000 vCPU-seconds + 450,000 GiB-seconds a month per billing account (≈ 31 h at 2 vCPU / 4 GiB). Needs a billing account. Sandboxes and instances are Preview.
Checked
Nov 21, 2026 against cloud.google.com/run/pricing

Cloud Run sandboxes start only from inside a Cloud Run container, so each router sandbox is one Cloud Run instance (Preview) running templates/cloud-run-sandbox, which runs commands in a sandbox with sandbox exec. Cloud Run claims gVisor, the weaker of its two generations. Azure says Container Apps Sandboxes bill like the Consumption plan but lists no sandbox meter, so its Consumption rates and free grant are used; Azure deletes a sandbox a day after it stops, paused ones included. gke-agent-sandbox runs in your own cluster: it's priced at GKE Autopilot's pod rate. On a cluster whose nodes you already pay for, set "gke-agent-sandbox": { "pricing": { "vcpuSecondUsd": 0, "gibSecondUsd": 0 } }.

The adapter

Google Cloud Run sandboxes (Preview, July 2026): isolated sandboxes started from inside a Cloud Run container with the `sandbox` CLI, sharing that container's CPU and memory at no extra charge. There is no API to start one from outside, so each router sandbox is one Cloud Run *instance* (Preview: a singleton, addressable container) created through the Admin API from the image in templates/cloud-run-sandbox, whose execd runs every command in a detached sandbox with `sandbox exec`. https://docs.cloud.google.com/run/docs/code-execution https://docs.cloud.google.com/run/docs/reference/sandbox-cli https://docs.cloud.google.com/run/docs/configuring/instances/sandboxes (sandboxLauncher) https://docs.cloud.google.com/run/docs/instances/create-and-manage-instances https://run.googleapis.com/$discovery/rest?version=v2 (projects.locations.instances, rev 20261108) POST /v2/projects/{p}/locations/{r}/instances?instanceId=… → Operation GET /v2/projects/{p}/locations/{r}/instances/{name} {terminalCondition, urls, containers} GET /v2/projects/{p}/locations/{r}/instances?pageToken=… {instances, nextPageToken} DELETE /v2/projects/{p}/locations/{r}/instances/{name} Instances aren't offered in us-central1, us-east1 or europe-west1. Billing is Cloud Run's instance-based rate; the monthly free tier is a spending discount at Tier 1 prices. Cloud Run's first generation runs on gVisor (the second on microVMs), so it claims gvisor.

Keys
GOOGLE_CLOUD_PROJECT , CLOUD_RUN_REGION , CLOUD_RUN_SANDBOX_IMAGE + GOOGLE_OAUTH_ACCESS_TOKEN or GOOGLE_APPLICATION_CREDENTIALS(_JSON)
Connects through
REST run.googleapis.com/v2 (instances), plus execd (templates/cloud-run-sandbox)
Capabilities
create, exec and kill; files through exec
Isolation
gVisor
Operating system
Linux
Longest sandbox
no limit declared
Longest command
no cap declared
Timeout
The provider keeps it alive, so the router deletes it at the deadline
Billing
Wall clock, every second it runs
Source
src/providers/cloudrun.ts, and the provider’s site
Route only here
const sbx = await router.create({ providers: ["cloudrun"] });
Override its terms in sandboxrouting.json
{
  "providers": {
    "cloudrun": {
      "freeTier": {
        "kind": "monthly-credit",
        "usd": 5.22
      },
      "priority": 10
    }
  }
}