Skip to main content
You can read your organization’s sandbox usage and what it costs without opening the dashboard. Use the summary to see totals for the organization. Use the sandbox list to see the cost of each sandbox and project.
Requires tensorlake 0.5.160 or later for the CLI, Python SDK, and TypeScript SDK.

Prerequisites

  • You must be a member of the organization. Use an API key or a tl login session.
  • The SDKs need the organization ID. Pass it to the client or set TENSORLAKE_ORGANIZATION_ID.
  • The CLI reads the organization from your current context, from tl init, or from --organization.

Time window

Every read covers the current billing period by default. Set last to read the last 1d, 7d, or 30d instead, ending now. There are no other windows.

Organization summary

The summary shows the organization’s charge for the window, split by resource.

Cost per sandbox

The sandbox list shows each sandbox that ran in the window. For each one you get the resources it used and its share of the organization’s charge. The CLI also totals the charge per project.
The sandboxes’ amounts add up exactly to the organization total. project is empty for usage whose project was deleted.

Reading the amounts

  • Money is in minor units, such as cents. Python returns int. TypeScript and the CLI’s JSON return strings, so large amounts don’t lose precision. Quantities are Decimal in Python and strings in TypeScript.
  • Units are vCPU-hour for CPU, GiB-hour for memory, disk, and snapshot storage, and GiB for network egress.
  • The charge is metered usage only. It doesn’t include subscription fees or tax.
  • basis says where the total comes from. It is invoice for a finalized invoice and current_price_estimate otherwise. The CLI shows the second as “estimated”.
  • In the CLI JSON, the Charge column is attributedAmountMinor on each sandbox, and the total is attributedUsageCharge.

Plans with included usage

On plans that include usage, such as Pro, the charge only covers what you use beyond the included amount. Two more fields help here:
  • Included usage (included_usage) shows the allowance for the current billing period and how much of it you’ve used.
  • Usage value (usage_value in the summary, attributed_usage_value and usage_value_amount_minor in the sandbox list) is your usage priced at the plan’s overage rate, before the allowance. It’s set for every window.
The charge is empty when the window isn’t inside the current billing period, for example a 30-day lookback that started in the previous period. Use the usage value then. The CLI does this for you and shows a Usage value column. The charge is also empty when the organization has no metered price. In that case the CLI shows compute units instead.