Skip to content

usage

Terminal window
rai usage [OPTIONS]

Report RAI credit consumption and estimated cost for the account.

Converts each RAI compute pool’s Snowflake credits into node-hours and RAI Units, then prices them at your edition’s list rates. Either rate can be replaced with a negotiated one from your order document: --rai-unit-price for /Snowflake credit. Both prices actually applied are printed in the report header. Dollar figures are estimates — actual invoiced amounts depend on your Snowflake contract.

--pool matches case-insensitively, since Snowflake upper-cases unquoted identifiers.

The default window is the current billing month, which is a calendar month: the first of this month through today. SNOWFLAKE.ACCOUNT_USAGE can lag real usage by up to ~3 hours, so the most recent hours may be missing or incomplete. A month-to-date total is therefore a moving figure — it grows as new hourly rows land, so two runs minutes apart can legitimately differ; pass an --end in the past for a stable, closed period.

Reads are scoped to the connected account — ACCOUNT_USAGE cannot see another account. Use the root --profile flag to report on a different one, and the root --no-color flag to drop ANSI styling.

-o/--output-file writes the report to a path instead of stdout, in any format, and refuses to overwrite an existing file unless --force is given. It does not open what it writes: add --open when you want that, so saving a file and launching an application stay separate decisions.

 Examples: rai usage rai usage —start 2026-07-01 —end 2026-07-31 rai usage —edition enterprise —sort-by node-hours rai usage —rai-unit-price 1.75 —credit-price 2.85 rai usage —pool RAI_POOL_S —pool RAI_POOL_M rai usage -f csv -o usage.csv rai usage -f html -o usage.html —open rai usage —format csv > usage.csv rai usage —quiet rai usage —json

Options

OptionTypeDescription
--startdatetimeFirst day of the reporting window (YYYY-MM-DD). Defaults to the first of the current month.
--enddatetimeLast day of the reporting window, inclusive (YYYY-MM-DD). Defaults to today.
--pooltext[]Restrict the report to this compute pool. Repeatable. Default: Sentinel.UNSET.
-f, --formatchoiceOutput format for the report. Default: table.
--sort-bychoiceOrder pools by this measure, descending. Pools with no known rate sort last. Default: cost.
--editionchoiceSnowflake edition; selects the standard /credit list rates. Default: standard.
--rai-unit-pricefloatNegotiated $/RAI Unit from your order document. Overrides the edition’s standard rate.
--credit-pricefloatNegotiated $/Snowflake credit. Overrides the edition’s standard rate.
--summaryBooleanReport totals only, without the per-pool breakdown. Default: False.
-q, --quietBooleanPrint only the grand total. Implies —summary. Default: False.
-o, --output-filefileWrite the report to PATH instead of stdout. Refuses to overwrite without —force.
--forceBooleanOverwrite an existing —output-file. Default: False.
--openBooleanOpen the written file with the platform viewer. Requires —output-file. Default: False.

See Also