Skip to main content
Getting Started

CLI Tool

QwenCloud management CLI for managing model catalog, accounts, usage, billing, subscriptions, and support tickets

Version 1.3.0
QwenCloud CLI is open source -- browse the code, file issues, or contribute: GitHub

Quick start

Requires Node.js 18 or later. The npm package name and installable versions are subject to the actual release page.
  1. Install and verify:
npm install -g @qwencloud/qwencloud-cli
qwencloud version
  1. Interactive login:
qwencloud auth login
  1. Run your first query:
qwencloud models list
Run qwencloud without arguments to enter interactive mode; with a command it executes once and exits. No environment variables needed; the login flow saves management credentials. A successful models list response confirms installation, network, and login are all working. Agents can run qwencloud config set output.format json to lock JSON output; run qwencloud doctor --format json if verification fails.

Models and docs

Filter available models, check model details, or find onboarding docs? Start here.

models list

List available models, filtered by input/output modality.
qwencloud models list [--input <text|image|video|audio|vector>] [--output <text|image|video|audio|vector>] [--page <integer>] [--per-page <integer>] [--all] [--verbose] [--format <auto|table|json|text>]
qwencloud models list --input image --output text
qwencloud models list --all --verbose --format json
FlagTypeRequiredDefaultDescription
--input <modality>enumNounsetInput modality: text, image, video, audio, vector
--output <modality>enumNounsetOutput modality: text, image, video, audio, vector
--page <integer>integerNo1Page number; values below 1 are normalized to 1
--per-page <integer>integerNo20Models per page; values below 1 are normalized to 1
--allbooleanNofalseReturn all models and disable pagination; forces JSON
--verbosebooleanNofalseInclude detail fields; forces JSON
JSON output structure example (sample values for field illustration only):
{
  "models": [
    {
      "id": "qwen3.6-plus",
      "modality": {
        "input": ["text", "image"],
        "output": ["text"]
      },
      "can_try": true,
      "free_tier": {
        "mode": "standard",
        "quota": {
          "remaining": 850000,
          "total": 1000000,
          "unit": "tokens",
          "used_pct": 15,
          "status": "valid",
          "resetDate": "2026-08-01T00:00:00.000Z"
        }
      },
      "pricing": {
        "tiers": [
          {
            "label": "Text input",
            "input": 1.25,
            "output": 3.75,
            "cache_creation": 1.5625,
            "cache_read": 0.125,
            "unit": "USD/1M tokens"
          }
        ],
        "summary": {
          "cheapest_input": 1.25,
          "cheapest_output": 3.75,
          "unit": "USD/1M tokens",
          "billing_type": "token"
        }
      },
      "features": ["function-calling"],
      "context": {
        "context_window": 131072,
        "max_input": 122880,
        "max_output": 8192
      }
    }
  ],
  "total": 1,
  "page": 1,
  "per_page": 20,
  "total_pages": 1
}
After finding candidate models, run qwencloud models info <id> to view full pricing, context, and rate-limit details.

models info

View full details for a single model; provide at least one of the positional argument or --model.
qwencloud models info [id] [--model [id]] [--format <auto|table|json|text>]
qwencloud models info qwen3.6-plus
qwencloud models info --model qwen3.6-plus --format json
Flag / ArgTypeRequiredDefaultDescription
[id]stringconditionalnoneModel ID
--model [id]stringconditionalnoneModel ID; alternative to the positional argument
To continue comparing candidate models, run qwencloud models search <query> to narrow results. Search models by keyword or modality.
qwencloud models search <query> [--page <integer>] [--per-page <integer>] [--all] [--format <auto|table|json|text>]
qwencloud models search "function calling"
qwencloud models search image --all --format json
Flag / ArgTypeRequiredDefaultDescription
<query>stringYesnoneSearch term
--page <integer>integerNo1Page number
--per-page <integer>integerNo20Models per page
--allbooleanNofalseReturn all matches; forces JSON
Search official documentation; optionally view the Nth result inline.
qwencloud docs search <query> [--limit <integer>] [--page <integer>] [--language <en|zh>] [--view <integer>] [--format <auto|table|json|text>]
qwencloud docs search "chat completions" --language en --limit 10
qwencloud docs search "API Key" --view 1
Flag / ArgTypeRequiredDefaultDescription
<query>stringYesnoneSearch term
--limit <integer>integerNo20JSON/text: 1-100 per page; table mode: max 5
--page <integer>integerNo1Page number
--language <en|zh>string (en/zh)NoenDocument language; other values silently fall back to en
--view <integer>integerNounsetView the 1-based index from the current results
After finding a target entry, run qwencloud docs view <path-or-url> to read the full content.

