-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
FAQThis will not be worked onThis will not be worked oncategory/cliCommand line interface and interactionCommand line interface and interactionpriority/P3Low - Minor, cosmetic, nice-to-fix issuesLow - Minor, cosmetic, nice-to-fix issuesscope/documentationDocumentation toolingDocumentation toolingstatus/need-informationMore information is needed to resolve this issue.More information is needed to resolve this issue.status/needs-triageIssue needs to be triaged and labeledIssue needs to be triaged and labeledtype/documentationDocumentation improvements or additionsDocumentation improvements or additions
Description
1. Where do I get an API key? (如何申请 API Key)
| Region | Console | Notes |
|---|---|---|
| 🌏 Outside Mainland China | https://modelstudio.console.alibabacloud.com/ | Global console |
| 🇨🇳 Mainland China | https://bailian.console.aliyun.com/ | 国内控制台 |
2. Quick one‑liner to launch Qwen Code (如何用一行命令启动 Qwen Code)
# Outside Mainland China
OPENAI_BASE_URL=https://dashscope-intl.aliyuncs.com/compatible-mode/v1 \
OPENAI_API_KEY=your-api-key \
OPENAI_MODEL=qwen3-coder-plus \
qwen
# 中国大陆
OPENAI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 \
OPENAI_API_KEY=你的API密钥 \
OPENAI_MODEL=qwen3-coder-plus \
qwen3. Using a .env file (project‑local) (如何通过 .env 文件配置)
# put this file in your project root
OPENAI_BASE_URL=https://dashscope-intl.aliyuncs.com/compatible-mode/v1
OPENAI_API_KEY=your-api-key
OPENAI_MODEL=qwen3-coder-plus
# 将如下文件放置在你自己的项目根目录下
OPENAI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
OPENAI_API_KEY=your-api-key
OPENAI_MODEL=qwen3-coder-plus4. Running without saving these variables (不用环境变量登录)
Running qwen with no env will drop you into the interactive GUI login.
Press Enter to open the prompt, then paste: API Key, Base URL, Model name
(We have fixed this issue in the latest npm package, please run npm i -g @qwen-code/qwen-code@latest to upgrade.
PierrickGT, lin72h, minzdrav and ghj1976
Metadata
Metadata
Assignees
Labels
FAQThis will not be worked onThis will not be worked oncategory/cliCommand line interface and interactionCommand line interface and interactionpriority/P3Low - Minor, cosmetic, nice-to-fix issuesLow - Minor, cosmetic, nice-to-fix issuesscope/documentationDocumentation toolingDocumentation toolingstatus/need-informationMore information is needed to resolve this issue.More information is needed to resolve this issue.status/needs-triageIssue needs to be triaged and labeledIssue needs to be triaged and labeledtype/documentationDocumentation improvements or additionsDocumentation improvements or additions