The usage endpoint returns the metered totals of one project’s VMs between two times: CPU, memory, disk, running time and ingress, plus the organization’s retained object storage. The default range is the start of this UTC month to now.
Get usage
Section titled “Get usage”The VM totals cover one project. project takes a name or id and defaults to default; an unknown project, or one outside the key’s scope, answers 404 project_not_found.
- Open the Usage page.
- Select 24h, 7d or 30d. 24h is selected first.
- Read the totals in CPU, Memory, Disk, Running time and Ingress.
- Read Per SVM for each VM’s own totals, and select CPU to change the sort.
- Read the plan block, whose heading names the plan, for the plan’s limits and the project’s use.
The dashboard’s range totals are of the default project, whatever the Project menu names. A request names another project with project.
The sample reads default for one UTC day, 26 November 2026.
curl -sS "https://api.slashinfra.com/usage?project=default&from=1795651200000&to=1795737600000" \ -H "Authorization: Bearer $SI_API_KEY"API reference: Control API operation
{"project":"proj_6f1c0f0e8a","from_ms":1795651200000,"to_ms":1795737600000,"totals":{"running_ms":7658970,"shared_cpu_milli_s":12085296,"dedicated_cpu_milli_s":0,"shared_memory_mib_s":24750685,"dedicated_memory_mib_s":0,"disk_mib_ms":116486423263,"ingress_bytes":2500225562,"storage_byte_s":490182295564801},"plan":{"id":"standard","max_svms":5,"max_snapshots":50,"max_open_ports":50,"max_url_ttl_s":2592000,"inbox_allowed":true,"public_ports_allowed":true,"schedules_max":10,"schedule_min_interval_s":300,"stream_max_s":3600},"svms":[{"id":"6f1c0f0e8a","totals":{"running_ms":1553000,"shared_cpu_milli_s":1553000,"dedicated_cpu_milli_s":0,"shared_memory_mib_s":3180544,"dedicated_memory_mib_s":0,"disk_mib_ms":69846105245,"ingress_bytes":56214}},...]}import os, requests
res = requests.get( "https://api.slashinfra.com/usage", headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"}, params={"project": "default", "from": 1795651200000, "to": 1795737600000},)res.raise_for_status()data = res.json()print(data["project"], data["totals"]["running_ms"], data["plan"]["id"])proj_6f1c0f0e8a 7658970 standardconst res = await fetch('https://api.slashinfra.com/usage?project=default&from=1795651200000&to=1795737600000', { headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}` },})if (!res.ok) throw new Error(await res.text())const data = (await res.json()) as { project: string; totals: { running_ms: number }; plan: { id: string } }console.log(data.project, data.totals.running_ms, data.plan.id)proj_6f1c0f0e8a 7658970 standardRead the response
Section titled “Read the response”The answer names the project and the two times, then gives the totals, the plan and one entry per VM.
| Field | Type | What it is |
|---|---|---|
project |
string | The project id whose VMs the totals cover. |
from_ms |
integer | The first time of the sum, in Unix epoch milliseconds: the start of the hour of from. |
to_ms |
integer | The last time of the sum, in Unix epoch milliseconds: the end of the hour of to. |
totals |
object | The project’s VM totals, plus the organization’s retained storage. |
plan |
object | The organization’s plan and its limits. |
svms |
array | One entry per VM with a usage record in the range. |
Scroll horizontally to see all columns.
Totals
Section titled “Totals”| Field | Type | What it is |
|---|---|---|
running_ms |
integer | Time that the VM ran, in milliseconds. Each running interval is billed in whole seconds rounded up, and a stopped or paused VM adds nothing. |
shared_cpu_milli_s |
integer | CPU time of the shared tier, in millicore-seconds: the base CPU millis times the running seconds, so a 2048 MiB shared VM adds 1000 per second. A dedicated VM adds nothing. |
dedicated_cpu_milli_s |
integer | CPU time of the dedicated tier, in millicore-seconds: the base CPU millis times the running seconds, so a 4096 MiB dedicated VM adds 2000 per second. A shared VM adds nothing. |
shared_memory_mib_s |
integer | RAM of the shared tier, in MiB-seconds: the VM’s RAM times the running seconds, so a 2048 MiB shared VM adds 2048 per second. A dedicated VM adds nothing. |
dedicated_memory_mib_s |
integer | RAM of the dedicated tier, in MiB-seconds: the VM’s RAM times the running seconds, so a 4096 MiB dedicated VM adds 4096 per second. A shared VM adds nothing. |
disk_mib_ms |
integer | Allocated local disk, in MiB-milliseconds: the host blocks the image holds, not the nominal disk size, counted while the VM exists, including while it sleeps. |
ingress_bytes |
integer | Bytes that the VM received from the network. |
storage_byte_s |
integer | Retained object storage of the organization, in byte-seconds: the hourly total of the stored body bytes in the cold tier, for the part of each hour in the range. A missing hour counts zero, a shared object counts once, and there is no per-VM total. |
Scroll horizontally to see all columns.
Per VM
Section titled “Per VM”Each svms[] entry has an id and a totals object with the seven node metrics above, without storage_byte_s.
| Field | Type | What it is |
|---|---|---|
id |
string | The VM id. |
totals |
object | The seven node metrics for this VM. |
Scroll horizontally to see all columns.
| Field | Type | What it is |
|---|---|---|
id |
string | The plan id: standard, pro, or a custom enterprise plan id. |
max_svms |
integer | The most VMs that the organization may have at once. |
max_snapshots |
integer | The most ready and creating snapshots that the organization may have. |
max_open_ports |
integer | The most ports of one VM that may be open at once. |
max_url_ttl_s |
integer | The longest life of a preview link, in seconds. |
inbox_allowed |
boolean | Whether a VM of the organization may receive email. |
public_ports_allowed |
boolean | Whether a port of a VM may be public. |
schedules_max |
integer | The most schedules that one VM may have. |
schedule_min_interval_s |
integer | The shortest gap between two fires of a schedule, in seconds. |
stream_max_s |
integer | The longest server-sent event stream or watch of a VM, in seconds. |
Scroll horizontally to see all columns.
What is metered
Section titled “What is metered”The service meters CPU, memory, disk, saved memory and ingress. CPU and memory count each running second; disk counts while the VM exists, including sleep; saved memory counts while it is kept; ingress counts bytes the VM receives. Billing has the table and the sleep rules.
Options
Section titled “Options”| Field | Type | Default | Allowed values | What it changes |
|---|---|---|---|---|
project |
string | default |
A project name, or its proj_ id, in the key’s scope |
The project whose VMs the totals cover. Another project answers 404 project_not_found. |
from |
string | The start of this UTC month | A non-negative whole number of milliseconds; rounded down to the start of its hour | The first time of the sum. |
to |
string | Now | A non-negative whole number not before from; rounded up to the end of its hour |
The last time of the sum. |
Scroll horizontally to see all columns.
Errors
Section titled “Errors”| Code | When | Fix |
|---|---|---|
invalid_range |
from or to is not a non-negative whole number, or to is before from. |
Send both as Unix epoch milliseconds with from first. |
project_not_found |
project names no project in the organization or key scope. |
Use a project name or id in the key’s scope, or omit project. |
Scroll horizontally to see all columns.
Errors that any request can return are in the error catalog.
Permissions
Section titled “Permissions”| Operation | Who can | Key action |
|---|---|---|
| Get usage | Any member | usage:read |
Scroll horizontally to see all columns.
Limits
Section titled “Limits”- The default range starts at 00:00 UTC on the first day of the current month and ends now.
fromandtoare Unix epoch milliseconds; a running interval is billed in whole seconds rounded up.storage_byte_sis the organization’s retained object storage and has no per-VM total.- The standard plan returns
max_svms5,max_snapshots50 andmax_open_ports50; the pro plan returns 50, 200 and 50. - Usage is metered, not a quota; a VM is not stopped or refused at a CPU, memory or transfer total.
The full list is in Limits.
- Billing: what each meter counts and how sleep changes the bill.
- Limits: plan limits and the usage metrics.
- Control API usage: the operation, fields and status codes.