docs view

View page content by document path or URL.
qwencloud docs view <path-or-url> [--format <auto|table|json|text>]
qwencloud docs view /docs/model-api
ArgTypeRequiredDefaultDescription
<path-or-url>stringYesnoneDocument path or URL

Authentication, account, and workspace

Log in, check credential validity, or see which workspaces your account can access? Use these commands.

auth login

Log in and save credentials; interactive terminals prefer PKCE, non-interactive environments use Device Flow.
qwencloud auth login [--init-only] [--complete] [--timeout <seconds>] [--format <auto|table|json|text>]
qwencloud auth login
qwencloud auth login --init-only --format json
qwencloud auth login --complete --timeout 180
FlagTypeRequiredDefaultDescription
--init-onlybooleanNofalseOutput authorization info and exit immediately
--completebooleanNofalseContinue and complete a pending login session
--timeout <seconds>integerNo120Polling timeout in seconds for --complete
In non-TTY environments without --init-only/--complete, the command automatically returns in init-only mode. Credentials are preferentially stored in the system keychain, falling back to an encrypted file. You can also run qwencloud login directly. After successful login, run qwencloud auth status --format json to check credentials, then qwencloud models list to verify query permissions.

auth status

Check local credentials and server-side verification status.
qwencloud auth status [--format <auto|table|json|text>]
qwencloud auth status --format json
Full JSON structure example:
{
  "authenticated": true,
  "server_verified": true,
  "auth_mode": "device_flow",
  "source": "keychain",
  "user": {
    "aliyunId": "example-user"
  },
  "token": {
    "expires_at": "2026-08-01T00:00:00.000Z",
    "scopes": ["inference:read", "usage:read", "config:write"]
  }
}
When the server is unreachable but local credentials are still valid, server_verified is false and may include a warning; exit code is 2 when not logged in or credentials have expired. If authenticated is false, re-run qwencloud auth login.

auth logout

Log out and delete local credentials. You can also run qwencloud logout directly.
qwencloud auth logout [--format <auto|table|json|text>]
qwencloud auth logout

workspace list

List workspaces accessible to the current account.
qwencloud workspace list [--format <auto|table|json|text>]
qwencloud workspace list --format json
After listing workspaces, run qwencloud workspace limit to check whether the account can create more.

workspace limit

View used workspace count and account hard limit.
qwencloud workspace limit [--format <auto|table|json|text>]
qwencloud workspace limit

Usage, billing, and subscriptions

Want to know how much you've used this month, how much you've spent, which model or API Key costs the most, or how much subscription quota remains? Use these commands.
Date options vary by command: usage summary dates only affect PAYG, usage free-tier currently returns a snapshot only; other queries resolve in order: --from/--to > --days > --period > month-to-date. Common --period values include today, yesterday, week, month, last-month, quarter, year, and YYYY-MM.

usage summary

