How to Set Up a DeepSeek Chrome Extension with V4 (Step-by-Step)

DeepSeek Chrome extension setup: run deepseek-flash or deepseek-v4-pro in a Manifest V3 side panel, keep your API key local and estimate peak/off-peak costs.

Tutorials·April 25, 2026·By DS Guide Editorial
DeepSeek Chrome extension title card: eyebrow 'Tutorial · Chrome extension', title 'Chrome Extension', tagline 'A side panel that sends selected text to the API.', and four stats: $0.30 Flash input at peak, $0.15 Flash input off-peak, 1M context tokens and 384K maximum output, beside a compact desktop computer illustration.

Want DeepSeek answers next to your browser tab without copy-pasting into a chat window? A DeepSeek Chrome extension does exactly that — it pipes selected text, page summaries, or freeform questions into the DeepSeek API and shows the response inline. The catch is that there is no single “official” DeepSeek extension in the Chrome Web Store; you choose between community extensions that accept a DeepSeek API key, or you build a minimal one yourself in about 80 lines of code.

This tutorial walks through both routes using the two models DeepSeek’s pricing page lists as of October 2026: deepseek-flash (served by DeepSeek-V4.1-Flash-1017) and deepseek-v4-pro (served by DeepSeek-V4-Pro-0813). By the end, you will have a working side panel that sends selected text to either model, with cost estimates and the common errors mapped out.

What you’ll build

Illustration: Browser with a DeepSeek Chrome extension popup open beside an article, showing summarise and ask actions.

You will end this tutorial with a Chrome extension that opens a side panel, takes a prompt or the currently selected text on a webpage, and returns a response from the DeepSeek API. The extension stores your API key locally in chrome.storage.local, sends requests to the OpenAI-compatible endpoint POST /chat/completions, and lets you pick either deepseek-flash or deepseek-v4-pro.

Two paths are covered:

  • Path A — Install a community extension from the Chrome Web Store and paste in your API key. Fastest, but you trust someone else’s code with your key.
  • Path B — Build your own minimal extension using Manifest V3. A few small files, full control, and it loads unpacked from a local folder.

Both paths target the same API surface, so the request/response logic is identical. If you are new to the API itself, the DeepSeek API getting started guide covers authentication and your first request before you wire it into a browser.

Prerequisites

  • Google Chrome 120+ (or any Chromium browser supporting Manifest V3 — Edge, Brave, Arc).
  • A DeepSeek account and an API key. If you don’t have one, follow the get a DeepSeek API key walkthrough.
  • A funded balance on the DeepSeek billing console. Short prompts on deepseek-flash cost fractions of a cent — see the cost section below.
  • For Path B only: a text editor (VS Code is fine) and basic familiarity with JavaScript and JSON.

Why a Chrome extension instead of the web app?

The DeepSeek web chat at chat.deepseek.com is fully functional and maintains conversation history across turns. A browser extension wins on three specific workflows:

  • In-context selection. Highlight a paragraph in any tab and send it to DeepSeek without switching windows.
  • Page-aware prompts. Ask “summarise this article” or “extract the key claims” with the page’s text injected automatically.
  • Model and parameter control. Pick deepseek-flash or deepseek-v4-pro, switch thinking mode on or off, and set temperature per task in non-thinking mode — none of which the web UI exposes the same way.

The trade-off: the API is stateless. Unlike the web chat, the extension must resend the conversation history with every request. For a deeper read on the difference, see DeepSeek browser vs app.

Path A: Install a community extension

Several third-party extensions in the Chrome Web Store accept a DeepSeek API key. Search for “DeepSeek” or “AI sidebar” and look for these signals before installing:

  1. Open-source, with a linked GitHub repo you can read.
  2. API key stored locally in chrome.storage.local, never sent to a third-party server.
  3. Recent updates (within the last 90 days) and a non-trivial install count.
  4. Manifest V3 — according to Chrome’s Manifest V2 deprecation timeline, Manifest V2 extensions no longer run from Chrome 139 onward.

Configure the extension

