Independent AI intelligence Two editions daily · ET
Fervor AI

Analysis · November 14, 2026 · repo

deepseek-ai/chat-demoagent-securityprivacyfrontier-models

DeepSeek's chat-demo Has No Backend, So Your API Key Lives in Your Browser

A tiny open-source app from DeepSeek shows the cleanest way to build an AI chat without a server, and exactly where that design stops being safe.

Most AI chat apps you can download hide a server somewhere. It holds the API key, counts your usage and forwards your messages to the model. You never see it, which is the point.

DeepSeek just published one that deletes the server entirely.

deepseek-ai/chat-demo is a static web page (fixed files, no server code of its own) that talks straight to the DeepSeek API from your browser. The README says it plainly: "No application backend is required: the browser connects directly to the configured API service" (README). It tagged v0.1.1 on November 13, carries an MIT license, sits around 1.7k stars, and sat fourth on Trendshift's daily board when I read it on the afternoon of November 14.

No server means no hosting bill, no account system and nothing to maintain. It also means one thing has to live somewhere else: your API key.

That trade is the whole design, and it is worth understanding even if you never run this app. A key in your own browser, on your own machine, is a reasonable deal. The same app hosted for other people, with a key inside it, is a leak waiting for a visitor.

What the app is

Think of chat-demo as a full chat client in a single folder of files. It has the features you would expect from a polished product, from branching conversations and a "deep thinking" mode to search with citations, file attachments, voice input and diagrams (README).

There are three ways to run it. You can use the hosted copy on GitHub Pages, download a release archive and double-click index.html, or build it from source.

Under the hood it speaks the Anthropic Messages format, the request shape Anthropic's Claude API uses, which DeepSeek also accepts at https://api.deepseek.com/anthropic (DeepSeek docs). The default model is deepseek-flash (store.ts).

Where your key actually goes

This is the part most people skim past. Here is the README's own description: "Your API key and settings are stored in the browser's localStorage. Conversations and original attachments are stored in IndexedDB" (README).

In plain words: localStorage and IndexedDB are two small storage boxes every browser keeps for each website. Data in them stays on your computer, separated by browser profile and by site address (the "origin"). The key never touches a DeepSeek-run server except as a header on each request.

The code matches the docs. Every chat request attaches your key in an x-api-key header (a label riding along with each web request), straight from the page (client.ts, lines 85 to 90). When you first enter a key, the app checks it by calling the /models endpoint, which a code comment notes does not incur charges (client.ts, lines 92 to 98).

A few details here are thoughtful. Chat history exports leave the API key out. "Delete all chats" wipes your conversations and keeps your key, so a cleanup does not lock you out (README).

Why that is fine for one person

Picture a house key. Keeping it in your own pocket is normal. Taping it to the front door is not, even though it is the same key.

When you run chat-demo on your laptop, the key sits in your browser, read by code you can inspect, and sent only to the API address the app was built for. That is roughly as safe as pasting the key into a config file on the same machine. The usual rules apply: anyone who can open your browser profile can read it, and so can any script running on the same site address.

That last point is why it matters which copy you use. A copy you built yourself and open from localhost runs code you can read. The hosted GitHub Pages copy is convenient, but you are trusting whatever code is deployed there each time you load it.

Why it is wrong the moment you share it

Now tape the key to the door.

Suppose you like the app, build it with your own key preloaded, and put it on a team server so colleagues can use it. Every visitor's browser now needs that key to make requests, which means every visitor can open the developer tools, look at the outgoing request and copy the x-api-key header. A static page has nowhere to hide a secret.

This is the same mistake behind a lot of fast-built AI apps. In early November, a German security firm called Crissy Field reported scanning Lovable-built apps and finding 24,664 sites that sent Supabase database records on page load without a login. The researchers noted that alone is not always a problem, since some records are meant to be public, but follow-up read-only requests found email-bearing records on 7,403 sites, in a sample they called non-representative (Techzine). Different stack, same root lesson: anything the browser can reach, a visitor can reach.

chat-demo does not make that mistake, because it never ships a key. You bring your own, and it stays yours. The risk only appears when someone changes that model.

The detail that outlives your chats

One behavior is easy to miss, and it is the most useful thing to know before you try the app.