Summarize free quota, Coding Plan, Token Plan, and pay-as-you-go usage.
qwencloud usage summary [--from <date>] [--to <date>] [--period <preset>] [--format <auto|table|json|text>]
qwencloud usage summary --period month
qwencloud usage summary --from 2026-07-01 --to 2026-07-21 --format json
FlagTypeRequiredDefaultDescription
--from <date>dateNofirst day of current monthPAYG start date, YYYY-MM-DD
--to <date>dateNotodayPAYG end date, YYYY-MM-DD
--period <preset>stringNomonthPAYG preset range or YYYY-MM
Date parameters and the JSON top-level period only scope pay_as_you_go; free_tier, coding_plan, and token_plan are current snapshots at query time. Full JSON structure example (sample values for field illustration only):
{
  "period": {
    "from": "2026-07-01",
    "to": "2026-07-21"
  },
  "free_tier": [
    {
      "model_id": "qwen-plus",
      "quota": {
        "remaining": 850000,
        "total": 1000000,
        "unit": "tokens",
        "used_pct": 15,
        "status": "valid",
        "resetDate": "2026-08-01T00:00:00.000Z"
      }
    }
  ],
  "coding_plan": {
    "subscribed": true,
    "plan": "pro",
    "price": {
      "amount": 50,
      "currency": "USD",
      "cycle": "monthly"
    },
    "included_models": [],
    "windows": {
      "per_5h": {
        "remaining": 4800,
        "total": 6000,
        "used_pct": 20,
        "next_reset_at": "2026-07-21T12:00:00.000Z"
      },
      "weekly": {
        "remaining": 25000,
        "total": 30000,
        "used_pct": 16.67,
        "next_reset_at": "2026-07-27T00:00:00.000Z"
      },
      "monthly": {
        "remaining": 90000,
        "total": 100000,
        "used_pct": 10,
        "next_reset_at": "2026-08-01T00:00:00.000Z"
      }
    }
  },
  "token_plan": {
    "subscribed": true,
    "planName": "Token Plan",
    "status": "valid",
    "totalCredits": 25000,
    "remainingCredits": 18000,
    "usedPct": 28,
    "resetDate": "2026-08-01T00:00:00.000Z"
  },
  "pay_as_you_go": {
    "models": [
      {
        "model_id": "qwen-plus",
        "usage": {
          "tokens": 600000
        },
        "cost": 0.38,
        "currency": "USD"
      }
    ],
    "total": {
      "cost": 0.38,
      "currency": "USD"
    }
  }
}
When a model shows unusual usage, run qwencloud usage breakdown --model <id>; for request-level details, use qwencloud usage logs.

usage breakdown

View pay-as-you-go usage for a specific model, broken down by day, month, or quarter.
qwencloud usage breakdown --model <id> [--granularity <day|month|quarter>] [--from <date>] [--to <date>] [--period <preset>] [--days <number>] [--format <auto|table|json|text>]
qwencloud usage breakdown --model qwen-plus --days 7
qwencloud usage breakdown --model qwen-plus --granularity month --period quarter
FlagTypeRequiredDefaultDescription
--model <id>stringYesnoneModel ID; validated at runtime
--granularity <g>enumNodayday, month, quarter
--from <date>dateNounsetStart date
--to <date>dateNounsetEnd date
--period <preset>stringNomonthPreset range
--days <number>numberNounsetLookback days; pass a positive integer -- CLI does not strictly validate integer type

usage free-tier

Browse current free quota status for all models.
qwencloud usage free-tier [--from <date>] [--to <date>] [--period <preset>] [--format <auto|table|json|text>]
qwencloud usage free-tier --format json
FlagTypeRequiredDefaultDescription
--from <date>dateNounsetRegistered; does not currently affect the returned quota snapshot
--to <date>dateNounsetRegistered; does not currently affect the returned quota snapshot
--period <preset>stringNounsetRegistered; does not currently affect the returned quota snapshot
This command always returns the current free quota snapshot; date flags do not currently filter historical quota.

usage payg

Browse pay-as-you-go usage for all models.
qwencloud usage payg [--from <date>] [--to <date>] [--period <preset>] [--days <number>] [--format <auto|table|json|text>]
qwencloud usage payg --period last-month
qwencloud usage payg --days 30 --format json
FlagTypeRequiredDefaultDescription
--from <date>dateNounsetStart date
--to <date>dateNounsetEnd date
--period <preset>stringNomonthPreset range
--days <number>numberNounsetLookback days; pass a positive integer -- CLI does not strictly validate integer type

usage logs

