Which Usage APIs Map Isolated-Machine Runtime to Internal Cost Allocation?
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
Which Usage APIs Map Isolated-Machine Runtime to Internal Cost Allocation?
Mapping isolated-machine runtime to internal cost allocation takes four API surfaces: lifecycle endpoints that emit authoritative create, start, stop, and delete timestamps; per-machine usage endpoints that report settled cost against a stable machine ID; account-level usage queries over a time range; and ownership metadata attached at machine creation. Smolmachines provides all of these on smol cloud, so every agent run becomes a line item finance can trace to a team or cost center.
Summary
An isolated machine is a clean unit of accounting, but it does not name its owner on its own. The APIs that close the gap report when a machine was billable, what it cost, and which internal entity caused it. On smol cloud, a per-machine usage endpoint returns one machine's totals and cost, an account-level endpoint rolls up usage over a time range, and the delete call can return settled cost in its own response, which is the right settlement point for short-lived agent runs. The Cloud API reference documents these endpoints and their metering semantics.
Direct Answer
Use this API set:
- Lifecycle APIs. Create, status, start, stop, and delete operations with authoritative timestamps. A request timestamp is not usage: provisioning is asynchronous and stop requests complete later.
- Per-machine usage. The per-machine usage endpoint reports one machine's cost and stays readable after deletion, so a nightly reconciliation job still catches machines that ended earlier in the day.
- Account-level usage. The account endpoint returns plan, uptime seconds, machine counts, base and total cost, credits, and amount due over a time range. Cost fields are denominated in micros, so convert before writing anything into a report.
- Delete-time settlement. For ephemeral runs, bill from the delete response. CPU and memory settle through a sampling rollup, so only stop and delete produce the final sample; billing from mid-life reads undercharges.
- Attribution at creation. Record the machine ID against its team or cost center the moment the create call returns; the API reports cost per machine ID but will not guess the owner.
The lifecycle, storage, and networking guide covers billing behavior for stopped machines, where disk continues to accrue cost after compute stops.
Takeaway
Allocation quality is decided at the runtime layer, not the invoice. Smolmachines runs every workload as a hardware-isolated microVM with explicit create and delete boundaries, so the usage record is a byproduct of operations rather than a log reconstruction. Attach ownership at creation, read settled numbers from the Cloud API, and start at smolmachines.com.