Connect free AI models to your code editor via OpenRouter
In 5 minutes, set up the Continue extension in VS Code with free OpenRouter models - and write code with an AI assistant without a subscription
- 1.Go to openrouter.ai and sign up with Google or GitHub. In your dashboard, go to the Keys section, click Create Key, give it a name, and copy the generated API key.
The key starts with sk-or-v1-. Save it in a secure place - you'll need it in step 4. Do not share it with anyone.
OpenRouter ↗About this tool - 2.Open VS Code, press Ctrl+Shift+X (or Cmd+Shift+X on Mac), type Continue in the search bar, and install the extension by Continue Dev.
Continue is a free open-source extension. It also supports JetBrains IDEs (IntelliJ, PyCharm, etc.).
Continue ↗About this tool - 3.After installation, click the Continue icon in the left sidebar of VS Code. On first launch, the setup wizard will open - select OpenRouter as your model provider.
If the wizard doesn't appear automatically, click the gear icon in the Continue panel -> Open config.json.
Continue ↗About this tool - 4.Paste your OpenRouter API key into the API Key field. In the Model field, enter the identifier of a free model - for example, meta-llama/llama-3.3-70b-instruct:free or google/gemini-2.0-flash-exp:free.
For the current list of free models, visit openrouter.ai/models and filter by the Free tag. Free models have the :free suffix and may have request rate limits.
OpenRouter ↗About this tool - 5.Open any code file in VS Code. In the Continue chat (left panel), ask a question about your code, or select a snippet and press Ctrl+L to pass it into the AI context.
You can also select code and press Ctrl+I for inline editing directly in the file. Your code is sent to OpenRouter servers and then to the model's provider: do not send files containing keys, passwords, or confidential information.
Continue ↗About this toolPromptExplain what this code does and suggest two improvements: [paste your code here]
What this prompt doesThis prompt asks the AI to explain what the code does and suggest two improvements. Replace [paste your code here] with your code snippet.
- freeOpenRouter - free modelsModels with the :free tag are available at no cost without a credit card; the limit is roughly 10 - 20 requests per minute and about 50 - 1000 per day depending on the model.
- freeContinue (VS Code extension)Fully free open-source extension, with no limits of its own - only the model provider applies limits (in this case, free OpenRouter models).
- APIOpenRouter - paid models (Claude, GPT-4o)If you specifically need Claude or GPT-4: access is via API pricing, pay-as-you-go. Prices and current limits are on the openrouter.ai/models page.
AI services change fast - interfaces and free limits may differ from what's described.