Query call logs by time, model, status, or request ID.
qwencloud usage logs [--from <date-or-rfc3339>] [--to <date-or-rfc3339>] [--period <preset>] [--model <id>]... [--status <type>]... [--request-id <id>] [--page <integer>] [--page-size <integer>] [--format <auto|table|json|text>]
qwencloud usage logs --period 24h --status 4xx --status 5xx
qwencloud usage logs --request-id 12345-abcdef --format json
FlagTypeRequiredDefaultDescription
--from <value>date/timeNo7 days ago 00:00YYYY-MM-DD or RFC3339
--to <value>date/timeNocurrent timeYYYY-MM-DD or RFC3339
--period <preset>stringNounsetSupports Nh, Nd, and date presets
--model <id>repeatable stringNounsetModel filter, repeatable
--status <type>repeatable stringNounsetSupports 0/cancel, 2xx/success, 4xx/client-error, 5xx/server-error and aliases; unknown values are ignored
--request-id <id>stringNounsetExact request ID; when set, other filters are ignored
--page <integer>integerNo1Page number
--page-size <integer>integerNo201-100 per page
Maximum time span per query is 14 days.

billing summary

Summarize pre-tax, tax, and post-tax billing amounts by settlement month.
qwencloud billing summary [--from <yyyy-mm>] [--to <yyyy-mm>] [--charge-type <all|subscription|payg>] [--format <auto|table|json|text>]
qwencloud billing summary --from 2026-06 --to 2026-07
FlagTypeRequiredDefaultDescription
--from <yyyy-mm>monthNocurrent monthStart settlement month
--to <yyyy-mm>monthNocurrent monthEnd settlement month, inclusive
--charge-type <type>enumNoallall, subscription, payg
To locate cost sources, run qwencloud billing breakdown --group-by model or --group-by api-key.

billing breakdown

Break down spending by model or API Key.
qwencloud billing breakdown [--granularity <day|month>] [--group-by <model|api-key>] [--from <date>] [--to <date>] [--period <preset>] [--charge-type <all|subscription|payg>] [--top <integer>] [--format <auto|table|json|text>]
qwencloud billing breakdown --group-by api-key --top 20
qwencloud billing breakdown --granularity day --period week
FlagTypeRequiredDefaultDescription
--granularity <g>enumNomonthday or month
--group-by <dim>enumNomodelmodel or api-key
--from <date>date/monthNocurrent monthday uses YYYY-MM-DD; month accepts YYYY-MM
--to <date>date/monthNocurrent monthEnd date or month
--period <preset>stringNounsetPreset range; periods shorter than 31 days may auto-adopt day
--charge-type <type>enumNoallall, subscription, payg
--top <integer>integerNo10Return top N items, max 100
day spans max 31 days, month spans max 12 months.

billing limit

View spending cap and alert configuration.
qwencloud billing limit [--format <auto|table|json|text>]
qwencloud billing limit --format json

billing payment-method bind

Open the payment method management page to bind or manage payment methods.
qwencloud billing payment-method bind [--format <table|json|text>]
qwencloud billing payment-method bind
This command defaults to table format when no format is specified; agents should pass --format json explicitly.

billing payment-method list

List payment methods bound to the account.
qwencloud billing payment-method list [--format <table|json|text>]
qwencloud billing payment-method list --format json
If the list is empty or you need to change payment methods, run qwencloud billing payment-method bind.

subscription status

Summarize Token Plan and Coding Plan subscription status.
qwencloud subscription status [--plan <token|coding>] [--format <auto|table|json|text>]
qwencloud subscription status --plan coding --format json
FlagTypeRequiredDefaultDescription
--plan <kind>stringNoall supported plansAccepts token, coding; other values are treated as unset without error
When using Team Token Plan, run qwencloud subscription tokenplan seats --format json to view seat instances.

subscription orders

List subscription purchase, renewal, and upgrade orders.
qwencloud subscription orders [--from <date>] [--to <date>] [--type <purchase|renew|upgrade>] [--page <integer>] [--page-size <integer>] [--format <auto|table|json|text>]
qwencloud subscription orders --type purchase --page 1 --page-size 20
FlagTypeRequiredDefaultDescription
--from <date>dateNounsetStart date, YYYY-MM-DD
--to <date>dateNounsetEnd date, YYYY-MM-DD
--type <kind>stringNounsetAccepts purchase, renew, upgrade; other values are treated as unset without error
--page <integer>integerNo1Page number
--page-size <integer>integerNo201-100 per page

