CLI & APICommand reference
stackblaze billing
Show plan, usage credit, and resource breakdown; `billing limit` sets the on-demand spending limit, `billing gpu-credit` the prepaid GPU credit
Usage: stackblaze billing [options] [command]
Show plan, usage credit, and resource breakdown; `billing limit` sets the
on-demand spending limit, `billing gpu-credit` the prepaid GPU credit
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
-p, --project <name> Project name
-e, --env <name> Environment name (default: production)
-a, --app <name> App name
--json Output JSON (same as -o json) (default: false)
-o, --output <format> Output format: text or json (choices: "text",
"json")
-h, --help Print help
Commands:
limit [options] [amount] Show or set the on-demand (overage) spending limit:
a USD amount per month, unlimited, or off
gpu-credit [options] Show the prepaid GPU credit that pays for AI model
GPU time, and recent top-ups; `add <amount>` buys
morebilling limit
Usage: stackblaze billing limit [options] [amount]
Show or set the on-demand (overage) spending limit: a USD amount per month,
unlimited, or off
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
-p, --project <name> Project name
-e, --env <name> Environment name (default: production)
-a, --app <name> App name
--json Output JSON (same as -o json) (default: false)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print help
On-demand spending lets usage beyond the plan's credit keep running and be
billed. "off" stops it at the plan (nothing extra is billed); an amount caps
the extra monthly spend; "unlimited" removes the cap. Turning it on needs a
payment method on file (the server answers 402 otherwise).
Examples:
$ stackblaze billing limit # show the current setting
$ stackblaze billing limit 25 # on, up to $25.00 a month
$ stackblaze billing limit unlimited
$ stackblaze billing limit offExample
Show the on-demand spending setting without changing it (pass an amount, unlimited or off to change it):
stackblaze billing limitOn-demand spending: on, no monthly limit
Change it: stackblaze billing limit <usd per month> | unlimited | offWith --json, monthlyLimitCents is null when there is no cap:
stackblaze billing limit --json{
"enabled": true,
"monthlyLimitCents": null,
"monthlyLimit": null,
"billable": true
}billing gpu-credit
Usage: stackblaze billing gpu-credit [options] [command]
Show the prepaid GPU credit that pays for AI model GPU time, and recent
top-ups; `add <amount>` buys more
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
-p, --project <name> Project name
-e, --env <name> Environment name (default: production)
-a, --app <name> App name
--json Output JSON (same as -o json) (default: false)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print help
Commands:
add [options] <amount> Buy GPU credit: prints the payment page for a
one-time payment of <amount> USD and opens it in the
browserbilling gpu-credit add
Usage: stackblaze billing gpu-credit add [options] <amount>
Buy GPU credit: prints the payment page for a one-time payment of <amount> USD
and opens it in the browser
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
-p, --project <name> Project name
-e, --env <name> Environment name (default: production)
-a, --app <name> App name
--json Output JSON (same as -o json) (default: false)
--no-browser Print the URL only; do not open the default browser
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print help
<amount> is in USD (25, $25 or 12.50) and is checked against the smallest
and largest top-up the server allows (exit 1 outside them). The credit is
added once the payment completes. Needs a role that may change billing
(exit 3 otherwise). The browser is opened only from a terminal, never with
--json or --no-browser.
Examples:
$ stackblaze billing gpu-credit # balance and recent top-ups
$ stackblaze billing gpu-credit add 25
$ stackblaze billing gpu-credit add 100 --no-browser --json | jq -r .urlExample
Buy $25 of prepaid GPU credit for AI models. The CLI prints the payment page (and opens it, when run from a terminal without --no-browser); nothing is charged until you pay there:
stackblaze billing gpu-credit add 25 --no-browserOK Pay for $25.00 of GPU credit here:
https://checkout.stripe.com/g/pay/cs_test_…#…
The credit is added to your workspace once the payment completes (see `stackblaze billing gpu-credit`).Amounts outside the allowed range are refused:
stackblaze billing gpu-credit add 5 --no-browserx The smallest top-up is $10.00.