CH·02CLI reference

deeprelay quota

Show remaining subscription quota (monthly and rolling weekly)

Show remaining subscription quota (monthly and rolling weekly)

Synopsis

Answers one question at a glance: how much of my plan can I still spend?

deeprelay quota shows what is left on the three token meters the server enforces on every request, plus the date the monthly meters reset:

  • Monthly input: weighted input tokens left this billing period.
  • Monthly output: weighted output tokens left this period. Reasoning tokens are output tokens.
  • Weekly: weighted input + output left in a rolling 7-day window. It slides rather than resets, so it has no reset date.
  • Resets: when the monthly meters start over (the end of the current billing period, UTC).
  • Wallet-billed calls (24h): how many of your calls in the last 24 hours were billed to your credit balance instead of the plan (see PAYG indicator below).

All figures are weighted tokens, the same units the server gates on and the same units as the x-deeprelay-quota-* response headers. A model's usage factor multiplies what its tokens cost you against quota: at factor 2, a million served tokens spend two million of the allowance.

For used-versus-included figures and the metered-cost backstop, use deeprelay billing subscription.

--short: one stable line

--short prints a single line for status bars, prompts and scripts. Its grammar is stable: new information is only ever appended at the end.

in:<remaining>/<limit> out:<remaining>/<limit> wk:<remaining>/<limit>[ payg]
$ deeprelay quota --short
in:212.4M/300M out:28.1M/30M wk:61.0M/75M
  • Numbers use K/M/B suffixes. Remaining always shows one decimal and rounds down, so the line never overstates what is left. Limits drop a trailing .0.
  • A meter with no cap configured prints as wk:unlimited (or in: / out:).
  • An org without an active subscription prints no subscription and exits 0, so a status line never errors.
  • A subscriber whose usage meter could not be read prints quota unavailable rather than a figure. It never shows a full quota it cannot confirm.
  • --short prints this line even when stdout is not a terminal. Pass -o json explicitly to get JSON instead.

The PAYG indicator

When at least one of your calls in the last 24 hours was billed to your credit balance while you were subscribed, the line ends with a single payg token:

in:212.4M/300M out:28.1M/30M wk:61.0M/75M payg

A subscribed call falls back to pay-as-you-go, at list price, when the plan cannot cover it. That happens when a request's input exceeds the monthly input quota you have left, when a meter is exhausted, or when the model is not in the plan. The indicator makes those fallbacks visible before they show up on your balance. "Recent" means the last 24 hours, clamped to the start of the current billing period.

The count comes from the server's usage.recent_payg_calls_24h field. When the server does not report it (an older server, or a failed read), the token is simply absent, and the rest of the line is unchanged.

Machine-readable output

-o json (with or without --short) prints raw integers:

deeprelay quota --short -o json
{
  "subscribed": true,
  "meter_available": true,
  "monthly_input_remaining": 212400000,
  "monthly_input_limit": 300000000,
  "monthly_output_remaining": 28100000,
  "monthly_output_limit": 30000000,
  "weekly_remaining": 61000000,
  "weekly_limit": 75000000,
  "resets_at": "2026-10-03T00:00:00Z",
  "recent_payg_calls_24h": 0
}
  • A remaining value of -1 means that meter has no cap.
  • recent_payg_calls_24h is null when the server did not report it.
  • A non-subscriber gets "subscribed": false with every figure zero.
  • "meter_available": false means the meter could not be read, so the zero remaining figures mean "unknown", not "none left".

Examples

# Where do I stand?
deeprelay quota

# Stop a batch when under 10M weighted input tokens are left this month.
left=$(deeprelay quota --short -o json | jq '.monthly_input_remaining')
[ "$left" -ge 10000000 ] || { echo "input quota nearly spent"; exit 1; }
You wantCommand
Used vs included, plus the cost backstopdeeprelay billing subscription
Credit left for pay-as-you-godeeprelay billing balance
Past consumption, broken downdeeprelay usage
deeprelay quota [flags]

Options

  -h, --help    help for quota
      --short   One stable line for status bars and scripts

Options inherited from parent commands

      --api-base string   API base URL (override with DEEPRELAY_API_BASE env) (default "https://api.deeprelay.ai/v1")
      --debug             Enable debug logging to stderr
      --no-preflight      Skip the plan/credit check before inference requests (override with DEEPRELAY_NO_PREFLIGHT env)
  -o, --output string     Output format: table|json (default table on TTY, json otherwise) (default "table")

SEE ALSO

  • deeprelay - deeprelay command-line interface

← The gpu CLI