Skip to main content

Usage & Quota

Bailian CLI command reference for usage statistics, rate-limit management, model permissions, and Token Plan.

Query usage statistics, manage rate limits and model permissions, and manage Token Plan seats from the terminal.
Append --help to any command for full parameter details, e.g. bl usage stats --help. Command details on this page are verified against bl 2.5.1.

Usage statistics

bl usage free

Query free-tier quota for models (all models if --model is omitted). Usage
bl usage free [--model <model>[,model2,...]] [flags]
ParameterTypeRequiredDescription
--model <model>stringnoModel name(s) to query, comma-separated for multiple; omit for all models
--expiring <days>stringnoOnly show quotas expiring within N days
--sort <field>stringnoSort by: remaining (ascending), expires (ascending)
--allswitchnoShow all models instead of the top rows
Example: Query free-tier quota for qwen3-max model
bl usage free --model qwen3-max

bl usage stats

Query model usage statistics. Usage
bl usage stats [--model <model>] [--days <days>] [flags]
ParameterTypeRequiredDescription
--model <model>stringnoModel name(s), comma-separated; omit for overview
--days <days>stringnoNumber of days (default: 7)
--type <type>stringnoModel type: Text, Vision, Multimodal, Audio, Embedding
Example: Query model usage statistics for last 30 days
bl usage stats --days 30

bl usage summary

Show a unified usage summary: free-tier quota and recent usage overview. Usage
bl usage summary [--days <days>] [flags]
ParameterTypeRequiredDescription
--days <days>stringnoNumber of days for the usage overview (default: 7)
Example: Show unified usage summary with 30-day overview
bl usage summary --days 30

bl usage freetier

Enable or disable auto-stop for free-tier models. Enables by default; use --off to disable. Usage
bl usage freetier <--model <model>[,model2,...] | --all> [--off] [flags]
ParameterTypeRequiredDescription
--model <model>stringnoModel name(s), comma-separated for multiple
--allswitchnoApply to all free-tier models
--onswitchnoEnable auto-stop (default behavior)
--offswitchnoDisable auto-stop
Example: Enable auto-stop for qwen3-max model
bl usage freetier --model qwen3-max

bl usage token-plan

Show Token Plan quota usage, including the monthly quota usage percentage and reset time. Usage
bl usage token-plan [flags]
This command only supports global flags. Example: Show Token Plan quota usage in JSON output
bl usage token-plan --output json

bl usage coding-plan

Show Coding Plan quota usage. Usage
bl usage coding-plan [flags]
This command only supports global flags. Example: Show Coding Plan quota usage in JSON output
bl usage coding-plan --output json

bl token-plan harness-quota

Show Token Plan harness entitlement quota usage. Usage
bl token-plan harness-quota [flags]
ParameterTypeRequiredDescription
--type <type>stringnoFilter harness list by type: official_tool, infrastructure
Example: Show harness entitlement quota for official_tool type
bl token-plan harness-quota --type official_tool

Rate-limit management

bl quota list

View model rate limits (QPM/TPM, account and workspace level). Requires API Key authentication. Usage
bl quota list [--model <model>] [--name <name>] [--page <n>] [--page-size <n>]
ParameterTypeRequiredDescription
--model <model>stringnoModel name(s), comma-separated (exact match)
--name <name>stringnoFuzzy search by model name
--page <n>numbernoPage number (default: 1)
--page-size <n>numbernoResults per page (default: 20)
Example: View rate limits for qwen3-max model
bl quota list --model qwen3-max
  • Usage-vs-limit pressure checks live in quota check (console auth).

bl quota check

Check current usage against rate limits. Usage
bl quota check [--model <model>] [flags]
ParameterTypeRequiredDescription
--model <model>stringnoModel name(s), comma-separated
--period <minutes>stringnoQuery usage for the last N minutes (default: 2)
Example: Check current usage against rate limits for qwen3.6-plus
bl quota check --model qwen3.6-plus

bl quota update

Update model rate limits (QPM/TPM). Requires API Key authentication. Usage
bl quota update --model <model> [--rpm <n>] [--tpm <n>]
ParameterTypeRequiredDescription
--model <model>stringyesModel name
--rpm <n>numbernoMax requests per minute (QPM)
--tpm <n>numbernoMax tokens per minute (TPM)
Example: Update rate limits for model qwen-plus with specified QPM and TPM
bl quota update --model qwen-plus --rpm 60 --tpm 100000
  • Fields you omit keep their current values (server-side OVERLAY merge). Clear all custom limits with the "quota delete" command instead.
  • Setting TPM without an existing QPM limit is rejected server-side — pass --rpm first or together.

bl quota delete

Clear all custom rate limits (QPM/TPM) for a model. Requires API Key authentication. Usage
bl quota delete --model <model>
ParameterTypeRequiredDescription
--model <model>stringyesModel name
--yesswitchnoConfirm this high-risk operation
This permanently clears all custom QPM/TPM rate limits for the specified model and cannot be undone.
Example: Clear custom rate limits for model qwen-plus
bl quota delete --model qwen-plus

bl quota history

View quota change history. Usage
bl quota history [flags]
ParameterTypeRequiredDescription
--page <n>stringnoPage number (default: 1)
--page-size <n>stringnoPage size (default: 10)
--model <model>stringnoFilter by model name
Example: View quota change history on page 2
bl quota history --page 2

Model permissions

bl permission grant