subscription tokenplan status

View Token Plan seat type, cycle, renewal status, and diagnostic info.
qwencloud subscription tokenplan status [--format <auto|table|json|text>]
qwencloud subscription tokenplan status --format json

subscription tokenplan seats

List Token Plan seat instances with pagination.
qwencloud subscription tokenplan seats [--spec-type <pro|standard>] [--page <integer>] [--page-size <integer>] [--format <auto|table|json|text>]
qwencloud subscription tokenplan seats --spec-type pro --format json
FlagTypeRequiredDefaultDescription
--spec-type <type>enumNounsetpro or standard
--page <integer>integerNo1Page number
--page-size <integer>integerNo20Max 100 per page
This command defaults to table format when no format is specified; agents should pass --format json explicitly.

Configuration, diagnostics, and completion

Want to lock machine-readable output, troubleshoot the local environment, enable shell completion, or confirm the version? Use these commands.

config list

List user-configurable keys; in 1.3.0, the only public key is output.format.
qwencloud config list [--format <auto|table|json|text>]
qwencloud config list --format json

config get

Read a configuration value.
qwencloud config get <key> [--format <auto|table|json|text>]
qwencloud config get output.format

config set

Set a configuration value.
qwencloud config set <key> <value> [--format <auto|table|json|text>]
qwencloud config set output.format json
output.format accepts auto, table, json, text. After setting, run qwencloud config get output.format to confirm.

config unset

Delete a configuration value and restore default behavior.
qwencloud config unset <key> [--format <auto|table|json|text>]
qwencloud config unset output.format

doctor

Check version, authentication, token, network, shell completion, and global configuration.
qwencloud doctor [--format <auto|table|json|text>]
qwencloud doctor --format json
Fix issues based on diagnostic results and re-run qwencloud doctor until all failures are resolved.

completion install

Install command completion for the current or specified shell.
qwencloud completion install [--shell <bash|zsh|fish>]
qwencloud completion install --shell zsh

completion generate

Output the completion script for the current or specified shell.
qwencloud completion generate [--shell <bash|zsh|fish>]
qwencloud completion generate --shell bash
When --shell is omitted, the shell is auto-detected. Supported: bash, zsh, fish.

version

Output version; --check also checks for new versions.
qwencloud version [--check]
qwencloud version --check

Support and updates

Submit and track issues, close or rate tickets, or check for CLI updates? Choose your action here.

support list

List support tickets with pagination.
qwencloud support list [--page <integer>] [--page-size <integer>] [--format <auto|table|json|text>]
qwencloud support list --page 1 --page-size 10
FlagTypeRequiredDefaultDescription
--page <integer>integerNo1Page number
--page-size <integer>integerNo101-10 per page

support view

View ticket details and message history.
qwencloud support view <ticket-id> [--format <auto|table|json|text>]
qwencloud support view TICKET_ID --format json

support create

Create a ticket interactively, or non-interactively with paired parameters.
qwencloud support create [--list-categories] [--category-id <id>] [--description <text>] [--format <auto|table|json|text>]
qwencloud support create --list-categories
qwencloud support create --category-id CATEGORY_ID --description "Issue description"
FlagTypeRequiredDefaultDescription
--list-categoriesbooleanNofalseList categories and exit
--category-id <id>stringconditional (non-interactive)noneMust be provided with --description
--description <text>stringconditional (non-interactive)noneMax 2000 characters, truncated if exceeded
Requires TTY when complete non-interactive parameters are not provided. After creation, save the returned ticket ID and run qwencloud support view <ticket-id> to track progress.

support reply

Reply to a ticket; non-interactive environments must provide the message body.
qwencloud support reply <ticket-id> [--message <text>] [--format <auto|table|json|text>]
qwencloud support reply TICKET_ID --message "Please check the logs"
Flag / ArgTypeRequiredDefaultDescription
<ticket-id>stringYesnoneTicket ID
--message <text>stringrequired (non-interactive)noneMax 2000 characters, truncated if exceeded

support close

