DeepSeek is one of the most capable AI models available right now — and one of the cheapest. If you haven't been following why that matters, our breakdown of the V4 release covers the pricing story and what it means for anyone who builds with AI. If you use Visual Studio Code to write anything (code, scripts, config files, anything), you can connect DeepSeek directly to your editor and get a powerful AI assistant that lives right there alongside your files.
This guide will walk you through the whole thing from zero. No experience assumed. By the end, you'll have DeepSeek answering questions, explaining code, and writing for you inside VS Code — using your own API key, which costs a fraction of what a monthly subscription would.
What you'll end up with: DeepSeek working as your personal AI assistant inside VS Code, available any time you open your editor, for pennies per session.
What Are We Actually Setting Up?
Here's the picture in plain terms. VS Code is your editor — the program where you write and view code. DeepSeek is an AI model that lives on servers somewhere and responds to questions. On their own, these two things don't talk to each other.
To connect them, we install a free VS Code extension called Continue. Continue is an open-source AI assistant plugin that sits inside your editor and lets you chat with AI models, ask them about your code, get them to write or fix things — all without leaving VS Code. We then tell Continue to use DeepSeek (instead of, say, ChatGPT or Claude) by giving it your DeepSeek API key.
Here's what we'll do, step by step:
- Create a DeepSeek account and get an API key
- Add a small amount of credit to your DeepSeek account
- Install the Continue extension in VS Code
- Connect Continue to DeepSeek with your API key
- Say hello and confirm everything works
Total time: 15–25 minutes. Let's go.
Step 1: Create Your DeepSeek Account and Get an API Key
Open your browser and go to platform.deepseek.com. This is DeepSeek's developer platform — different from the regular chat interface you might have used before. Click Sign Up and register with your email or a Google account.
Once you're inside the dashboard, find the section called API Keys in the left sidebar. Click "Create new API key," give it any name you like (something like "vs-code" works fine), and click Create.
A long string of characters will appear on screen — something starting with sk-. Copy it right now and save it somewhere safe, like a text file on your desktop. DeepSeek will never show this key to you again. If you lose it you can always create a new one, but it's easier to just save it now.
This key is your password to the DeepSeek API. It's what proves to DeepSeek that requests are coming from you and should be billed to your account. Never share it publicly.
Step 2: Add Credit to Your Account
The DeepSeek API is not free — but it's genuinely cheap. We're talking about fractions of a cent per message. A $5 top-up will cover most people for weeks of regular use, sometimes longer.
In the dashboard, look for Billing or Top Up in the left sidebar. Add your payment card and deposit a small amount. Five dollars is plenty to get started and test everything. You can always add more later if you find yourself using it heavily.
Before you leave the billing section, look for a Usage Limit or Spending Cap setting. Set a monthly maximum — $10, $20, whatever feels right. This is a safety net: once you hit that number in a month, the API stops responding instead of charging you more. Set it on day one and you never have to think about it again.
Step 3: Install VS Code (If You Don't Have It Already)
If VS Code is already on your computer, skip ahead. If not: go to code.visualstudio.com, download the version for your operating system (Windows, Mac, or Linux), and install it normally. It's free and takes about two minutes.
VS Code is the most popular code editor in the world. Even if you're not a programmer, it's a useful tool for editing any kind of text file — configuration files, scripts, anything structured. And it's where DeepSeek is going to live once we're done.
Step 4: Install the Continue Extension
Open VS Code. On the left side you'll see a vertical bar of icons. Click the one that looks like four squares — that's the Extensions panel. Alternatively, press Ctrl+Shift+X on Windows or Cmd+Shift+X on Mac.
In the search box at the top, type Continue. The first result should be "Continue – Codestral, Claude, and more" by Continue. Click it, then click the blue Install button.
After a few seconds it will be installed. You might need to reload VS Code — if a "Reload" button appears, click it. Once that's done, you'll notice a new icon in the left sidebar that looks like a small chat bubble or a "C" shape. That's Continue.
Step 5: Connect Continue to DeepSeek
Click the Continue icon in the left sidebar to open the Continue panel. The first time you open it, it will ask you to choose an AI provider or set one up. You want to add DeepSeek as a custom model.
Click the settings gear icon (usually in the bottom-left of the Continue panel, or accessible via the three-dot menu) to open the Continue configuration file. This is a file called config.json that tells Continue which AI models to use and how to connect to them.
The file will already have some content. You need to find the "models" section and add DeepSeek to it. Replace or add the following block inside the models array:
{
"title": "DeepSeek Chat",
"provider": "openai",
"model": "deepseek-chat",
"apiBase": "https://api.deepseek.com",
"apiKey": "YOUR_API_KEY_HERE"
}
Replace YOUR_API_KEY_HERE with the key you saved in Step 1 — keep the quotes around it. Save the file with Ctrl+S (or Cmd+S on Mac).
A quick note on why we use "provider": "openai" even though this is DeepSeek: DeepSeek designed their API to work exactly like OpenAI's API. That means software built for OpenAI (like Continue) can talk to DeepSeek by simply pointing it at a different address. The apiBase line is what does that — it redirects the connection from OpenAI's servers to DeepSeek's servers.
Step 6: Say Hello
Click the Continue panel icon in the sidebar to open the chat window. At the top of the chat, you should see a model selector — make sure "DeepSeek Chat" is selected (the model you just added).
Type something in the chat box at the bottom. Anything. "Hello, are you working?" is fine. Press Enter.
After a second or two, DeepSeek should reply. If it does, you're set up. DeepSeek is now running as your AI assistant inside VS Code.
If nothing happens or you see an error, the most common causes are: the API key was copied incorrectly (an extra space at the start or end is enough to break it), or the billing hasn't been activated yet. Check both and try again.
What You Can Now Do in VS Code
Now that DeepSeek is connected, the Continue panel becomes your AI workspace inside the editor. A few things that work immediately and are genuinely useful:
- Ask it to explain code. Select any piece of code in your editor, then in the Continue chat type "explain this." Continue automatically sends the selected code along with your question. DeepSeek will break it down in plain language.
- Ask it to write something. "Write a Python function that reads a CSV file and prints the first 10 rows." Or "Write a bash script that backs up a folder to another location." Paste it into your file when it's done.
- Ask it to fix something. Select a broken piece of code, type "this isn't working, fix it," and describe what's going wrong. DeepSeek will often identify the issue and give you the corrected version.
- Ask it questions about your project. The
@codebasecommand in Continue lets you ask questions about all the files in your project at once — "where is the login logic handled?" or "what does this project do overall?"
You don't need to be a programmer to get value from this. If you edit config files, write automation scripts, or work with any structured text, having DeepSeek in your editor saves real time.
How Much Will This Cost You?
DeepSeek pricing is based on tokens — the unit the AI uses to measure text. Roughly speaking, one token is about three-quarters of a word. Every message you send and every reply you receive consumes some tokens, and you're charged for both.
The two DeepSeek models you'll use most often:
- deepseek-chat (their standard model): around $0.27 per million input tokens, $1.10 per million output tokens. This is the one we configured above and the right choice for most things.
- deepseek-reasoner (their advanced reasoning model): around $0.55 per million input tokens, $2.19 per million output tokens. Use this for hard logic problems, math, or complex debugging — not for everyday questions.
To put those numbers in everyday terms: a typical message exchange (you ask something, DeepSeek replies with a solid paragraph) costs roughly $0.0004. That's four ten-thousandths of a dollar. The $5 you deposited covers somewhere around 10,000–15,000 exchanges at that rate. For a person using this casually, $5 lasts months.
For comparison, GitHub Copilot costs $10–$19 per month. Claude Pro costs $20 per month. A $5 deposit on DeepSeek can go much further than either of those for light-to-moderate use. If you're still weighing whether the API makes sense versus a flat subscription for your usage level, we've laid out the full comparison in plain language.
How to Keep Costs Under Control
Even though the numbers are tiny, it's worth understanding the levers you have — especially if you ever build something that sends many requests automatically.
The monthly spending cap is your best friend
We mentioned this in Step 2 and it bears repeating: set a monthly limit in your DeepSeek billing dashboard. When the limit is hit, the API simply stops responding until the next month — no surprise charges. This is the most important cost-control setting, and it takes 30 seconds to configure.
Shorter context = fewer tokens
The more text Continue sends to DeepSeek with each message, the more tokens get consumed. When you select a large block of code and ask a question about it, you're sending all of that selected text. Be deliberate: select only the relevant part, not entire files. A tighter selection costs less and often gets a better answer because the model isn't distracted by irrelevant surrounding code.
Use the right model for the task
Most questions — writing code, explaining things, fixing bugs — work fine with deepseek-chat. The deepseek-reasoner model is for when you need multi-step logical reasoning (algorithm design, math problems, architectural decisions). Don't pay for the expensive model on tasks the cheaper one handles easily. In Continue, you can switch between models from the model selector at the top of the chat — you don't need to reconfigure anything.
Watch the usage dashboard
Log into platform.deepseek.com occasionally and check the usage section. It shows you exactly how many tokens you've consumed and what it cost. Most first-time users are surprised by how low the numbers are. But if you ever see a spike, the dashboard will tell you when it happened — which is usually enough to figure out what caused it.
Don't leave long conversations running
In Continue, each time you send a message the entire conversation history is sent along with it. A very long chat thread uses more tokens per message, because the model needs to re-read everything that came before. If you've been in a long back-and-forth about one topic and you want to start asking about something else, start a new chat. It's cheaper and the model focuses better on the new topic without old context pulling its attention.
Common Problems and What They Mean
- Continue shows an error or says "model not found." Double-check your
config.json. The most common mistakes are a missing comma between fields, an extra or missing quote, or the model name spelled wrong (it should be exactlydeepseek-chat). - The chat just spins and never replies. Usually means the API key is wrong. Check that you copied it completely — these keys are long and it's easy to miss the last few characters.
- "Insufficient balance" error. Your DeepSeek account has run out of credit. Go to platform.deepseek.com and top up your balance.
- Continue doesn't show a model selector. Make sure you saved the
config.jsonfile after editing it. Try closing and reopening the Continue panel.
You're Ready
That's genuinely all of it. You now have one of the best AI models in the world running as a native assistant inside your code editor, costing you a fraction of a cent per conversation. No subscriptions. No browser tabs to switch between. Just a chat panel on the left and DeepSeek ready when you need it.
The people who get the most out of this setup are the ones who make it a habit — not a novelty. Keep the Continue panel open. Ask it the questions you'd normally Google. Let it draft the things you'd normally type from scratch. After a week it stops feeling like a tool and starts feeling like part of how you work.