Connect powerful Qwen models to an AI assistant in VS Code for free
A working path via OpenRouter and the Cline extension - no credit card or sketchy services
- 1.Sign up on the OpenRouter platform - it's an API aggregator that gives you a single key to dozens of models, including the Qwen family from Alibaba. Go to openrouter.ai, click Sign In, and log in via Google or GitHub.
No card required. Registration is free, and the key is created immediately.
OpenRouter ↗About this tool - 2.Create an API key. In the left menu, select Keys -> Create Key. Name the key, for example «cline». Copy the key to a safe place - it is only shown once.
Never share your API key with anyone: it gives full access to your OpenRouter account.
OpenRouter ↗About this tool - 3.Find free Qwen models. Go to the Models tab, type «qwen» in the search box, and filter by the Free tag. Free models are marked with the :free suffix - for example, qwen/qwen-2.5-72b-instruct:free. Remember the exact model ID: you'll need it in step 7.
The list of free models changes from time to time. If a specific model is not available - pick any with the :free suffix, they are comparable in quality.
OpenRouter ↗About this tool - 4.Install VS Code if you don't have it yet. Download it for free from code.visualstudio.com for Windows, macOS, or Linux.
If VS Code is already installed - skip this step.
VS Code ↗About this tool - 5.Install the Cline extension - it's an open-source AI coding assistant that works with models via OpenRouter. In VS Code, open Extensions (Ctrl+Shift+X / Cmd+Shift+X), type «Cline», and click Install.
Cline is completely free and requires no subscription. After installation, a Cline icon will appear in the left sidebar.
Cline ↗About this tool - 6.Open Cline in the VS Code sidebar and click the gear icon (Settings). In the API Provider field, select «OpenRouter». Paste the key from step 2 into the OpenRouter API Key field.
If you don't see the gear icon - press Ctrl+Shift+P, start typing «Cline», and select Cline: Open Settings.
About this tool - 7.In the Model field, enter or select the exact model ID from step 3 (for example, qwen/qwen-2.5-72b-instruct:free). Click Done to save settings. Open any project folder in VS Code and test the assistant - type a task in the Cline chat and press Send.
If the model doesn't appear in the list - choose the manual entry option and paste the full ID, including the :free suffix.
About this toolPromptReview the code in [file_name] and suggest 3 specific improvements: one for performance, one for readability, and one for security. Explain each suggestion in 2-3 sentences.
What this prompt doesThis prompt asks the AI to analyze the specified file and suggest three specific improvements: performance, readability, and security. Replace [file_name] with your file name, for example main.py or app.js.
- freeOpenRouter - free modelsModels with the :free suffix are available without payment and without a credit card; daily limits apply to the number of requests.
- APIOpenRouter - paid modelsPaid models are billed based on your topped-up balance; current rates are on the openrouter.ai/models page. Paid models are not required for this recipe.
- freeVS CodeFully free editor from Microsoft, with no time or feature limitations.
- freeCline (VS Code extension)Open-source extension, completely free with no limitations.
AI services change fast - interfaces and free limits may differ from what's described.