Qwen
Use Qwen OAuth (free tier) in OpenClaw
Qwen provides a free-tier OAuth flow for Qwen Coder and Qwen Vision models
(2,000 requests/day, subject to Qwen rate limits).
Enable the plugin
openclaw plugins enable qwen-portal-auth
Restart the Gateway after enabling.
Authenticate
openclaw models auth login --provider qwen-portal --set-default
This runs the Qwen device-code OAuth flow and writes a provider entry to your
'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'models.json'</code>' (plus a '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'qwen'</code>' alias for quick switching).
Model IDs
- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'qwen-portal/coder-model'</code>'
- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'qwen-portal/vision-model'</code>'
Switch models with:
openclaw models set qwen-portal/coder-model
Reuse Qwen Code CLI login
If you already logged in with the Qwen Code CLI, OpenClaw will sync credentials
from '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'~/.qwen/oauth_creds.json'</code>' when it loads the auth store. You still need a
'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'models.providers.qwen-portal'</code>' entry (use the login command above to create one).
Notes
- Tokens auto-refresh; re-run the login command if refresh fails or access is revoked.
- Default base URL: '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'https://portal.qwen.ai/v1'</code>' (override with
'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'models.providers.qwen-portal.baseUrl'</code>' if Qwen provides a different endpoint).
- See '<a href="/concepts/model-providers" className="text-emerald-400 hover:text-emerald-300 transition-colors">'Model providers'</a>' for provider-wide rules.