GET /v1/sandboxes/{sandbox_id}/stats
CPU, memory, disk and process counts of a running sandbox, read now and run no command in it. cpu.percent is the share of all the sandbox's vCPUs that was busy over the last cpu.interval_ms: since your previous stats read of this sandbox when that was 1 second to 5 minutes ago, else over 250 ms. Memory is the guest kernel's own count (MemTotal and MemAvailable). disk (the root filesystem) and processes.total are null in a sandbox whose image predates them. Poll it no faster than every 2 seconds. A paused or stopped sandbox answers 409 sandbox_not_running.

Authentication

Bearer Token (b3os_sk_ API key or b3os_pat_ token)

Path Parameters

sandbox_id string required path
The sandbox ID (sbx_…).
Pattern ^sbx_[0-9a-hjkmnp-tv-z]{26}$
Example: "sbx_01m5t68q1b590rj801nbzsqzkk"

Responses

200 What the sandbox uses now.
application/json
object string REQUIRED
Values sandbox_stats
sandbox_id string REQUIRED
taken_at string (date-time) REQUIRED
When the node read it.
cpu object REQUIRED
percent number | null REQUIRED
The share of all the sandbox's vCPUs that was busy over interval_ms, one decimal (100 is every vCPU busy). Null when the node could not read the sandbox's CPU counter.
vcpu integer REQUIRED
The sandbox's vCPUs.
interval_ms integer | null REQUIRED
The window percent covers.
memory object REQUIRED
used_bytes integer REQUIRED
total_bytes minus available_bytes.
available_bytes integer REQUIRED
What the guest kernel can still give programs (MemAvailable).
total_bytes integer REQUIRED
The memory the guest kernel manages (MemTotal), a little under the sandbox's memory_mib.
disk object | null REQUIRED
The root filesystem, or null in a sandbox whose image does not report it.
used_bytes integer REQUIRED
total_bytes integer REQUIRED
processes object REQUIRED
running integer REQUIRED
Background processes started with exec that still run (as GET …/processes lists them).
total integer | null REQUIRED
Every user process in the sandbox, kernel threads left out; null in a sandbox whose image does not report it.
400 The request failed validation (invalid_request, invalid_url).
401 Missing, malformed, expired or revoked credentials (unauthorized).
403 Authenticated but not allowed (forbidden, egress_denied).
404 No such sandbox in this project (sandbox_not_found).
409 The sandbox is paused or stopped (sandbox_not_running).
429 A rate, concurrency or quota limit applies (rate_limited, concurrency_limited, quota_exceeded).
500 Something failed inside B3OS (internal). Retry with backoff.
502 The agent inside the microVM did not answer (guest_unreachable).
503 The node or the product is not available right now (node_unavailable, product_unavailable, capacity_unavailable).
curl -X GET 'https://beta-api.b3os.org/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/stats' \  -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/stats', {  method: 'GET',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN"  }});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://beta-api.b3os.org/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/stats', headers=headers)print(response.json())
200 Response
{  "object": "sandbox_stats",  "sandbox_id": "sbx_01m5t68q1b590rj801nbzsqzkk",  "taken_at": "2026-11-10T19:30:00.123Z",  "cpu": {    "percent": 12.5,    "vcpu": 2,    "interval_ms": 5000  },  "memory": {    "used_bytes": 381681664,    "available_bytes": 1706033152,    "total_bytes": 2087714816  },  "disk": {    "used_bytes": 1610612736,    "total_bytes": 4227858432  },  "processes": {    "running": 1,    "total": 7  }}
Ask a question... ⌘I