usage
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
--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
| Option | Type | Description |
|---|---|---|
--start | datetime | First day of the reporting window (YYYY-MM-DD). Defaults to the first of the current month. |
--end | datetime | Last day of the reporting window, inclusive (YYYY-MM-DD). Defaults to today. |
--pool | text[] | Restrict the report to this compute pool. Repeatable. Default: Sentinel.UNSET. |
-f, --format | choice | Output format for the report. Default: table. |
--sort-by | choice | Order pools by this measure, descending. Pools with no known rate sort last. Default: cost. |
--edition | choice | Snowflake edition; selects the standard standard. |
--rai-unit-price | float | Negotiated $/RAI Unit from your order document. Overrides the edition’s standard rate. |
--credit-price | float | Negotiated $/Snowflake credit. Overrides the edition’s standard rate. |
--summary | Boolean | Report totals only, without the per-pool breakdown. Default: False. |
-q, --quiet | Boolean | Print only the grand total. Implies —summary. Default: False. |
-o, --output-file | file | Write the report to PATH instead of stdout. Refuses to overwrite without —force. |
--force | Boolean | Overwrite an existing —output-file. Default: False. |
--open | Boolean | Open the written file with the platform viewer. Requires —output-file. Default: False. |