Close a ticket; scripts should use --yes to skip confirmation.
qwencloud support close <ticket-id> [--yes] [--format <auto|table|json|text>]
qwencloud support close TICKET_ID --yes
Flag / ArgTypeRequiredDefaultDescription
<ticket-id>stringYesnoneTicket ID
--yesbooleanNofalseSkip confirmation; non-TTY without this flag treats as cancel

support rate

Rate a resolved ticket; rating range is 1-5.
qwencloud support rate <ticket-id> [--rating <1|2|3|4|5>] [--comment <text>] [--format <auto|table|json|text>]
qwencloud support rate TICKET_ID --rating 5 --comment "Excellent"
Flag / ArgTypeRequiredDefaultDescription
<ticket-id>stringYesnoneTicket ID
--rating <n>integerrequired (non-interactive)none1-5 stars
--comment <text>stringNounsetMax 500 characters, truncated if exceeded

update

Check version and output upgrade prompt; does not install directly.
qwencloud update
qwencloud update

Global conventions

qwencloud [--format <auto|table|json|text>] [--quiet] <area> <verb> [args] [flags]
Global FlagTypeDefaultDescription
--format <fmt>enumautoExplicit format takes priority over config output.format
-q, --quietbooleanfalseSuppress stdout/stderr; result conveyed via exit code only
-v, --versionbooleanfalseTop-level version shortcut
-h, --helpbooleanfalseTop-level and per-command help
auto uses table in TTY, JSON in pipe/redirect; non-TTY explicit table request degrades to text with stderr warning. Success data goes to stdout, errors and diagnostics go to stderr. JSON preserves per-command and server-side fields with no unified envelope; the error object exit code field is exitCode. In paginated queries, JSON typically preserves the requested page and returns an empty array for out-of-bounds; interactive tables typically adjust to a valid page. Agents should always specify --format json, page number, and page size explicitly.
Exit CodeMeaning
0Success
1General error; Commander argument parse errors also use 1
2Authentication failure
3Network error
4Parameter or configuration error
8Reserved for incomplete operations
10docs view document not found
130User interrupt
Some local validations in specific commands reuse general error code 1; scripts should treat any non-zero value as failure and dispatch on the code field in the JSON error object.

Appendix

Command cheat sheet

CommandPurpose
qwencloud auth loginObtain and save management credentials
qwencloud auth logoutDelete local credentials and log out
qwencloud auth statusCheck credential and server verification status
qwencloud models listFilter available models
qwencloud models infoView full details for a single model
qwencloud models searchFind models by keyword or modality
qwencloud usage summarySummarize usage across billing methods
qwencloud usage breakdownBreak down usage for a specific model
qwencloud usage free-tierCheck free quota balance
qwencloud usage paygView pay-as-you-go usage and cost
qwencloud usage logsQuery call logs by request or status
qwencloud config listView public configuration keys
qwencloud config getRead a single configuration value
qwencloud config setSet default output format
qwencloud config unsetRestore configuration defaults
qwencloud doctorDiagnose version, auth, or network issues
qwencloud completion installEnable shell completion
qwencloud completion generateExport shell completion script
qwencloud versionView version and check for updates
qwencloud updateGet upgrade prompt
qwencloud docs searchSearch official docs by keyword
qwencloud docs viewOpen document content
qwencloud workspace listList accessible workspaces
qwencloud workspace limitCheck workspace count limit
qwencloud billing summaryView monthly settlement totals with tax
qwencloud billing breakdownBreak down costs by model or API Key
qwencloud billing limitCheck spending cap and alerts
qwencloud billing payment-method bindOpen payment method management page
qwencloud billing payment-method listView bound payment methods
qwencloud subscription statusConfirm Token/Coding Plan status
qwencloud subscription ordersView purchase, renewal, and upgrade orders
qwencloud subscription tokenplan statusView cycle and renewal status
qwencloud subscription tokenplan seatsBrowse seat instances with pagination
qwencloud support listList tickets with pagination
qwencloud support viewView ticket and message history
qwencloud support createSubmit a new ticket
qwencloud support replyAdd a message to a ticket
qwencloud support closeClose a ticket
qwencloud support rateRate a resolved ticket