# Billing

What the service meters for your VM, how sleep changes it, and where to see your usage.

Source: https://slashinfra.com/docs/how/billing
Last modified: 2026-11-30T16:36:19.000Z

Billing meters CPU, memory, disk, saved memory and ingress, each on its own. CPU and memory count only while the VM runs, and storage keeps counting while it sleeps.

## What’s metered

| Meter | What it counts | When it counts |
| --- | --- | --- |   
| CPU | The VM’s base CPU | Each running second | 
| Memory | The VM’s full RAM | Each running second | 
| Disk | The blocks the VM’s disk holds on its node | As long as the VM exists | 
| Saved memory | Memory kept for a VM that sleeps in memory | As long as it is saved | 
| Ingress | Bytes the VM receives from the network | As they arrive |

CPU and memory are counted per running second at the VM’s full size, not by load. An agent waiting on its model costs the same as one compiling. Each running interval is rounded up to a whole second, so a VM that runs for 1.2 seconds is billed for 2.

Memory is the VM’s whole RAM, whatever its programs use. Disk is counted by the blocks it holds on its node, not by its nominal capacity. The disk is sampled every 60 seconds.

Saved memory is storage. Storage is sampled once an hour. Ingress counts bytes the VM receives. The usage record has no count for bytes it sends.

## While it sleeps

While your VM sleeps, it costs only storage. Its disk keeps counting, and so does its saved memory if it sleeps in memory. CPU and memory stop counting the moment it sleeps. See [sleep and wake](https://slashinfra.com/docs/how/sleep-and-wake) for when a VM sleeps.

## Shared and dedicated

Every VM is shared or dedicated, and each tier has its own CPU and memory meters. A shared VM can use up to twice its base CPU when the node has spare capacity. The shared CPU meter counts only the base, so CPU above base is not metered.

A dedicated VM gets whole physical cores, and its CPU ceiling is its base. A VM reports only the meters of its own tier.

## See your usage

The [Usage](https://app.slashinfra.com/usage) page shows the last 24 hours, or the last 7 or 30 days. It shows your plan next to the totals.

To read the same totals in code, call [`GET /usage`](https://slashinfra.com/docs/api-reference/control/usage#getUsage). It returns the totals of one project for all its VMs, and each VM’s own totals, between two times. `project` takes an id or name and defaults to `default`. `from` and `to` take milliseconds since the Unix epoch. They default to the start of the current UTC month and to now.

```bash
SI_API_KEY=<your-api-key>
curl -sS "https://api.slashinfra.com/usage?project=default" \
-H "Authorization: Bearer $SI_API_KEY"
```

The reply is `{from_ms, to_ms, totals, plan, svms}`. The `totals` object has these fields:

| Field | Unit |
| --- | --- |   
| `running_ms` | Milliseconds the VM ran | 
| `shared_cpu_milli_s` | Shared CPU, millicore-seconds | 
| `dedicated_cpu_milli_s` | Dedicated CPU, millicore-seconds | 
| `shared_memory_mib_s` | Shared RAM, MiB-seconds | 
| `dedicated_memory_mib_s` | Dedicated RAM, MiB-seconds | 
| `disk_mib_ms` | Disk, MiB-milliseconds | 
| `ingress_bytes` | Bytes received | 
| `storage_byte_s` | Saved storage, byte-seconds, organization total only |

The full schema is in the [Control API reference](https://slashinfra.com/docs/api-reference/control/usage#getUsage).

## Next

- [Sleep and wake](https://slashinfra.com/docs/how/sleep-and-wake): choose when an idle VM sleeps, which sets how much running time is metered. 
- [Limits](https://slashinfra.com/docs/reference/limits): the service limits for each setting.
