CH·02CLI reference

deeprelay preflight

Check whether a model is covered by your plan and payable

Check whether a model is covered by your plan and payable

Synopsis

Answers "what happens if I call this model right now?" before you call it — whether your plan covers it, whether you are subscribed, and whether there is credit to pay if it is not covered.

This is the same check deeprelay chat, deeprelay embeddings, deeprelay image and deeprelay video create run automatically. Those commands stay quiet when the answer is unremarkable; this one always prints.

deeprelay/llama-3.3-70b-instruct

! This model is not covered by your plan — it will be billed pay-as-you-go
  from your credit balance. Run `deeprelay models list` to see which models
  the plan includes.

Plan covers this request: no
You are subscribed:       yes
Credit available:         yes

Nothing is sent, counted, reserved or charged. It reads the state of the same gates the real request is judged by — plan coverage, subscription entitlement, remaining plan quota, credit balance and spending caps — so the advice cannot drift from enforcement.

Which gates apply depends on the model. Chat, embeddings and image requests meet all of them. Video creation meets only the credit check: it is not covered by the plan, and it does not honour your daily or monthly spending caps. So a video model reports plan_covered: false even if it appears on the plan's model list, and reports fundable while you are over your own cap — because that is what POST /v1/videos will actually do.

Verdicts

verdictMeaning
okThe request will be served. Covered by the plan, or payable from credit.
warnIt will be served and charged in a way you may not expect.
blockIt will be refused (402 or 429).

warn is the case this command exists for. A subscription covers part of the catalog; calling anything outside it bills pay-as-you-go, and the response to the request itself never says so. The first signal used to be the invoice.

reason carries a stable code for scripts: plan_covered, payg, not_plan_covered, subscription_quota_exhausted, insufficient_balance, daily_limit_reached, monthly_limit_reached.

Turning it off

The automatic check adds one request before each inference call — which also means it draws one token from the same per-key rate-limit bucket the inference call itself uses. That is invisible by hand and matters in a tight scripted loop, so batch runners should turn it off and check once up front instead:

deeprelay chat deeprelay/deepseek-v4-flash "hello" --no-preflight
export DEEPRELAY_NO_PREFLIGHT=1          # same, for a whole session

Skipping changes nothing about what you are charged — the server enforces the same rules either way. You lose the warning, not the protection. If the check cannot run at all (older deployment, network blip) the request proceeds silently; it never blocks on its own failure.

Examples

# Will this cost me money?
deeprelay preflight deeprelay/deepseek-v4-flash

# Gate a batch run on it.
deeprelay preflight "$MODEL" --output json | jq -e '.verdict != "block"' \
  || { echo "cannot run $MODEL right now"; exit 1; }

# Refuse to spend anything outside the plan.
deeprelay preflight "$MODEL" --output json | jq -e .plan_covered >/dev/null \
  || { echo "$MODEL is not in the plan"; exit 1; }
deeprelay preflight <model> [flags]

Options

  -h, --help   help for preflight

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