Qwen Code is an open-source AI coding agent (Apache-2.0) published by Alibaba's Qwen team. The workflow has four stages: “install → start qwen in a project → configure the connection with /auth → request a task.” However, because the free Qwen OAuth allocation ended on April 15, 2026, logging in as described in older guides will not make it run for free.This page explains, in order, how to get started using the current /auth menu, switch to Japanese, configure a custom connection for Claude or GPT, and use common commands. The latest version is v0.24.7, published to npm on September 29, 2026. Releases occur at least weekly, so check your local version with qwen --version.
Installation
These are the official README instructions. With the standalone installer, you do not need to provide Node.js yourself. Node.js 22 or later is required only when using npm.
# macOS / Linux(公式のスタンドアロン インストーラー)
curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash
# Windows(PowerShell)
irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex
# npm(Node.js 22 以上が必要)
npm install -g @qwen-code/qwen-code@latest
# Homebrew(macOS / Linux)
brew install qwen-codeAfter installation, reopen the terminal so environment variables take effect. Qwen Code was originally based on Google Gemini CLI v0.8.2, but development diverged from upstream starting with v0.1. Gemini CLI settings and free allocations do not apply unchanged.
First launch and switching to Japanese
cd /path/to/your-project
qwen
# セッション内で:
/language ui ja-JP # 画面表示を日本語に
/language output Japanese # モデルの回答を日本語に
/auth # 接続先と API キーを設定/language ui ja-JP changes the interface to Japanese, after which screens display Qwen Code's own Japanese labels such as “認証方法を選択” (Select an authentication method) and “ツール承認モード” (Tool approval mode). This page uses the same labels. The response language is separate from the UI language and is set with /language output Japanese.
In addition to the terminal, Qwen Code provides a desktop app, a browser-based Web UI (qwen serve --open, experimental), integrations for VS Code, Zed, and JetBrains, and headless execution for scripts and CI (qwen -p "..."). All are included in the same free repository; inference costs are separate.
Choose a connection with /auth
Opening /auth (also called /login) displays the “Select an authentication method” screen, with three top-level choices. If you try to select Qwen OAuth, it displays “Ended — switch to Coding Plan or API Key.”
| Option | Contents | Billing unit |
|---|---|---|
| Alibaba ModelStudio → Coding Plan | Personal subscription. Keys begin with sk-sp- | Number of requests (Pro is $50 per month, with simultaneous limits of 6,000 per 5 hours, 45,000 per week, and 90,000 per month) |
| Alibaba ModelStudio → Token Plan | Credits-based plan. Currently sold only in the Singapore region | Monthly Credits (individual Lite $8–Pro $80, with limited-time pricing) |
| Alibaba ModelStudio → Standard API Key | Use an existing ModelStudio API key | Pay-as-you-go token billing (unit price increases by input length tiers) |
| Third-party Providers | Log in to OpenRouter, ModelScope, and others in the browser | Each provider's pricing |
| Custom Provider | Local servers, proxies, and unsupported providers (using your own API key) | The connection's pricing |
The three ModelStudio options are not merely different ways to pay the same bill. The documentation assigns each a separate endpoint and separate key, and they will not work unless the key type matches baseUrl. As of October 1, 2026, Coding Plan is labeled “limited quantity, first come first served; replenished daily at midnight (UTC+8),” so it may be available on some days but not others. A single Coding Plan request internally becomes multiple model calls; Alibaba says simple tasks consume 5–10 calls, while complex tasks consume 10–30 or more. The English Qwen Code pricing page covers how to compare prices in detail.
Using Claude or GPT: configure Custom Provider in settings.json
Qwen Code's authentication documentation recommends ~/.qwen/settings.json's modelProviders for connecting to third parties such as OpenAI, Anthropic, Google, OpenRouter, and your own endpoint. For Kunavo, use the following:
{
"modelProviders": {
"openai": [
{
"id": "claude-sonnet-5",
"name": "Claude Sonnet 5 (Kunavo)",
"baseUrl": "https://api.kunavo.com/v1",
"description": "Kunavo, OpenAI 互換",
"envKey": "KUNAVO_API_KEY"
}
]
},
"security": {
"auth": {
"selectedType": "openai"
}
},
"model": {
"name": "claude-sonnet-5"
}
}# キーは settings.json に直接書かず、.qwen/.env か環境変数に
echo 'KUNAVO_API_KEY=sk-kn-...' >> ~/.qwen/.envThere are four points to keep in mind.
baseUrlonly goes as far as/v1.The model provider reference explicitly says to specify the API's/v1route, not/v1/chat/completions; the SDK appends the request path. Including the path produces a 404 rather than an authentication error.- Where to put the key.Qwen Code reads from the environment variable named in
envKey. The priority is the shell'sexport, then.env(.qwen/.envrecommended; only the first file found), thensettings.json'senv, with the last option discouraged because it stores the key in plain text. - The configuration file takes precedence over CLI flags.The resolution order is the value entered through
/auth→ the selectedmodelProviders→ CLI arguments → environment variables →settings.json. This is why--openai-base-urlmay appear to be ignored.security.auth.apiKeyandsecurity.auth.baseUrlin older guides are deprecated. - Start with Chat Completions.If you omit
wireApi, the Chat Completions format is used. Setting"responses"disables both automatic endpoint detection and fallback. Edits tomodelProviderstake effect immediately in running sessions (they appear after reopening/model).
Kunavo's catalog does not include Qwen text models.This is not a way to use Qwen cheaply; it is a way to use Claude or GPT inside Qwen Code with one prepaid balance. Kunavo has also not actually tested Qwen Code against its own endpoint. As with the English Qwen Code configuration page, this configuration was created from the official documentation. Keep the route that currently works and test alongside it.
Your first task and common commands
As in the README example, start with a request such as “Explain this repository and tell me where to start reading.” This checks that file reading and tool calls work end to end. A simple greeting will not reveal connection problems.
| Command | Use case |
|---|---|
/init | Analyze the current directory and create the first context file |
/model | Switch the model in use (models registered in modelProviders are listed by protocol) |
/approval-mode | Change the tool approval mode. default asks for approval for each edit, auto-edit automatically approves edits, and yolo automatically approves everything, including shell and network access |
/compress | Replace the conversation history with a summary to save tokens |
/stats(/usage) | Usage statistics. /stats model shows tokens and estimated cost by model |
/restore | Restore files to the checkpoint from before tool execution |
/resume | Resume a previous session |
/clear | Clear the conversation history to free context |
/help | Command list |
Automatic approval modes such as yolo come with the documentation's warning to use them only in “trusted, sandboxed, or disposable environments.” The estimated cost shown by /stats model is calculated by Qwen Code and is not the billed amount. Check the connection's usage records for the actual amount.
Limitations to know
- The built-in web_search is determined by the connection.Because it uses DashScope's server-side search, it is enabled for ModelStudio Standard API Key and Token Plan connections, and for entries pointing to recognized DashScope hosts; it is disabled for Coding Plan (not verified for that endpoint) and for custom endpoints at third-party or other hosts (web_search documentation). Add an MCP search server if needed.
- Kunavo's route is chat-only.Kunavo has no embedding, text-to-speech, or speech-recognition models. Qwen Code Live Voice requires a DashScope endpoint, so regardless of where the chat model points, Live Voice still requires a separate key.
Payment when trying Kunavo
Kunavo uses a prepaid top-up system with no monthly fee, deducting charges from your balance by token. The minimum top-up is $10, and Stripe Checkout accepts cards (Visa, Mastercard, American Express, JCB), Apple Pay, Google Pay, and Link. Review the billing explanation, then create an account and generate a key. After your first request, the most reliable way to verify the actual amount charged is to check your usage records.
Frequently asked questions
Can Qwen Code be used for free?
The software itself is free (Apache-2.0). However, the free inference allocation has ended. According to Qwen Code's authentication documentation, the free Qwen OAuth allocation ended on April 15, 2026, and was removed from the /auth options. Explanations saying “free up to 2,000 requests per day” applied only through v0.9.0 in February 2026. Today, you should expect to pay for inference through one of Alibaba Cloud's Coding Plan, Token Plan, or pay-as-you-go API keys, a third party such as OpenRouter, or a custom endpoint you configure yourself.
What is required to install Qwen Code?
Node.js is not required if you use the official standalone installer (curl on macOS/Linux, or PowerShell's irm on Windows). If you install with npm, you need Node.js 22 or later, using npm install -g @qwen-code/qwen-code@latest. With Homebrew, use brew install qwen-code. After installation, reopen the terminal and run qwen from your project directory.
Can I set Qwen Code's interface to Japanese?
Yes. Enter /language ui ja-JP during a session to switch the UI to Japanese, and /language output Japanese to force the model's response language to Japanese. The built-in UI languages are Simplified Chinese, English, Russian, German, Japanese, Portuguese (Brazil), French, and Catalan (command documentation verified October 1, 2026).
Can I use Claude or GPT with Qwen Code?
Yes. Register an OpenAI-compatible endpoint under modelProviders in ~/.qwen/settings.json. The model ID is passed to the endpoint unchanged, so it works if that endpoint provides Claude or GPT. Set baseUrl through /v1 (do not include /v1/chat/completions, which results in a 404). Kunavo created and published this configuration from Qwen Code's documentation, but has not actually run Qwen Code to verify it.
Why does adding --openai-base-url have no effect?
Because the modelProviders entry takes precedence. The documentation's resolution order is, from highest to lowest: the value entered through /auth, the selected modelProviders baseUrl and envKey, CLI arguments, environment variables, and settings.json. As long as an entry is selected, its baseUrl overrides the flag. Fix the entry, or remove it if you want the flag to take effect.
Verified October 1, 2026: Qwen Code's README; the authentication, model provider, command, and web_search documentation (main branch); Japanese UI strings (packages/cli/src/i18n/locales/ja.js); npm @qwen-code/qwen-code 0.24.7; and Alibaba Cloud's Coding Plan and Token Plan pages. Kunavo has not run Qwen Code against its own endpoint.