Use with Qwen Code
How to use Nexus API with Qwen Code CLI - Alibaba's coding assistant integration tutorial. Configure OPENAI_BASE_URL to access GPT-5, DeepSeek and more.
Install Qwen Code
Using pnpm:
pnpm install -g @qwen-code/qwen-codeUsing npm:
npm install -g @qwen-code/qwen-codeUsing yarn:
yarn global add @qwen-code/qwen-codeConfigure Environment Variables
Linux / macOS
# Set your API key (get it from https://nexusapi.one/console/token)
export OPENAI_API_KEY="sk-xxx"
# Set API base URL
export OPENAI_BASE_URL="https://nexusapi.one/v1"
# Optional: set model (can use deepseek-v3.1, deepseek-v3.2, etc.)
export OPENAI_MODEL="gpt-5"Windows PowerShell
# Set your API key (get it from https://nexusapi.one/console/token)
$env:OPENAI_API_KEY="sk-xxx"
# Set API base URL
$env:OPENAI_BASE_URL="https://nexusapi.one/v1"
# Optional: set model (can use deepseek-v3.1, deepseek-v3.2, etc.)
$env:OPENAI_MODEL="gpt-5"Important: Replace
sk-xxxwith your actual API key. You can get it from the Console.
Start Using
# Enter your project directory
cd my-project
# Start Qwen Code
qwenPersistent Configuration
Linux / macOS
Add to ~/.bashrc or ~/.zshrc:
export OPENAI_API_KEY="sk-xxx"
export OPENAI_BASE_URL="https://nexusapi.one/v1"
export OPENAI_MODEL="gpt-5"Windows PowerShell
Add to your PowerShell profile ($PROFILE):
$env:OPENAI_API_KEY="sk-xxx"
$env:OPENAI_BASE_URL="https://nexusapi.one/v1"
$env:OPENAI_MODEL="gpt-5"