After install, open the extension’s options page and:

  1. Paste your API key from the DeepSeek console.
  2. Set the base URL to https://api.deepseek.com (DeepSeek’s OpenAI-format base URL).
  3. Set the model to deepseek-flash for general use.
  4. If the extension exposes thinking mode, note that DeepSeek enables it by default; switch it off for quick lookups and leave it on for harder reasoning tasks.

If the extension still has deepseek-chat or deepseek-reasoner hard-coded, change it: those IDs were scheduled for retirement on 2026-07-24 at 15:59 UTC and are no longer listed in DeepSeek’s documentation. Older deepseek-v4-flash settings are still accepted, but they are legacy names served by DeepSeek-V4.1-Flash-1017; enter deepseek-flash instead.

Path B: Build your own minimal extension

This is the route we recommend if you care about what your API key touches. The extension below is a complete Manifest V3 build: manifest.json, sidepanel.html and sidepanel.js, plus a two-line background.js.

Step 1: Create the project folder

Make a directory called deepseek-sidepanel to hold these files.

Step 2: Write the manifest

Create manifest.json with the following JSON. The host_permissions entry is what allows fetch calls to the DeepSeek API from inside the extension.

{
  "manifest_version": 3,
  "name": "DeepSeek Side Panel",
  "version": "1.0.0",
  "description": "Send selected text to the DeepSeek API.",
  "permissions": ["sidePanel", "storage", "activeTab", "scripting"],
  "host_permissions": ["https://api.deepseek.com/*"],
  "action": { "default_title": "Open DeepSeek panel" },
  "side_panel": { "default_path": "sidepanel.html" },
  "background": {
    "service_worker": "background.js"
  }
}

Step 3: Write the side panel HTML

Create sidepanel.html. This is the visible UI: a key field, a model picker, a thinking-mode switch, a prompt box, and a response area.

<!doctype html>
<html>
  <body>
    <input id="key" type="password" placeholder="DeepSeek API key" />
    <select id="model">
      <option value="deepseek-flash">deepseek-flash</option>
      <option value="deepseek-v4-pro">deepseek-v4-pro</option>
    </select>
    <label><input id="think" type="checkbox" /> Thinking mode</label>
    <textarea id="prompt" rows="6"></textarea>
    <button id="send">Send</button>
    <pre id="out"></pre>
    <script src="sidepanel.js"></script>
  </body>
</html>

Step 4: Write the side panel JavaScript

Create sidepanel.js. This file builds the request body, calls POST /chat/completions, and renders the response. Because thinking mode is on by default in the DeepSeek API, the code sends "thinking": {"type": "disabled"} explicitly when the box is unticked. temperature is only sent in non-thinking mode, since DeepSeek’s Thinking Mode guide says it has no effect when thinking is on.

const $ = (id) => document.getElementById(id);

chrome.storage.local.get("key", (r) => { if (r.key) $("key").value = r.key; });
$("key").addEventListener("change", (e) =>
  chrome.storage.local.set({ key: e.target.value })
);

$("send").addEventListener("click", async () => {
  const thinking = $("think").checked;
  const body = {
    model: $("model").value,
    messages: [{ role: "user", content: $("prompt").value }],
    thinking: { type: thinking ? "enabled" : "disabled" },
    max_tokens: 4096,
    stream: false
  };
  if (thinking) {
    body.reasoning_effort = "high";
  } else {
    body.temperature = 1.3;
  }
  const res = await fetch("https://api.deepseek.com/chat/completions", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "Authorization": "Bearer " + $("key").value
    },
    body: JSON.stringify(body)
  });
  const data = await res.json();
  $("out").textContent = data.choices?.[0]?.message?.content ?? JSON.stringify(data, null, 2);
});

A small background.js service worker is needed to open the panel when the toolbar icon is clicked:

chrome.action.onClicked.addListener((tab) =>
  chrome.sidePanel.open({ windowId: tab.windowId })
);

Step 5: Load the extension in Chrome

  1. Open chrome://extensions.
  2. Toggle Developer mode on (top-right).
  3. Click Load unpacked and select your deepseek-sidepanel folder.
  4. Pin the extension to the toolbar.

Verify it worked

