path idstringrequiredquery fromstring2026-05-27, interpreted
as UTC midnight) or an RFC3339 timestamp. Default: now minus 1 hour.query tostringfrom. Default: now. Window
must be ≤ 30 days.sandboxIdstringrequiredaliasstringfromstringrequiredfrom, or the server default (now - 1h) when omitted.tostringrequiredto, or the server
default (now) when omitted.totalsobjectrequiredpoints[] — useful for getting
the headline numbers without iterating.memoryAllocatedGbSecondsnumberrequired3600.memoryUsedGbSecondsnumberrequiredmemoryAllocatedGbSeconds to
see headroom — 1 - used/allocated is wasted provisioning.uptimeSecondsintegerrequired3600.memoryAllocatedPeakMbintegerrequiredmemoryUsedPeakMbintegerrequiredpointsobject[]required[from, to).
Buckets are minute-aligned in UTC. Boundary buckets are clamped to
the original window — a mid-minute from produces a partial first
bucket whose integrals reflect only the overlap with the requested
range.0 rather than as
missing entries — gaps read as continuous flat zero on a chart.tsstringrequired[ts, ts + 1 minute).memoryAllocatedGbSecondsnumberrequiredtotals.memoryAllocatedGbSeconds exactly.memoryUsedGbSecondsnumberrequiredtotals.memoryUsedGbSeconds.uptimeSecondsintegerrequired60; 0 when not running; a fractional value (e.g., 30)
appears in the resize or start/stop bucket where the sandbox
began or ended part-way through the minute.allocatedMemoryMbintegerrequired3072).
Designed to render directly as a step line on a chart.usedMemoryMbAvgintegerrequiredusedMemoryMbPeakintegerrequired*GbSeconds fields are GiB-seconds (binary, 230
bytes/GiB), not decimal GB. For a sandbox provisioned at 1024 MiB
running for one minute, memoryAllocatedGbSeconds is
1024/1024 × 60 = 60. For a measured RSS of 612 MiB,
memoryUsedGbSeconds is 612/1024 × 60 ≈ 35.86.123456789101112131415161718192021222324252627282930313233{ "sandboxId": "sb-abc", "alias": "my-agent", "from": "2026-05-27T00:00:00Z", "to": "2026-05-28T00:00:00Z", "totals": { "memoryAllocatedGbSeconds": 86400, "memoryUsedGbSeconds": 51640, "uptimeSeconds": 86400, "memoryAllocatedPeakMb": 1024, "memoryUsedPeakMb": 742 }, "points": [ { "ts": "2026-05-27T00:00:00Z", "memoryAllocatedGbSeconds": 60.0, "memoryUsedGbSeconds": 35.86, "uptimeSeconds": 60, "allocatedMemoryMb": 1024, "usedMemoryMbAvg": 612, "usedMemoryMbPeak": 720 }, { "ts": "2026-05-27T00:01:00Z", "memoryAllocatedGbSeconds": 60.0, "memoryUsedGbSeconds": 40.02, "uptimeSeconds": 60, "allocatedMemoryMb": 1024, "usedMemoryMbAvg": 683, "usedMemoryMbPeak": 742 } ] }
GET /api/usage
— that endpoint serves cross-sandbox aggregates and supports
filter/sort/cursor. The per-sandbox endpoint here is for "look at
this one sandbox in detail."