CH·02CLI reference

deeprelay billing subscription

Show your subscription status and quota usage

Show your subscription status and quota usage

Synopsis

Answers the question a plan customer asks before a long run: how much of my monthly quota is left?

Without it, the first sign that a quota is spent is a 429 in the middle of a batch. deeprelay billing subscription reports the same four meters the server enforces on every request, so you can see a limit coming.

  • Input tokens — weighted input tokens used this billing period, against
the monthly input allowance.
  • Output tokens — weighted output tokens used this period, against the
monthly output allowance. Reasoning tokens are output tokens.
  • Weekly tokens — weighted input + output over a rolling 7-day window,
against the weekly cap. It does not reset with the billing period; it slides.
  • Metered usage — list-price cost of this period's plan traffic, against
the per-period backstop.

"Weighted" is the part worth knowing: 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. Per-model factors are on the included-model list in the console.

When a meter is exhausted the request does not fail outright — it falls back to pay-as-you-go against your credit balance, at list rates. It only fails (429) when the balance is also empty. So the companion command to this one is deeprelay billing balance.

Not subscribed?

The command still works and still prints the allowances, with Plan: not subscribed — it doubles as "what would the plan give me". There is no error path for an org without a subscription.

Examples

# Where am I against the plan?
deeprelay billing subscription

# Am I subscribed at all, for a script?
deeprelay billing subscription --output json | jq -e .subscribed >/dev/null

# Refuse to start a batch with under 10% of the monthly input quota left.
deeprelay billing subscription --output json | jq -e '
  .usage != null
  and (1 - .usage.weighted_input_tokens / .quota.input_tokens_monthly) >= 0.10
' >/dev/null || { echo "input quota nearly spent"; exit 1; }

Output

Plan            subscribed (active)
Period          2026-09-03 → 2026-10-03 (UTC)
Input tokens    12.4M of 300M used (4.1%) — 287.6M left this period
Output tokens   1.8M of 30M used (6.0%) — 28.2M left this period
Weekly tokens   4.2M of 75M used (5.6%) — 70.8M left (rolling 7 days)
Metered usage   $3.10 of $100.00 used (3.1%) — $96.90 left this period

JSON mode returns the API response unchanged: subscribed, status, cancel_at_period_end, the period bounds, a quota object and — for an entitled subscription whose meter could be read — a usage object.

Two rules for scripts:

  • Read subscribed, not status. status carries Stripe's vocabulary, and
the two can disagree: an active subscription just past its period end still entitles for a short grace window, while past_due cuts access immediately.
  • A null usage never means "nothing used". It means either not subscribed
(check subscribed) or the meter could not be read. Treating it as zero would report a full quota to an org that has none left.
You wantCommand
Quota left on the plandeeprelay billing subscription
Credit left for pay-as-you-godeeprelay billing balance
Past consumption, broken downdeeprelay usage
Which models the plan coversdeeprelay models list (plan_covered)
deeprelay billing subscription [flags]

Options

  -h, --help   help for subscription

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

← The gpu CLI