Click the toolbar icon to open the side panel, paste your API key, leave the model on deepseek-flash with thinking unticked, and type “Reply with the single word PONG.” Click Send. The response area should show PONG. If it shows a JSON error object instead, match the status code against the table under “Common errors and fixes”.

With thinking mode ticked, the response object also contains reasoning_content alongside the final content. The minimal extension above only renders content; printing data.choices[0].message.reasoning_content as well takes a few extra lines.

Cost: what does this actually run?

API pricing as of October 2026, per the official DeepSeek pricing page (USD per 1M tokens). Off-peak rates are half the peak rates; peak hours are 01:00–04:00 and 06:00–10:00 UTC, Monday to Friday, excluding Chinese public holidays, and every other hour is off-peak.

Model Input cache hit (peak / off-peak) Input cache miss (peak / off-peak) Output (peak / off-peak)
deepseek-flash $0.006 / $0.003 $0.30 / $0.15 $1.20 / $0.60
deepseek-v4-pro $0.044 / $0.022 $1.32 / $0.66 $3.96 / $1.98

A typical Chrome-extension workload — say 200 prompts a day, each with a 500-token system prompt (cached), a 300-token user message, and a 600-token reply — costs the following on deepseek-flash:

  • Cached input: 500 × 200 = 100,000 tokens × $0.006/M = $0.0006 peak; × $0.003/M = $0.0003 off-peak
  • Uncached input: 300 × 200 = 60,000 tokens × $0.30/M = $0.018 peak; × $0.15/M = $0.009 off-peak
  • Output: 600 × 200 = 120,000 tokens × $1.20/M = $0.144 peak; × $0.60/M = $0.072 off-peak
  • Daily total: $0.1626 if every call falls in peak hours, $0.0813 if every call is off-peak — about $4.88 or $2.44 over 30 days.

The same workload on deepseek-v4-pro comes to $0.5588 a day at peak ($0.0044 + $0.0792 + $0.4752) or $0.2794 off-peak ($0.0022 + $0.0396 + $0.2376) — about $16.76 or $8.38 over 30 days. With thinking mode on, the model also generates reasoning_content, and DeepSeek bills all output tokens the model produces, so expect higher output counts than the 600 tokens assumed here. For a richer estimator, the DeepSeek pricing calculator handles mixed workloads.

DeepSeek’s official temperature guidance is worth coding directly into your extension’s UI as presets. It applies to non-thinking mode only: in thinking mode (the API default), temperature is accepted but has no effect.

Task type Temperature Notes
Code generation, math 0.0 Deterministic output
Data analysis, cleaning 1.0 Balanced
General chat, translation 1.3 Default for the side panel above
Creative writing, poetry 1.5 Looser sampling

Other parameters worth surfacing in a Chrome extension UI: reasoning_effort (low, high or max when thinking is on), max_tokens (both current models support up to 384K output tokens against a 1M-token context window), stream for token-by-token rendering, and response_format={"type": "json_object"} for JSON mode. JSON mode is designed to return valid JSON — not guaranteed — so always include the word “json” in your prompt with a small example schema, and set max_tokens high enough that the output cannot be truncated mid-object.

Common errors and fixes

Symptom Likely cause Fix
401 Authentication Fails Bad or missing API key Re-paste the key; check it has no leading/trailing spaces
402 Insufficient Balance Zero balance Top up in the billing console
429 Rate Limit Reached Too many requests, or the account’s concurrency limit (2,500 for deepseek-flash, 500 for deepseek-v4-pro) exceeded Add a small backoff; see the DeepSeek API rate limits reference
CORS error in console host_permissions missing Confirm https://api.deepseek.com/* in manifest.json
Empty response, JSON mode Documented edge case Re-prompt; raise max_tokens; include “json” + schema in prompt
Truncated answer with thinking on max_tokens too low for reasoning plus answer Raise max_tokens (the maximum output is 384K tokens on both models)
Model ID rejected Typo, or a legacy ID such as deepseek-chat (scheduled for retirement on 2026-07-24) Use deepseek-flash or deepseek-v4-pro

Security notes

Diagram of a Chrome extension architecture wiring popup, background script and DeepSeek V4 API.

