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]
| Parameter | Type | Required | Description |
|---|
--model <model> | string | no | Model name(s) to query, comma-separated for multiple; omit for all models |
--expiring <days> | string | no | Only show quotas expiring within N days |
--sort <field> | string | no | Sort by: remaining (ascending), expires (ascending) |
--all | switch | no | Show 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]
| Parameter | Type | Required | Description |
|---|
--model <model> | string | no | Model name(s), comma-separated; omit for overview |
--days <days> | string | no | Number of days (default: 7) |
--type <type> | string | no | Model type: Text, Vision, Multimodal, Audio, Embedding |
Example: Query model usage statistics for last 30 days
bl usage summary
Show a unified usage summary: free-tier quota and recent usage overview.
Usage
bl usage summary [--days <days>] [flags]
| Parameter | Type | Required | Description |
|---|
--days <days> | string | no | Number 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]
| Parameter | Type | Required | Description |
|---|
--model <model> | string | no | Model name(s), comma-separated for multiple |
--all | switch | no | Apply to all free-tier models |
--on | switch | no | Enable auto-stop (default behavior) |
--off | switch | no | Disable 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]
| Parameter | Type | Required | Description |
|---|
--type <type> | string | no | Filter 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>]
| Parameter | Type | Required | Description |
|---|
--model <model> | string | no | Model name(s), comma-separated (exact match) |
--name <name> | string | no | Fuzzy search by model name |
--page <n> | number | no | Page number (default: 1) |
--page-size <n> | number | no | Results 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]
| Parameter | Type | Required | Description |
|---|
--model <model> | string | no | Model name(s), comma-separated |
--period <minutes> | string | no | Query 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>]
| Parameter | Type | Required | Description |
|---|
--model <model> | string | yes | Model name |
--rpm <n> | number | no | Max requests per minute (QPM) |
--tpm <n> | number | no | Max 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>
| Parameter | Type | Required | Description |
|---|
--model <model> | string | yes | Model name |
--yes | switch | no | Confirm 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
| Parameter | Type | Required | Description |
|---|
--page <n> | string | no | Page number (default: 1) |
--page-size <n> | string | no | Page size (default: 10) |
--model <model> | string | no | Filter 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
| Parameter | Type | Required | Description |
|---|
--model <models> | string | no | Model ID(s), comma-separated (max 20) |
--action <actions> | string | no | Permission action(s), comma-separated: inference, finetune, deploy (default: inference) |
--all | switch | no | One-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>]
| Parameter | Type | Required | Description |
|---|
--scope <scope> | string | no | Authorization scope: authorizable (default, full catalog), authorized |
--model <model> | string | no | Model ID (exact match) |
--name <name> | string | no | Fuzzy search by model name or ID |
--page <n> | number | no | Page number (default: 1) |
--page-size <n> | number | no | Results 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]
| Parameter | Type | Required | Description |
|---|
--model <models> | string | no | Model ID(s), comma-separated (max 20) |
--action <actions> | string | no | Permission action(s), comma-separated: inference, finetune, deploy (default: inference) |
--all | switch | no | Close one-key authorization and clear ALL historical inference grants |
--yes | switch | no | Confirm 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]
| Parameter | Type | Required | Description |
|---|
--page-no <n> | number | no | Page number (default: 1) |
--page-size <n> | number | no | Page size (default: 10) |
--caller-uac-account-id <id> | string | no | Caller UAC account ID |
--namespace-id <id> | string | no | Product namespace ID (Token Plan default: namespace-1) |
--status <status> | array | no | Seat status filter (repeatable): CREATING, NORMAL, LIMIT, RELEASE, STOP, REFUNDED |
--status-list-str <json> | string | no | StatusList as JSON string, e.g. '["NORMAL"]' |
--seat-id <id> | string | no | Filter by seat ID |
--seat-type <type> | string | no | Seat tier: standard, pro, or max |
--query-assigned <bool> | string | no | Filter 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]
| Parameter | Type | Required | Description |
|---|
--account-name <name> | string | yes | Member display name |
--org-id <id> | string | yes | Organization ID |
--org-role-code <code> | string | no | Organization role: ORG_ADMIN or ORG_MEMBER (default: ORG_MEMBER) |
--spec-type <type> | string | no | Seat tier to assign on creation: standard, pro, or max |
--caller-uac-account-id <id> | string | no | Caller UAC account ID |
--namespace-id <id> | string | no | Product 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]
| Parameter | Type | Required | Description |
|---|
--workspace-id <id> | string | no | Workspace ID (env: BAILIAN_WORKSPACE_ID, config: workspace_id) |
--seat-type <type> | string | yes | Seat tier: standard, pro, or max |
--account-id <id> | array | no | Target member account ID (repeatable) |
--caller-uac-account-id <id> | string | no | Caller UAC account ID |
--namespace-id <id> | string | no | Product namespace ID (Token Plan default: namespace-1) |
--locale <locale> | string | no | Language: 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]
| Parameter | Type | Required | Description |
|---|
--account-id <id> | string | yes | Target member account ID |
--workspace-id <id> | string | no | Workspace ID (env: BAILIAN_WORKSPACE_ID, config: workspace_id) |
--description <text> | string | no | API key description |
--caller-uac-account-id <id> | string | no | Caller UAC account ID |
--namespace-id <id> | string | no | Product 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