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 loginsession. - 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. Setlast 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.- CLI
- Python
- TypeScript
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.- CLI
- Python
- TypeScript
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 areDecimalin Python and strings in TypeScript. - Units are
vCPU-hourfor CPU,GiB-hourfor memory, disk, and snapshot storage, andGiBfor network egress. - The charge is metered usage only. It doesn’t include subscription fees or tax.
basissays where the total comes from. It isinvoicefor a finalized invoice andcurrent_price_estimateotherwise. The CLI shows the second as “estimated”.- In the CLI JSON, the Charge column is
attributedAmountMinoron each sandbox, and the total isattributedUsageCharge.
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_valuein the summary,attributed_usage_valueandusage_value_amount_minorin the sandbox list) is your usage priced at the plan’s overage rate, before the allowance. It’s set for every window.