Three things worth doing before you trust any extension — including your own — with an API key:

  • Never hardcode the key in the source. The extension above stores it via chrome.storage.local, which keeps it on the local machine and out of the codebase.
  • Restrict host_permissions to the DeepSeek domain only. A wildcard like <all_urls> is overkill and a red flag in any third-party extension you install.
  • Rotate the key if you publish or share the extension folder. The DeepSeek console allows revocation and re-issue at any time.

Next steps

The side panel above is intentionally minimal. Sensible upgrades, in order of usefulness:

  1. Streaming. Switch stream: true and parse server-sent events for token-by-token rendering. The DeepSeek API streaming guide covers the SSE format.
  2. Selected-text capture. Add a content script that reads window.getSelection() and pre-fills the prompt box.
  3. Conversation history. Maintain a messages array in chrome.storage.local so multi-turn chat works — remember the API itself is stateless.
  4. Context caching. Keep the system prompt at the start of every messages array so DeepSeek’s automatic prefix cache kicks in and you pay the cache-hit rate. See the DeepSeek context caching reference.

If you want a different surface for the same models, the DeepSeek with VS Code tutorial wires the API into an editor instead of a browser, and the broader DeepSeek tutorials hub catalogues every integration on the site.

Is there an official DeepSeek Chrome extension?

Not that DeepSeek documents. DeepSeek’s official surfaces are the web chat at chat.deepseek.com, the mobile apps and the API, and its API documentation (checked 23 October 2026) does not list a first-party browser extension. The Chrome Web Store hosts community-built extensions that accept a DeepSeek API key. Verify any extension is open-source, recently updated, and uses Manifest V3 before pasting in a key. For a vetted starting point, see verify official DeepSeek app.

How much does a DeepSeek Chrome extension cost to run?

Extension code is free; you only pay DeepSeek API rates. On deepseek-flash, 200 prompts a day with the token sizes above comes to about $4.88 over 30 days if every call lands in peak hours, or $2.44 if every call is off-peak. On deepseek-v4-pro, the same load is about $16.76 at peak or $8.38 off-peak. Top up a small balance in the DeepSeek billing console and watch usage. The DeepSeek API pricing page lists the current per-million-token rates.

Can I use the legacy deepseek-chat model ID in the extension?

Don’t. deepseek-chat and deepseek-reasoner were scheduled for retirement on 2026-07-24 at 15:59 UTC and are no longer listed in DeepSeek’s documentation. Use deepseek-flash (or deepseek-v4-pro) instead; switching is a one-line model change and the base_url stays https://api.deepseek.com. The DeepSeek OpenAI SDK compatibility reference covers the migration.

Does the Chrome extension keep my conversation history?

Only if you build it to. The DeepSeek API is stateless — the server does not remember prior turns, so the client must resend the full messages array every request. The web chat at chat.deepseek.com keeps history server-side; an extension does not unless it stores messages locally. The DeepSeek browser vs app guide explains this difference.

What’s the difference between deepseek-flash and deepseek-v4-pro in a browser extension?

deepseek-flash is served by DeepSeek-V4.1-Flash-1017, is the only current DeepSeek API model that accepts images, and has the lower rates. deepseek-v4-pro is served by DeepSeek-V4-Pro-0813 and costs 3.3× as much per output token ($3.96 vs $1.20 at peak, $1.98 vs $0.60 off-peak). Both share a 1M-token context window, up to 384K output tokens, and thinking mode (on by default). Start with Flash; switch the picker to Pro for a task when Flash’s answer isn’t good enough. Compare them in detail in the DeepSeek V4 overview.

Sources & Methodology

Last source check: October 23, 2026

Primary sources

Technical references

Methodology

Information in this article was checked against the official DeepSeek documentation, the article's cited primary sources, and the deepseekai.guide pricing dataset on the date shown above. Where third-party numbers are quoted, the originating source is linked inline so the reader can verify and re-check.

Data confidence

High for facts cited inline with primary-source links; medium for context narrative.

Editorial note

AI tooling moves quickly. If you spot an outdated number or a broken link, the contact link in the footer is the fastest way to flag it for the editorial team.

Leave a Reply

Your email address will not be published. Required fields are marked *