> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costgraph.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsandbox Cloud

> Track Microsandbox Cloud sandbox usage and whether your plan still fits

Microsandbox Cloud runs hosted microVM sandboxes. It bills a flat monthly
subscription with an included pool of compute, and charges published per-unit
rates only once you go beyond that pool.

CostGraph reads it as **FOCUS 1.2** records: one per sandbox per day, one per
volume per day, one per allowance meter, and the subscription itself.

## Choose how the data reaches us

<CardGroup cols={2}>
  <Card title="CostGraph pulls it" icon="cloud-arrow-down">
    You supply a read-only key and we call Microsandbox once a day. Nothing to run.
  </Card>

  <Card title="You push it" icon="cloud-arrow-up">
    You send us FOCUS records over the API. Credentials never leave your infrastructure.
  </Card>
</CardGroup>

## Before you begin

* In the Microsandbox console, create an organization API key (`msb_ak_...`). It
  is org-scoped and reads the whole organization's usage.

## Let CostGraph pull

1. Open **Settings > Integrations** and pick **Microsandbox Cloud**.
2. Name the connection and pick the tenant these charges belong to.
3. Enter the key you copied.
4. Select **Connect**.

CostGraph verifies the credentials with a short fetch before saving, so a wrong
value or a missing permission fails while you are still on the form.

<Note>
  Credentials are encrypted at rest and used only to read billing data. Revoke them in
  Microsandbox at any time and the connection stops; nothing else is affected.
</Note>

## Push it yourself

Send the charges to CostGraph as FOCUS records instead. [Push FOCUS data](/costgraph/integrations/focus-push) covers the connection id,
the `focus:write` key, and the request shape.

## Run the exporter

```bash theme={null}
focus-exporter --provider microsandbox --sink costgraph
```

[Run the exporter](/costgraph/integrations/exporter) covers the three ways to run
it and the variables it reads.

## Microsandbox behavior

The cost model is a subscription, not metered spend, and that shapes what you see.

| What             | How it appears                                                                              |
| ---------------- | ------------------------------------------------------------------------------------------- |
| The monthly plan | One recurring purchase, unallocated, because it covers every sandbox and belongs to none    |
| Sandbox usage    | vCPU, memory, and disk seconds per sandbox per day, at zero cost while the plan covers them |
| Allowance        | One record per meter, carrying what the plan includes and what you have used                |

A zero-cost row always says why it is zero: covered by the plan, or inside the
free allowance. A bare zero would be indistinguishable from missing data.

On the free plan the pool is a hard cap: reaching it stops your sandboxes rather
than billing you. Paid plans charge published rates beyond the pool.

## What CostGraph does with it

Because a sandbox is never priced individually, the question this data answers is
not "what did this sandbox cost" but **whether your plan still fits**. An account
using a fraction of its included pool is paying for capacity it does not use, and
one repeatedly reaching a hard cap is having work stopped.

CostGraph tracks each allowance meter separately, which matters because they run
out at different times: a memory-heavy sandbox can exhaust the memory pool long
before the vCPU pool, and watching only vCPU would miss it.