Grant model permissions (inference / finetune / deploy). Requires API Key authentication. Usage
bl permission grant --model <models> [--action <actions>] | --all
ParameterTypeRequiredDescription
--model <models>stringnoModel ID(s), comma-separated (max 20)
--action <actions>stringnoPermission action(s), comma-separated: inference, finetune, deploy (default: inference)
--allswitchnoOne-key grant inference for all models in the workspace (including future ones)
Example: Grant permissions for model qwen-plus
bl permission grant --model qwen-plus
  • Grants apply to the business workspace your API key belongs to.
  • --all maps to the server one-key switch (access_all_entities: OPEN) and only covers inference.
  • Actions you omit keep their current grants (server-side tri-state patch).

bl permission list

List model permissions (inference / fine-tune / deploy) in the workspace. Requires API Key authentication. Usage
bl permission list [--scope <scope>] [--model <model>] [--name <name>] [--page <n>] [--page-size <n>]
ParameterTypeRequiredDescription
--scope <scope>stringnoAuthorization scope: authorizable (default, full catalog), authorized
--model <model>stringnoModel ID (exact match)
--name <name>stringnoFuzzy search by model name or ID
--page <n>numbernoPage number (default: 1)
--page-size <n>numbernoResults per page (default: 20)
Example: List permissions for model qwen-plus in workspace
bl permission list --model qwen-plus
  • Default scope is authorizable (the full grantable catalog); use --scope authorized to see only models already granted.
  • Output defaults to JSON; pass --output text for a table. Permission values are tri-state: true / false / null (never set).
  • Values mirror the server's grant records as-is for the workspace bound to your API key. A model reporting false/null can still be callable (access may come from other channels); see the Model Studio authorization docs for the exact semantics.

bl permission revoke

Revoke model permissions (inference / finetune / deploy). Requires API Key authentication. Usage
bl permission revoke --model <models> [--action <actions>] | --all [flags]
ParameterTypeRequiredDescription
--model <models>stringnoModel ID(s), comma-separated (max 20)
--action <actions>stringnoPermission action(s), comma-separated: inference, finetune, deploy (default: inference)
--allswitchnoClose one-key authorization and clear ALL historical inference grants
--yesswitchnoConfirm this high-risk operation
This revokes model permissions and may interrupt inference, fine-tuning, or deployment workloads. With --all, it also clears all historical inference grants.
Example: Revoke permissions for model qwen-plus with confirmation
bl permission revoke --model qwen-plus --yes
  • Grants apply to the business workspace your API key belongs to.
  • All revoke operations require --yes; use --dry-run to preview the request without confirmation.
  • --all maps to the server one-key switch (access_all_entities: CLOSE): it clears every historical inference grant and cannot be undone, so it requires --yes.
  • Actions you omit keep their current grants (server-side tri-state patch).

Token Plan

bl token-plan list-seats

List Token Plan subscription seat details. Usage
bl token-plan list-seats [flags]
ParameterTypeRequiredDescription
--page-no <n>numbernoPage number (default: 1)
--page-size <n>numbernoPage size (default: 10)
--caller-uac-account-id <id>stringnoCaller UAC account ID
--namespace-id <id>stringnoProduct namespace ID (Token Plan default: namespace-1)
--status <status>arraynoSeat status filter (repeatable): CREATING, NORMAL, LIMIT, RELEASE, STOP, REFUNDED
--status-list-str <json>stringnoStatusList as JSON string, e.g. '["NORMAL"]'
--seat-id <id>stringnoFilter by seat ID
--seat-type <type>stringnoSeat tier: standard, pro, or max
--query-assigned <bool>stringnoFilter by assignment: true=assigned, false=unassigned
Example: List seat details with page size 20 and status NORMAL
bl token-plan list-seats --page-size 20 --status NORMAL

bl token-plan add-member

Add a member to a Token Plan organization. Usage
bl token-plan add-member --account-name <name> --org-id <id> [flags]
ParameterTypeRequiredDescription
--account-name <name>stringyesMember display name
--org-id <id>stringyesOrganization ID
--org-role-code <code>stringnoOrganization role: ORG_ADMIN or ORG_MEMBER (default: ORG_MEMBER)
--spec-type <type>stringnoSeat tier to assign on creation: standard, pro, or max
--caller-uac-account-id <id>stringnoCaller UAC account ID
--namespace-id <id>stringnoProduct namespace ID (Token Plan default: namespace-1)
Example: Add member dev_user to organization org_123
bl token-plan add-member --account-name dev_user --org-id org_123

bl token-plan assign-seats

Batch assign Token Plan seats to members. Usage
bl token-plan assign-seats --workspace-id <id> --seat-type <type> --account-id <id> [flags]
ParameterTypeRequiredDescription
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID, config: workspace_id)
--seat-type <type>stringyesSeat tier: standard, pro, or max
--account-id <id>arraynoTarget member account ID (repeatable)
--caller-uac-account-id <id>stringnoCaller UAC account ID
--namespace-id <id>stringnoProduct namespace ID (Token Plan default: namespace-1)
--locale <locale>stringnoLanguage: zh-CN or en-US
Example: Assign standard seats to member acc_123 in workspace ws_456
bl token-plan assign-seats --workspace-id ws_456 --seat-type standard --account-id acc_123

bl token-plan create-key

Create a Token Plan API key for a seat. Usage
bl token-plan create-key --account-id <id> --workspace-id <id> [flags]
ParameterTypeRequiredDescription
--account-id <id>stringyesTarget member account ID
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID, config: workspace_id)
--description <text>stringnoAPI key description
--caller-uac-account-id <id>stringnoCaller UAC account ID
--namespace-id <id>stringnoProduct namespace ID (Token Plan default: namespace-1)
Example: Create API key for seat of account acc_123 in workspace ws_456
bl token-plan create-key --account-id acc_123 --workspace-id ws_456