Templates and sizing
Every machine you make for a user needs a template and a size. This page covers the defaults a platform builder sets, and where the full resource contracts live.
Templates
A platform typically starts every user’s machine from one template.
Sizes and idle defaults
Sizes, named resource contracts, and idle auto-pause defaults are documented once, for every sandbox:
- Sizing and limits: size names, resource ranges, and the idle auto-pause default.
- Timeouts:
timeout_sec,always_on, andidle_timeout_sec. - Sandbox lifecycle: pause, resume, and persistence.
Cap concurrency and runtime, and set idle timeouts so unused machines pause.
Quotas and caps
One machine per end user. Set per-user limits so one account cannot exhaust the organization’s capacity: Quotas.
Costs and billing
Every usage event carries the workspace, project, and your external_* IDs.
Group by whichever one you charge on.
const report = await miosa.usage.report({
period: { start: "2026-05-01", end: "2026-06-01" },
groupBy: ["external_workspace_id"],
})
for (const row of report.data) {
await charge(row.external_workspace_id, row.total_usd)
} MIOSA sends the organization one invoice for everything.
It does not bill your customers.
You decide the markup and charge them on your own system.
Subscribe to signed lifecycle events with miosa.webhooks.create, and verify the x-miosa-signature HMAC (SHA-256 of the raw body) before acting on a delivery.
See Usage and billing and Webhooks.
Persist workspace_id and project_id beside your own IDs on first create.
Query usage every period and enforce your own spend caps.