When you attach a file, chat-demo uploads it to DeepSeek's Files API, and a code comment notes that uploads are made without an expiry time so old attachments keep working in past conversations (client.ts, line 102). DeepSeek's docs confirm that a file uploaded without an expiry is kept permanently, and that all API keys under the same account share those files (DeepSeek Files API).

The README is upfront about the consequence: "Delete all chats" clears local data, but "files already uploaded to the API service are not deleted" (README). Your browser forgets the PDF. DeepSeek's storage does not.

That is fine for a meme. Think twice before you attach a contract.

Put this into practice

Here is the lowest-friction way to try it, and the habits that keep it safe.

1. Run it locally

You need Node.js 22.12 or newer and pnpm (a package manager for JavaScript projects):

git clone https://github.com/deepseek-ai/chat-demo.git
cd chat-demo
pnpm install
pnpm dev

Then open http://localhost:8090. Enter your key in Settings before the first chat (README). To get a folder you can open without a dev server, run pnpm build and open dist/index.html. The README warns that opening it straight from disk needs your browser to allow storage on file:// pages and the API to accept those cross-origin requests, so the dev server is the smoother path.

2. Use a dedicated key

Create a separate key just for this app at platform.deepseek.com/api_keys, so you can delete it without breaking anything else. A separate key is a separate thing to revoke, not a separate budget. The DeepSeek API pages I read did not describe per-key spending caps, and they say concurrency limits apply to the whole account "regardless of which API Key is used" (DeepSeek rate limits). Check your account's billing settings for what limits you actually have.

3. Clean up uploaded files

If you attached anything sensitive, delete it on the server as well as in the app. The app itself removes files with a DELETE request to the Files endpoint (client.ts, lines 125 to 128), and you can do the same by file ID:

curl -X DELETE "https://api.deepseek.com/anthropic/v1/files/FILE_ID" \
  -H "x-api-key: $DEEPSEEK_API_KEY" \
  -H "anthropic-beta: files-api-2025-04-14"

The anthropic-beta header is what DeepSeek's docs require for its Anthropic-compatible Files endpoints (DeepSeek Files API).

4. Watch your key leave

This takes a minute and makes the design concrete. With the app open, open your browser's developer tools. In the Application (Chrome) or Storage (Firefox) tab, look under Local Storage for the page's address, and you will find your settings sitting there. Then switch to the Network tab, send a short message, and click the request to /anthropic/v1/messages. Your key is right there in the request headers as x-api-key.

Nothing is wrong with that on your own machine. It is exactly what the README describes. But now you know what any visitor to a shared copy would see, and you will not need convincing about the next step.

5. If you want to share it, add the server back

The build config lets you change where the app sends requests: createConfig({ apiOrigin, devServer }), with https://api.deepseek.com as the default (rspack.config.ts). For a team, point apiOrigin at a small proxy you run (a tiny server that sits in the middle and forwards requests), have the proxy hold the real key and check who is asking, and give visitors nothing secret. At that point you have rebuilt the backend the demo left out, which is the honest answer: shared use needs one.

Honest limitations

It is a demo at version 0.1.1. The name says so. Expect rough edges, and note that the README's release link still points to the old repository name, deepseek-chat-demo.

It is tied to DeepSeek's extensions. The README says requests include extras for search, link reading, titles and a latest_reminder message role, so "the configured service must support the corresponding capabilities." Pointing it at a generic Anthropic-compatible server will not give you every feature.

Browser storage is only as safe as the browser. A shared computer, a synced browser profile or a malicious extension can all reach localStorage. This app does not add protection beyond what the browser offers.

Spending controls are on you. Nothing in the app limits how much a key can spend, and the docs I read did not describe per-key caps.

Your call

chat-demo is a small, well-documented answer to a question many builders get wrong: where should the secret live? For one person on one laptop, the browser is a fine answer, and this app handles it carefully. For anyone else, the answer is a server you control.

Clone it, give it a throwaway key, and open your browser's developer tools while you chat. Watching your own key leave in a request header teaches the lesson faster than any article. Then decide which side of the door your next AI app's key belongs on.

Sources: deepseek-ai/chat-demo at v0.1.1 (README, src/services/api/client.ts, src/services/chat/store.ts, rspack.config.ts; reviewed November 14, 2026, commit 5d5dd75) · DeepSeek Anthropic API guide · DeepSeek Files API · DeepSeek rate limits · Techzine on the Crissy Field Lovable scan (Nov 4, 2026).