01
Get the OpenRouter API key
- Visit openrouter.ai and log in or create an account.
- Go to the API Keys section, click Create API Key, and copy the key.
Full walkthrough with billing and credits: How to get an OpenRouter key and add credits. Keep the key secure and never share it publicly.
02
Open VS Code and Copilot Chat
- Launch Visual Studio Code.
- Open the GitHub Copilot Chat panel.
03
Access the model settings
- In Copilot Chat, click the model selector (it usually says Auto).
- Select Other Models.
- Click the Settings / wrench icon.
04
Connect OpenRouter
- Click Add Model and choose OpenRouter.
- Provide a name.
- Paste your OpenRouter API key.
- Save the configuration.
Your VS Code is now connected to OpenRouter.
05
Add a DeepSeek model
- In the model search, type or paste the model you want. Example:
deepseek/deepseek-v4-flash-latest
- Or select the model from the results.
- Click Pin to save it. Pinning gives you quick access to the model later.
06
Switch the model and start using it
- Close settings and open Copilot Chat again.
- Change the model from Auto to DeepSeek V4 Flash.
- Try it:
Write a Playwright test for login functionality
All responses are now generated by DeepSeek via OpenRouter. You can add and pin multiple models (Claude, Qwen and more) and switch anytime: coding, debugging, test generation, whatever the task needs.
07
Reference links
- Video walkthroughloom.com/share/b2014ddf95c44e0bbd45e927b141ede8
- Written reference (Google Doc)OpenRouter Integration with VS Code
- OpenRouteropenrouter.ai
- First stepHow to get an OpenRouter key and add credits