1. "Using DeepSeek online" is a phrase that hides four different things
Search for "using DeepSeek online" and you get three kinds of results: the official chat web page, API integration tutorials, and a scattering of third-party sites advertising "free, unlimited" access. Because all three are treated as the same thing, every problem in this article follows: you use the web page happily, the task changes slightly, and you discover it cannot do anything at all. Or the reverse: you wire up a key on an aggregator, everything works, and one Monday morning every request returns 401.
The root cause is that "online usage" packs four things with completely different properties into a single phrase: the official web chat, the official API, third-party aggregators, and self-hosted deployment. These four paths barely overlap on threshold, cost shape, controllability, and suitable scenario. Their boundaries cannot be summarized as "free versus paid".
1.1 The same "DeepSeek" can mean four different products
Clarification first, otherwise every comparison later has no anchor.
- Official web chat: the interface at chat.deepseek.com. Natural-language interaction, with web search, a deep-thinking mode, and file upload (subject to the current UI). It is a product, not an interface.
- Official API: api.deepseek.com, OpenAI-compatible, supporting Function Calling, JSON Output, and cache-hit pricing, with billing, error codes, and usage receipts. It is a capability.
- Third-party aggregator: a gateway someone else built, forwarding to official or third-party upstreams. Cheap to join, trivial to integrate, but it is neither official nor your own private system.
- Self-hosted deployment: running the open-source weights on your own hardware or cluster (vLLM / SGLang / Ollama / llama.cpp, with FP8 / INT4 / AWQ quantization). It is an asset.
All four may sit on the same model weights, but the delivery form determines about 90% of the engineering properties. Always judge whether a path is usable by looking at the delivery form first and the model name second. The model you meet on the web and the one the API calls deepseek-chat are not necessarily the same thing in terms of capability, and unpacking that is what this article is for.
1.2 The four questions this article answers
- What can each path do, and what can it explicitly not do? (Not a pros-and-cons list — a capability boundary.)
- Why is the official web chat "pleasant to use but useless for engineering"? Which specific capabilities block it?
- What are the real risks of third-party aggregators, and how do you judge whether a site is trustworthy in ten minutes?
- Which signals mean "it is time to migrate from the web chat to the API"? The criteria should be a tick-box list.
Every price, context length, and model status in this article carries its source and a verification method. Anything that can change over time (pricing, rate limits, UI features, context ceilings) is stated as "defer to the official documentation" with a command you can run yourself, because an article published in November 2026 cannot guarantee anything on your behalf in 2027.
2. The four paths side by side
Lay the four paths flat and ask them the same set of questions. The table in this section is the basis for every judgement that follows.
2.1 Official web chat: a product for people
The web chat's user is a human, and the unit of interaction is "one conversation". You type, it answers; you copy the answer and paste it elsewhere. It wraps model capability in a carefully designed interface: reasoning traces collapse into a panel, code blocks get a one-click copy button, files can be dragged in, web search has a toggle. Those affordances are things an API cannot give you, because an API returns text and a usage receipt.
Its ceiling comes from the same premise — the user is a person. Anything that requires programmatic, repeatable, batchable, or attributable-to-a-budget execution simply does not exist in the web chat, because the product was never designed with an entry point for it.
2.2 Official API: a capability for programs
The API's user is a program, and the unit of interaction is "one request". The base_url is https://api.deepseek.com and it is compatible with OpenAI's Chat Completions format, so most OpenAI SDKs work after changing a base URL. Three capabilities matter most: Function Calling (the model emits structured tool-call requests), JSON Output (response_format constrains the output), and cache-hit pricing (repeated prefixes are billed at a much lower rate, and the receipt tells you exactly how many tokens hit). These three are precisely what the web chat cannot give you.
2.3 Third-party aggregators: someone else's channel
What an aggregator does is plain: it holds a pool of official or third-party keys and exposes a compatible API, and you top up and buy credits. The entire value of this path is "cheap + easy to integrate + no vetting"; the entire cost is "your data leaves your control + the channel is not yours to control + it can die at any time". It is a pure trade: control for price.
2.4 Self-hosted deployment: your own asset
Self-hosting puts the weights on your own hardware, so not a single byte of data leaves your data centre, and you buy complete control over latency, version, and data boundary. The price is VRAM, operations, and access to brand-new models — locally you run published open-source weights, so you wait for an official release to be open-sourced. This is a trade of long-term certainty for short-term capability.
2.5 Comparison table of the four paths
| Dimension | Official web chat | Official API | Third-party aggregator | Self-hosted |
|---|---|---|---|---|
| Barrier to entry | Zero — open a browser | Low — top up, get an API key | Low — top up and register, sometimes an invite code | High: GPU, serving stack, weights, ops capability |
| Cost shape | Mostly free (the official site may announce limits during peak periods or holidays — defer to official announcements) | Per-token, cheaper on cache hits | Top-up / per-call / multiplier billing, rules set by the operator | One-time hardware plus ongoing power, colocation, and people |
| Cost predictability | Poor — you cannot budget by call volume | Good — you can bill against actual usage | Medium — depends on how stable the operator's rules are | Good but the bar is high; idle capacity is still cost |
| Controllability | Low — model version, parameters, and context are decided by the UI | Fairly high — model id, parameters, error codes, replayability | Low — the model version may be a shadow version, the channel can break at any time | Highest — weights, version, concurrency, and isolation are all yours |
| Data boundary | Data leaves your device into the official system | Data leaves your device into the official system (check the agreement and the region) | Data additionally passes through the aggregator's servers | Data never leaves your data centre |
| Programmatic ability | None: no function calling, no batch, no JSON contract, no streaming callbacks, no logs | All of it: function calling, JSON, batch, concurrency, retries, streaming | Whatever the operator implemented — usually only "it connects" | All of it, plus you can tune batching, quantization, and scheduling |
| Stability / SLA | No external commitment | Official SLA and status page | None — if the operator goes down, that is that | Depends entirely on your own operations |
| Good fit | Exploration, one-off tasks, answers a human reads, non-sensitive data | Production systems, batch processing, agents, anything needing structured output | Personal tinkering, temporary validation, low-risk non-sensitive workloads | Data that must not leave, compliance, offline use, very high concurrency |
| Poor fit | Any chain that needs programmatic calls, batching, or auditability | Very high frequency with data that absolutely must not leave | Production main paths, confidential data | Light personal needs, chasing the newest model at launch |
3. The real capability boundary of the official web chat
This section is not about whether the web chat is nice — it is very nice. It is about what it cannot do, and why those limitations are structural rather than temporarily missing features.
3.1 No Function Calling: not "unsupported", but "no entry point"
The official DeepSeek API supports Function Calling; the web chat does not. To understand the difference, note that the web chat's "tools" are built into the product and defined by the vendor (web search, deep thinking), not functions you define with a schema that the model then calls. You cannot register "look up the shipment for order 12345" as a function inside the page and have the model emit {"name": "query_logistics", "arguments": {...}} and wait for your program to execute it and feed the result back.
Function Calling is the bedrock of every agent shape. Without it you have three remaining options: let the model emit text and guess the calls with a regex (too brittle to ship), push the tool logic into the prompt and let it "compute it itself" (a hallucination minefield), or abandon tooling altogether. None of these is solved by "making do with the web chat".
3.2 No programmable JSON output contract
On the API side you can constrain the output with response_format: {"type": "json_object"} (the exact supported range should be confirmed against the official documentation). The web chat cannot do this. If you type "output only JSON, no explanation", the model will typically give you:
- the content wrapped in a ```json code block (Markdown fencing);
- a leading "Sure, here is the result:" before the JSON;
- a trailing "Hope this helps!" after the JSON;
- occasionally a trailing comma, or numbers written as
"123"strings.
None of that matters to a human reader, and all of it becomes an incident in a downstream parser. To do this from the web chat you must write a prompt plus a regex extractor plus a JSON repairer, and accept that it will break on some awkward input one day. What you are really doing is reimplementing response_format with text-interface tooling — which is precisely the argument that what you need is the API, not the web chat.
3.3 No batch interface: one-at-a-time is a product decision
The API has batch submission (DeepSeek's batch endpoint and its pricing should be confirmed in the official documentation; it normally offers a lower unit price and a longer completion window), so you can submit hundreds or thousands of requests at once and collect results asynchronously. The web chat has no such concept and no equivalent: you can only ask one question at a time and copy one answer at a time.
Do the arithmetic. Suppose you have 50,000 tickets to classify, averaging 500 input tokens and 50 output tokens each. Via the API in batch: 25M input tokens and 2.5M output tokens; priced at V3.2's $0.14 and $0.56 per million tokens that is roughly $4.9 (final billing rules should defer to the official pricing page). Via the web chat: 50,000 human interactions at 30 seconds each (including reading, copying, pasting) is about 416 hours of human labour — 50 working days for one person, before counting rework, during which the model itself may have cost you nothing.
3.4 Cache-hit pricing does not exist on the web chat
The API's cache mechanism is the most easily missed cost lever in long-system-prompt scenarios: when the same prefix (system prompt, few-shot examples, fixed documents) is reused, subsequent requests are billed for that prefix at a much lower rate, and the receipt states the hit explicitly via usage.prompt_cache_hit_tokens. The article at id=100 on this site does the full "cache hits save 98%" calculation, and the conclusion holds for the API.
The web chat is not billed, so there is no cache-hit price to benefit from. Its prompt reuse shows up only as the felt experience of "starting a new conversation loses the thread" — there is no cost-side signal at all. In other words, you can never learn cache optimization on the web chat, because there is no feedback to learn from. You have to build that understanding before migrating, or the first invoice after migration will surprise you.
3.5 Context and session management are UI-level
On the API, context is programmable: you know exactly how many tokens you sent, you know what happens on overflow, and you can trim history yourself. On the web chat, context management is product behaviour: conversations grow, the way history scrolls, when it is truncated, and whether attachments count as history all depend on the interface, and there is no stable external contract. The officially published context figures (V3 at 128K, V3.1/V3.2 at 160K, V4 Pro at 128K, V4.1-Flash at 1M with up to 384K maximum output) describe the API-side model capability and cannot be read as a promise about the web chat's conversation limit.
Verifying this is simple: open a fresh session, paste a numbered long document, ask it to "remember entry N", and keep lengthening until the answer degrades into "I don't remember" or becomes irrelevant. That experiment measures the behaviour of the interface you actually have — more accurate than any secondhand claim, and more likely to change over time, so re-run it whenever it matters.
3.6 What the web chat is genuinely good at
Boundaries done. Now its strengths. Four scenarios where the web chat is clearly the optimal choice:
- Exploration and iteration: when you are not yet sure what to ask, changing the prompt costs almost nothing (one sentence). This is the pre-requirements phase.
- One-off long-document reading: drop in a contract, a paper, or a log file and get a summary or a clause list. A human reads the conclusion; no structured output is needed.
- Answers that need human judgement: ideas, option comparisons, code approaches. "The second approach sounds better" is a judgement a human makes more efficiently.
- Non-sensitive data: public material, non-confidential drafts, sample code.
The real waste is not "you used the web chat" — it is using the web chat to do work only a human should do, such as pasting 300 tickets in every day to classify them. Humans doing a machine's job is the largest cost leak, and it is the one that never shows up in a token invoice.
3.7 Web chat capability checklist
| Capability | Official web chat | Official API | Note |
|---|---|---|---|
| Multi-turn natural conversation | Supported | Supported | The API requires you to maintain the messages array |
| Deep thinking / reasoning mode | Supported (UI toggle) | Supported (parameter) | Parameter names should defer to the official documentation |
| Web search | Supported (UI toggle) | You must integrate a search tool yourself | On the API side, compose it with function calling |
| File upload | Supported | Handle it per model capability (V4.1-Flash supports image input) | Defer to the official documentation |
| Function Calling (your own schema) | None | Supported | Hard boundary — the bedrock of agents |
| JSON Output contract | None (prompt only) | Supported | Hard boundary — the precondition for downstream parsing |
| Batch submission | None | Supported (defer to the official documentation) | Hard boundary — the precondition for batch work |
| Cache-hit pricing | None (not billed) | Supported | The main lever for cost optimization |
| Programmatic retry / timeout / circuit breaking | None | Supported (you implement it) | Mandatory for production paths |
| Usage receipt and reconciliation | None | Yes (the usage field) | The precondition for cost attribution |
| Auditability and replay | None | Supported (you persist it) | The precondition for compliance and debugging |
4. The real risks of third-party aggregators
Aggregators are the most chaotic part of this market and the most dangerous. This section is not about whether aggregators are good; it is about the specific shape of the risks and how to investigate them.
4.1 The first red line: your data passes through a third party
You send a request to an aggregator, and the aggregator forwards it upstream. That means your prompt, your parsed attachments, the model's answer, and the details you entered at signup all pass through someone else's servers. They can read plaintext, they can write logs, they can be breached, and they can hand over cached history if they run out of money or are raided.
The trust chain around the API key is worse. On the official path, the key only moves inside the official system. On the aggregator path, you must hand the aggregator a key that can spend your credits. If your application hardcodes an aggregator key and that code lands in a public repository, you have published your quota. The official API supports project-scoped keys, least privilege, and instant revocation; aggregators generally have no equivalent permission model.
One simple rule: anything that leaks on upload (customer identity records, contracts, unpublished financials, source-code secrets, production logs, national ID or medical records) must not pass through an aggregator. There are no exceptions, no matter how good the discount.
4.2 The model version may be a shadow version
The most covert thing an aggregator can do is map a model id onto an older or cheaper model while you believe you are using the new one. Because the API is OpenAI-compatible, the request succeeds and the response shape is right — only quality quietly degrades. If you use such a site for benchmarking, your conclusions are invalid without any error being raised.
Detection requires a behavioural probe that distinguishes the versions. The idea is to construct an input where only a newer model gives a particular answer or a particular format, then check whether the response matches. The script below runs against any OpenAI-compatible endpoint (including aggregators) and you compare its output with the official endpoint:
# shadow_probe.py —— detect whether the model id matches the actual model
import json, os, urllib.request
def ask(base, key, model, payload):
req = urllib.request.Request(
base.rstrip("/") + "/chat/completions",
data=json.dumps(payload).encode("utf-8"),
headers={"Authorization": "Bearer " + key, "Content-Type": "application/json"},
)
with urllib.request.urlopen(req, timeout=90) as r:
return json.loads(r.read().decode("utf-8"))
PROBES = [
# 1) Instruction following: demand exactly one token
{"name": "strict_token",
"payload": {"model": MODEL, "messages": [{"role": "user", "content": "Output only one character, no punctuation, no spaces: the digit 7"}],
"max_tokens": 16, "temperature": 0}},
# 2) JSON mode: demand structured output
{"name": "json_mode",
"payload": {"model": MODEL, "messages": [{"role": "user", "content": "Output a JSON object with key ok and value true"}],
"response_format": {"type": "json_object"}, "max_tokens": 64, "temperature": 0}},
# 3) Long-prefix consistency: observe the cache-hit receipt
{"name": "cache_probe",
"payload": {"model": MODEL,
"messages": [{"role": "system", "content": "You are a bot that only answers OK." + ("filler text. " * 400)},
{"role": "user", "content": "Answer OK"}],
"max_tokens": 16}},
]
BASE = os.environ.get("DS_BASE", "https://api.deepseek.com")
KEY = os.environ["DS_KEY"]
MODEL = os.environ.get("DS_MODEL", "deepseek-chat")
for p in PROBES:
try:
r = ask(BASE, KEY, MODEL, p["payload"])
ch = r["choices"][0]["message"]
usage = r.get("usage", {})
print(f"[{p['name']}] content={ch.get('content')!r}")
print(f" finish={r['choices'][0].get('finish_reason')} usage={json.dumps(usage, ensure_ascii=False)}")
except Exception as e:
print(f"[{p['name']}] ERROR {e}")
How to read it: run the same probe set against the official endpoint and the aggregator endpoint and compare item by item. Output style, the field names and structure of usage, the values of finish_reason, and error-code formats can all expose who is upstream — an aggregator that wraps the API a second time usually ends up with usage fields that do not match the official shape (missing prompt_cache_hit_tokens, missing prompt_cache_miss_tokens, or a self-invented billing schema). If there is no cache-hit receipt at all, reassess the value of that channel: without it you cannot do cost optimization.
4.3 Free quotas are not uniform, and "free" itself has a price
"Free" in aggregator context means at least four different things: a one-time signup grant, a daily reset quota, an invite code that raises the limit, and whatever tiny trial credit the upstream granted the aggregator. Their common property is that none of them is contractual, and all can change at any time.
The more practical problem is what happens when the quota runs out. Some return 429, some queue silently, some degrade to a smaller model, and some quietly switch to a third-party model and keep going. The last one is the most dangerous, because it raises no error and your quality metrics quietly fall. The remedy is an exhaustion drill early in the integration: drop the balance to near zero, watch the response body and the logs, confirm the behaviour matches your expectations, and confirm errors are not swallowed.
4.4 Stability and billing semantics are out of your control
An aggregator is a channel business. Its upstream keys can be rate-limited, revoked, repriced, or forced into real-name verification. All three outcomes hit you directly, and not gracefully: rate limiting becomes 429 in your peak hours, revocation becomes a blanket 401, and a price rise means your balance is charged at the new rate, and you learn about it from the invoice.
Billing semantics are a minefield too. Before integrating, get answers to these questions in writing:
- What is the relationship between the amount paid and the credits received (multiplier, bonus credits, expiry)?
- Is it billed per token, per call, or whichever is larger?
- How are cache-hit requests billed?
- Are failed or timed-out requests billed (many sites start the clock when the request leaves you, which directly determines your retry economics)?
- Refund rules and balance validity period?
- If an upstream model raises its price, is the rate adjusted automatically, and is notice given?
4.5 Judging an aggregator in ten minutes: a self-audit checklist
The checklist below is written to the standard "answerable, or eliminate". An item you cannot get an answer to is itself the answer.
| # | Check | How to check | Elimination red line |
|---|---|---|---|
| 1 | Operating entity and jurisdiction | Terms of service, filing information, company name | No identifiable entity, or a shell registered days ago |
| 2 | Privacy policy and data retention | Ask whether prompts are retained, for how long, and whether they are used for training | No privacy policy at all |
| 3 | Data-flow description | Ask whether third-party models are involved or data is resold | Evasive, or an explicit admission of resale |
| 4 | Model id to actual-model mapping | Ask "which model does deepseek-chat map to?"; then run the probe from 4.2 | Refuses to say, or behaviour differs from official |
| 5 | Is the usage receipt complete? | Look for prompt_cache_hit_tokens and friends | Fields missing or the schema is custom |
| 6 | Error codes and documentation | Compare against official error semantics | Every 4xx and 5xx collapsed into one vague error |
| 7 | Pricing and billing semantics | Compare with official pricing; ask about multipliers and failed-request billing | Below official cost with no explanation |
| 8 | Exact rules for the free quota | Demand a written statement, not a verbal promise | "Free quota subject to the page" and nothing more |
| 9 | Behaviour when the quota runs out or you are rate-limited | Run a low-balance drill | Silently switches models and keeps serving |
| 10 | Historical availability | Read community reports and outage complaints over the last six months | Repeated large-scale outages in the last half year |
| 11 | Key permission granularity and revocation | Can you scope a key to one project and revoke it in one click? | One key for everything, with no per-key revocation |
| 12 | Data export and portability | Can you export your own call records at any time? | No records — you are effectively held hostage |
Items 4 and 9 are the two this article weights most heavily: the first decides whether the numbers you measure are real, and the second decides whether a failure reaches you as an error or as a silent downgrade.
4.6 A sane way to use aggregators
Aggregators are not forbidden, but their use needs a clear boundary:
- Non-sensitive data only: public material, toy code, already-redacted examples.
- Never on a production main path: production runs on the official API; an aggregator may serve at most as a fallback, and a fallback must be observable (logged, alerted).
- Never as a benchmark source: to evaluate model quality, test the official endpoint; an aggregator's version is unverifiable, so its numbers mean nothing.
- Treat it as "price-sensitive offline batching": latency-insensitive, retryable, high-volume, low-value-per-item work is exactly what this is good at.
- Cap the budget: a separate spend limit and alert for aggregators, so it can never become the entry point for runaway cost.
5. The real boundary of self-hosted deployment
Self-hosting is often treated as the "final form", but it has hard limits too — in some ways harder than the web chat.
5.1 When self-hosting is actually worth it
Investing in self-hosting only makes sense if at least one of the following holds:
- Data absolutely cannot leave your perimeter: a concrete compliance constraint (finance, healthcare, government, classified work) where policy forbids sending data off the internal network.
- Offline or air-gapped operation: the runtime has no external network access at all.
- Stable, very high concurrency: sustained hundreds of QPS with a predictable load, where amortizing hardware makes per-call cost clearly lower than per-token billing.
- You need fine-tuning: LoRA or full fine-tuning on your own data, which is only possible locally (this site's fine-tuning articles cover that ground).
- You need predictable latency: you do not want a public round trip and its queueing.
If the motive is merely "I want to save API fees", run the arithmetic in 5.3 first.
5.2 VRAM thresholds and the quantization trade-off
Estimate the VRAM needed for the weights with one formula:
weight_GB ≈ params_B × bits / 8
# Example (DeepSeek-V4.1-Flash, 552B total parameters)
BF16/FP16 : 552 × 16 / 8 = 1104 GB
FP8 : 552 × 8 / 8 = 552 GB
INT4 (AWQ): 552 × 4 / 8 = 276 GB
This is the weights alone. You still need KV cache (which grows with context length and concurrency), runtime workspace, and the serving framework's own overhead. In other words, fitting a 552B model on a single machine is essentially impossible even at INT4, so multi-GPU interconnect is the realistic path; the exact GPU types and counts depend on your context length, concurrency target, and the serving framework's memory management, so defer to the official model card and your framework's documentation.
The general shape of the quantization trade-off (numbers vary by framework and hardware; the directions below are what matter):
- BF16/FP16: best quality, highest VRAM demand. The default for precision-sensitive production tasks.
- FP8: natively supported on Hopper and newer parts, the best balance of throughput and quality, and the current default choice.
- INT4 (AWQ/GPTQ): the value option that halves VRAM, usually with higher throughput but a measurable accuracy cost — the best fit for large-scale offline batch work.
- Framework choice: vLLM / SGLang target high-throughput serving (tensor parallelism, continuous batching, paged-attention-style memory management); Ollama / llama.cpp target single machines and edge deployment with quantization-friendly paths. The throughput gap from picking the wrong framework is often larger than the gap between quantization tiers.
5.3 Self-hosting is not free: convert ops cost into an hourly rate
This is the arithmetic self-hosting proposals most often skip. The correct method is total cost divided by effective serving hours:
# Convert self-hosting into a "cost per effective hour", then compare with the API
one-time hardware cost = server purchase price
amortization months = 48 # 4 years
monthly amortization = one-time hardware cost / amortization months
monthly power = power(kW) × full-load hours/day × 30 × electricity price
monthly colocation+net = actual datacenter bill
monthly ops people = headcount (person-months) × fully loaded monthly cost
monthly total = amortization + power + colocation + ops
effective serving hours = 30 × 24 × utilization # utilization is the key: 30% vs 80% is 2.6x
cost per call = monthly total / (effective serving hours × calls per hour)
For magnitudes: assume an 8-GPU server costing roughly CNY 60,000 per month all-in (amortization, power, colocation, and one part-time ops engineer). At 40% utilization that is about 288 effective hours per month. At 200 calls per hour, the cost per call is about CNY 1.04. Meanwhile, calling V4.1-Flash over the API at CNY 1 per million uncached input tokens and CNY 4 per million output tokens, for a request with 2K input and 800 output tokens, costs about CNY 0.0039. The conclusion: unless your load can push utilization above 80%, self-hosting costs two orders of magnitude more than the API — that is the quantified version of "self-hosting is not a cost-saving tool". If you genuinely have a stable high-concurrency load, push utilization up and add the value of data never leaving your perimeter, and the investment stands.
5.4 Who should not self-host
- Individuals and small teams: a machine capable of running a quantized 552B model is a six-figure investment with nothing to amortize it against.
- Anyone chasing brand-new model capability: open weights always lag the official launch, so you are running a snapshot, not the latest.
- Teams without operations capability: VRAM management, version upgrades, monitoring and alerting, and failure recovery all need a human.
- Low-frequency, irregular workloads: high idle time means low utilization, and the arithmetic always loses. These are precisely the workloads that suit the API.
6. The criteria for migrating from the web chat to the API
Migrating is not hard. Deciding whether to migrate is, and the signals are clear enough to write as a checklist.
6.1 Three hard signals
Hard signal one: you start needing JSON output.As soon as any program downstream has to read the answer, "ask the model for JSON" stops being a preference and becomes a requirement — and the web chat cannot offer a contract. The regex extractor you write there eventually becomes an incident source.
Hard signal two: you start having concurrency.The moment "this flow must run 500 times a day" or "a user click triggers one call" appears, manual copy-paste stops being an option. Concurrency also brings the things the web chat has none of: timeouts, retries, idempotency, rate limiting, and circuit breaking.
Hard signal three: you become cost-sensitive.Note the precise wording: cost-sensitive, not "you started paying". The web chat is free, which is exactly when you have no visibility into cost. The thing that should alarm you is that you sense "this prompt is expensive" while having no idea where the money goes or whether it can be optimized.
6.2 Migration trigger list
Tick a box and you should migrate. Even one hit means you should start preparing; three or more means the web chat is now your bottleneck.
| # | Trigger | Why you must migrate | Priority |
|---|---|---|---|
| 1 | You need reliable structured output | The web chat can only use prompts; it cannot give downstream a contract | Immediate |
| 2 | More than roughly 100 calls per day | Manual copy-paste becomes a hidden labour cost | Immediate |
| 3 | The model must call your functions or endpoints | Function Calling exists only on the API | Immediate |
| 4 | The flow must run unattended in CI or on a schedule | The web chat has no callable entry point | Immediate |
| 5 | You need retries, timeouts, and failure alerts | Baseline requirements for a production path | High |
| 6 | You need persistence, replay, and auditability | Web conversations have no searchable call log | High |
| 7 | You want to run the same question many times and keep the best | No batching and no side-by-side comparison on the web chat | High |
| 8 | The data is too sensitive to paste into a web page | The web chat is not a controlled data channel | Immediate |
| 9 | You start counting tokens carefully | The web chat gives you no cache-hit signal | Medium |
| 10 | You want your own monitoring and budget dashboards | You need to persist the usage receipt per call | Medium |
| 11 | You need multi-user or multi-tenant support | The web chat is one account, one conversation | Medium |
| 12 | You need a pinned model version for regression tests | The web chat's model is decided by the UI and cannot be locked | Medium |
6.3 The most common post-migration mistake: moving web prompts verbatim
This is the highest-frequency failure during migration. On the web chat you write "think step by step, then give the conclusion" because you need to see the reasoning. On the API, reasoning tokens are billed separately (they count as output tokens), so moving that requirement over can multiply your bill.
Slim the prompts during migration:
- Deep thinking that the web chat exposes as a UI toggle must become a parameter on the API — use the parameter, not the prompt (parameter names and thinking-strength levels defer to the official documentation).
- Delete "think step by step" from the prompt and replace it with the reasoning switch plus an explicit output-format requirement.
- Take the 800-character web-era "role + output rules + caveats" block and split it into a fixed system prefix — which is exactly where API cache hits live (see 6.4).
- On the web chat you manually resend "continuing from what you just said, also add …". On the API that history either goes into the messages array (full price) or is lifted into a constant prefix (cache-hit price). That difference is where the 98% comes from.
6.4 Cost estimation: use your own real numbers
Run the numbers before migrating. The algorithm is simple; what matters is substituting your own figures:
# cost_estimate.py —— before/after migration cost comparison (unit: currency, per 1M tokens)
PRICE = {
"v3.1": {"in": 0.50, "out": 2.00}, # site model-page figures; defer to official pricing
"v3.2": {"in": 0.14, "out": 0.56}, # USD figures; defer to official pricing
"v4.1-flash":{"in": 1.00, "out": 4.00, "in_hit": 0.02},
}
def monthly_cost(model, days, sessions_per_day, in_tok, out_tok, hit_ratio=0.0):
p = PRICE[model]
tokens_in = days * sessions_per_day * in_tok
tokens_out = days * sessions_per_day * out_tok
hit = tokens_in * hit_ratio
miss = tokens_in - hit
cost_in = miss / 1e6 * p["in"] + (hit / 1e6 * p["in_hit"] if "in_hit" in p else 0)
cost_out = tokens_out / 1e6 * p["out"]
return tokens_in, tokens_out, cost_in + cost_out
# Scenario: 30 days, 100 sessions/day, 3K input / 800 output each, 80% of input on a cached prefix
for m in ("v3.1", "v3.2", "v4.1-flash"):
ti, to, c = monthly_cost(m, 30, 100, 3000, 800, hit_ratio=0.8)
print(f"{m:12s} input {ti/1e6:6.2f}M output {to/1e6:5.2f}M monthly ≈ {c:8.2f}")
Replace the parameters with your own real values and run it again. Pay particular attention to hit_ratio: if you have not lifted a fixed prefix out on the API side, that value is effectively 0 and the bill jumps straight to the full-price row. How to verify cache hits is in 10.3.
6.5 A staged migration roadmap
- Stage 0 (half a day): create the account, top up a small amount, get the key. Call
GET /modelsto confirm the list of usable model ids and store a snapshot — model aliases can be silently rerouted, see 8.5. - Stage 1 (one day): move your most mature prompt across and aim for "it connects", not "full rollout". A standalone script calls the same prompt; compare the result side by side with the web chat and judge whether quality degraded.
- Stage 2 (two to three days): slim the prompt and fix the prefix. Extract the long system prompt into a constant, confirm the cache starts hitting, and compare the bill before and after.
- Stage 3 (one week): build the engineering layer. Retries and timeouts, structured-output validation (with a fallback when JSON parsing fails), usage persistence, and error alerting.
- Stage 4: ramp by scenario. Move non-sensitive, retryable traffic first, then critical paths. Keep one rollback-capable fallback at every step.
7. A selection decision tree and hybrid strategies
7.1 Three questions locate your path
Ask yourself three questions in order, and the answer locates the path:
- Can the data leave my control? No → self-hosted (or run it in a compliant private cloud). Yes → continue.
- Do I need programmatic access, batching, or structured output? Yes → official API. Not yet → continue.
- Am I extremely budget-sensitive and is the data completely non-sensitive? Yes → an aggregator is acceptable as a supplementary offline batch channel; no → official API.
Writing those three questions as code turns the selection logic into something reviewable:
def choose_path(*, data_cannot_leave, needs_programmatic, needs_json_contract,
needs_custom_tools, budget_sensitive, data_sensitive, has_gpu_ops):
"""Return (path, reason). Hard constraints beat cost optimization."""
if data_cannot_leave:
if not has_gpu_ops:
return "private-cloud", "Data cannot leave, but there is no GPU ops capability: consider compliant private hosting or de-identify and use the API"
return "self-hosted", "Data cannot leave the perimeter: self-host or private deployment"
if needs_custom_tools:
return "official-api", "Custom function calling is required: only the official API has that entry point"
if needs_programmatic or needs_json_contract:
return "official-api", "Programmatic calls or a structured-output contract are required: the web chat provides neither"
if budget_sensitive and not data_sensitive:
return "aggregator-offline", "Only for non-sensitive offline batching; never on a production main path"
return "web-or-api", "Low-frequency human use: the web chat is enough; migrate the moment frequency rises"
7.2 The hybrid strategy: sensitive data local, ordinary traffic over the API
Most serious teams end up in a hybrid rather than choosing one of the four:
| Traffic type | Routes to | Why |
|---|---|---|
| Classified, regulated, or personally identifying data | Self-hosted | The data boundary is a hard constraint; everything else yields |
| Batch, offline, retryable, low value per item | Official batch API (or an aggregator if cost allows) | High volume amortizes well, failures can be replayed |
| Online, low-latency, needs structured output | Official API | Needs a contract and an SLA |
| Exploration, option comparison, human reading | Official web chat | Cheapest iteration |
| Overflow during peak hours | Official API as primary, local capacity absorbing the spike | Local absorbs the peak and protects the SLA |
The most common defect in a hybrid design is routing rules hardcoded in the application instead of living in configuration. Make "which traffic class goes where" a configuration item and instrument each path separately, so that during an incident you can tell exactly where the traffic went.
7.3 A common misconfiguration matrix
| What you did | Actual path | Consequence | Right answer |
|---|---|---|---|
| Paste 200 tickets a day into the chat to classify them | Web | Labour cost dwarfs model cost, and nothing is auditable | Migrate to the API with batching; half a day of work |
| Paste customer contracts into the web chat for analysis | Web | Sensitive data enters an uncontrolled channel | Self-host, or de-identify and use the API |
| Run a production agent on an aggregator key | Aggregator | One upstream change means blanket 401s, and the key may leak | Production on the official API; aggregator only as an offline supplement |
Treat deepseek-chat as a stable contract in code | API | After a silent reroute, behaviour changes with no code change | Pin concrete model ids and run a version watch |
| An individual buys GPUs to run 552B | Self-hosted | 5% utilization means per-call cost a hundred times the API | Use the API; keep local for team-scale load |
| Use the web chat for bulk labelling and expect consistency | Web | Manual rewriting makes labels inconsistent and irreproducible | API + fixed parameters + structured output |
8. Failure mode catalogue
These six failure modes are what this article most wants to leave behind. Each one gets symptoms, causes, and a way to stop the bleeding.
8.1 Building a production chain on the "free" web chat
Symptoms: the flow works, but "the result is slightly different every time", "sometimes it forgets what we said earlier", and "it did not finish by the deadline, someone had to babysit it".
Cause: treating a human interaction habit as an interface contract. The web chat has no retries, no idempotency, no timeouts, no logs, no receipts, no concurrency.
Why "free" ends up more expensive: the cost of human compensation is invisible. A flow of 100 calls a day at 2 minutes each is 100 × 250 × 2 / 60 ≈ 833 hours a year; at a conservative 50 per hour that is around CNY 42,000 a year, roughly half an engineer's salary. The token cost of the same load on the official API, per the example in 11.1, is in the tens of units. Making "free" your largest cost line is the irony at the heart of this failure mode.
Containment: list "manual hauling" as an explicit line item and put it next to token cost when you budget. You will find that migration is almost always worth it.
8.2 Running sensitive data through a third-party site
Symptoms: it starts as "just trying it", and then a customer's raw record, a ticket body, or a source file ends up pasted into an aggregator; months later the site changes upstream or is raided, and its history may be handed over.
Cause: the price advantage of aggregators lowers your guard, and the feeling of "I tried it and nothing happened" masks the risk — the fact that the problem does not surface immediately is exactly what makes it dangerous.
Containment: create a data-classification rule (public / internal / sensitive / classified) where only the first two levels may use an aggregator; anything sensitive or above goes to the official API or locally. The rule must live in the routing layer of the code, not in people's memories.
8.3 Believing the web chat supports tool calls
Symptoms: you see the model "look things up by itself" or "generate code" in the page, and assume you can define a database query function there and have it invoked.
Cause: confusing a product's built-in capability (web search) with an open capability (custom function calling). The former is a hard-coded vendor workflow; only the latter is a programmable interface for developers.
Containment: one test decides it — can you pass in a schema and get a structured call request back? If not, it is not function calling. The web chat never qualifies; the API does (defer to the official documentation).
8.4 Comparing unit price and ignoring cache hits and total tokens
Symptoms: during model selection you compare only "price per million tokens", and the first invoice after launch far exceeds expectations.
Cause: unit price is a marginal price; cost is volume × price × hit rate. Three common miscalculations:
- Forgetting that output tokens are usually several times more expensive than input (across the model figures on this site, output is about 4× input). Asking the model to "write more" costs far more than asking it to "read less".
- Forgetting that reasoning tokens are billed as output. In deep-thinking mode, the reasoning trace is charged.
- Forgetting cache hits. If you never lift a fixed prefix out, you pay full price forever.
Containment: run the script in 6.4 with your real magnitudes, and treat hit_ratio as an engineering metric you continuously optimize rather than a theoretical constant.
8.5 A model alias silently rerouted
Symptoms: nothing in the code changed, yet at some point the model's behaviour changed — more verbose output, occasional malformed JSON, and quietly a different unit price.
Cause: aliases like deepseek-chat point at a concrete model, and the pointer can move. The version-evolution article at id=205 on this site records a real case: from a certain timestamp, deepseek-v4-pro requests were routed to V4.1-Flash and billed at the new price — without changing a single line of code, the behaviour had already changed.
Containment:
- Run
GET /modelsperiodically and diff the stored id list; alert on additions or removals. - Pin concrete version ids in code where the official endpoint offers them, instead of using only generic aliases.
- Build a dashboard of "output-format validation rate", "JSON parse failure rate", and "average tokens per call" — a reroute shows up in metrics before it shows up in a customer complaint.
8.6 Using copy-paste instead of programmatic calls
Symptoms: a half-automated flow — a script runs the first half, a human pastes results back from the web chat; or the reverse, exporting from your system and uploading by hand.
Cause: the perceived cost of migrating to the API is overstated. The real cost is not writing the request code but changing how the team works.
Containment: get "it connects" proven first, with the thinnest possible wrapper (a few dozen lines plus the key in an environment variable). The hardest part of converting an existing manual flow is people's habits, so the first step must be short.
9. An executable pre-launch checklist
9.1 Selection-phase checks (10 items)
- Is data classification done, and is it written down which path each class may take?
- Have you chosen a concrete model id or an alias — and can it be silently rerouted?
- What is the top end of your context requirement, and what happens beyond the model's window (error, or silent truncation)?
- Do you need structured output? If so, are you using
response_formator prompt constraints? Either way you need a fallback for parse failures. - Do you need function calling? If so, who defines the tool schemas, who implements them, and how do failures retry?
- Which model id handles reasoning tasks and which handles direct answers, and what is the unit-price difference?
- What is your expected token volume, and have you run the 6.4 script for the monthly cost?
- How will you organize the fixed prefix, and what is your cache-hit ratio target?
- If you picked an aggregator: how many of the 12 checks in 4.5 passed, and does your data classification allow it?
- If you picked self-hosting: did you run the 5.3 hourly-cost calculation, and what utilization assumption did you use and why?
9.2 Launch-phase checks (8 items)
- Are the timeout and retry policies fixed, with a cap on retries that cannot silently multiply cost?
- Are failed requests billed, and do you need an idempotency key?
- Is usage persisted per call, including the cache-hit token count from
usage? - Are there budget alerts (daily and weekly) and rate limits in place?
- Is the output format validated, and what is the fallback when parsing fails?
- Do you periodically diff the model id list?
- Do your logs dump whole user records? Compliance usually requires redaction.
- What is your degradation path when the upstream returns 429/401/5xx, and have you rehearsed it?
9.3 Change management and rollback
Model paths are change-controlled assets too. At minimum you need a model id watch (to catch alias changes), prompt versioning (so edits can be rolled back), gradual rollout switches (ramp new paths by percentage), and a degradation plan (when the official API is unavailable, do you switch to local or to an aggregator — and if to an aggregator, confirm your data classification permits it).
10. How to verify every claim in this article yourself
This article describes what was true in November 2026. Anything that can change is given a verification method rather than an assertion. The official documentation and the API responses are the only authority.
10.1 Where to check the official documentation
- API reference: the developer documentation behind
https://api.deepseek.com— function calling, JSON output, the batch endpoint, context and maximum output, and the reasoning-mode parameter names. - Pricing page: cache-hit price, uncached price, output price, and whether off-peak pricing exists. All prices defer to this page.
- Status page and announcements: rate-limit rules, model deprecations and launches, alias routing changes, and temporary announcements about the web chat (such as holiday limits).
- Open-source repository and model card: weights, quantized releases, recommended serving stacks, and minimum VRAM (relevant to self-hosting).
10.2 Inspect the model list and capabilities through the API
# 1) Which models can this key see? (snapshot on day one of the migration, diff afterwards)
curl -s https://api.deepseek.com/models \
-H "Authorization: Bearer $DEEPSEEK_API_KEY" | python -m json.tool
# 2) Minimal function-calling probe (swap in your own schema)
curl -s https://api.deepseek.com/chat/completions \
-H "Authorization: Bearer $DEEPSEEK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"messages": [{"role": "user", "content": "What is the weather in Beijing? Use a tool."}],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Look up the weather for a given city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string", "description": "City name"}},
"required": ["city"]
}
}
}],
"tool_choice": "auto"
}' | python -m json.tool
# 3) JSON contract probe (check the supported range of response_format in the official docs)
curl -s https://api.deepseek.com/chat/completions \
-H "Authorization: Bearer $DEEPSEEK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"messages": [{"role": "user", "content": "Convert this to JSON: order A123, amount 99"}],
"response_format": {"type": "json_object"},
"max_tokens": 200
}' | python -m json.tool
10.3 Verify cache hits and JSON output with a minimal experiment
Cache hits must be measured, because they depend on whether the prefix is byte-identical, on the request interval, and on the server's cache-window policy. This script issues two identical requests and compares the hit token count:
# cache_check.py —— verify how much of a repeated prefix actually hits
import json, os, urllib.request
BASE = "https://api.deepseek.com"
KEY = os.environ["DEEPSEEK_API_KEY"]
MODEL = os.environ.get("DS_MODEL", "deepseek-chat")
PREFIX = "You are a rigorous contract reviewer. Output only the clause number and the conclusion." + ("reference clause library. " * 200)
def one(tag):
body = {"model": MODEL,
"messages": [{"role": "system", "content": PREFIX},
{"role": "user", "content": "Review this contract: Party A pays within 30 days."}],
"max_tokens": 100}
req = urllib.request.Request(BASE + "/chat/completions",
data=json.dumps(body).encode("utf-8"),
headers={"Authorization": "Bearer " + KEY, "Content-Type": "application/json"})
with urllib.request.urlopen(req, timeout=90) as r:
d = json.loads(r.read().decode("utf-8"))
u = d.get("usage", {})
print(f"{tag}: prompt_tokens={u.get('prompt_tokens')} "
f"cache_hit={u.get('prompt_cache_hit_tokens')} "
f"cache_miss={u.get('prompt_cache_miss_tokens')} "
f"completion={u.get('completion_tokens')}")
return u
u1 = one("first")
u2 = one("second")
hit = u2.get("prompt_cache_hit_tokens") or 0
print("hit rate = %.1f%%" % (100.0 * hit / max(1, u2.get("prompt_tokens") or 1)))
How to read it: if the second call reports prompt_cache_hit_tokens greater than zero, prefix caching is working. A hit rate of zero usually has one of three causes: the prefix differs by a byte between requests (a timestamp or random id embedded near the front), the prefix is shorter than the server's minimum cache granularity, or the gap between requests exceeds the cache window. Eliminating those three is far more effective than endlessly tuning the prompt.
10.4 Pricing and rate limits: do not trust secondhand numbers
Including this article, every third-party article can have stale prices. The correct approach:
- Prices defer to the official pricing page; the numbers here only demonstrate the method.
- Record a snapshot of the official pricing page with its capture date in your own notes, and cite the date whenever you quote it.
- The official service does not necessarily promise fixed rate-limit thresholds (concurrency, RPM, TPM); the real limits show up in status codes and response headers, so your client must implement 429 backoff rather than assume you will never be throttled.
- Details like the cache validity window, batch discounts, and completion deadlines change often — re-check them right before you migrate.
11. Full worked cost examples
The examples below demonstrate how to calculate; the numbers hold only under the stated assumptions. Unit prices are covered in 10.4 — check the official pricing page for real figures.
11.1 Example one: pure conversation (personal or small-team daily use)
Assumptions: 30 days, 100 sessions a day, 3K input tokens each (including the system prompt and history) and 800 output tokens each.
| Path | Monthly tokens | Monthly cost | Note |
|---|---|---|---|
| Official web chat | 9M in / 2.4M out | CNY 0 (not billed) | But manual hauling at roughly 1-2 minutes each |
| Official API (V3.1, no cache) | 9M / 2.4M | about CNY 9.3 | 9×0.50 + 2.4×2.00 |
| Official API (V4.1-Flash, no cache) | 9M / 2.4M | about CNY 18.6 | 9×1.00 + 2.4×4.00 |
| Official API (V4.1-Flash, 80% prefix hits) | 9M / 2.4M | about CNY 11.5 | 7.2M×0.02 + 1.8M×1.00 + 2.4M×4.00 |
| Manual hauling | — | about 100 hours/month | 100 calls × 1.5 minutes × 20 days |
Conclusion: model cost sits in the tens of currency units while manual hauling sits in the hundreds of hours. For any workload with steady frequency, migrating to the API is the default answer.Notice that cache hits help on the input side, while the output price (CNY 4 per million) is usually the bigger line — so the lever to pull is "generate less", not "read less".
11.2 Example two: bulk classification (50,000 tickets)
Assumptions: 50,000 items, 500 input tokens and 50 output tokens each.
| Item | Calculation | Result |
|---|---|---|
| Input tokens | 50000 × 500 | 25M |
| Output tokens | 50000 × 50 | 2.5M |
| Official API at V3.2 pricing | 25×0.14 + 2.5×0.56 | about $4.9 (USD) |
| Official API at V4.1-Flash pricing | 25×1.00 + 2.5×4.00 | about CNY 35 |
| Manual hauling | 50000 × 30 s ÷ 3600 | about 416 hours |
| Batch endpoint | Additional discount and async completion window | Defer to the official documentation |
Bulk scenarios additionally require structured output (one label per ticket), which lands exactly where the web chat fails: even a 1% parse-failure rate means 500 dirty records out of 50,000 that a human must repair.
11.3 Example three: an agent with tool calls
Agent economics add two items: tool calls inflate token consumption (each round-trip of tool_call messages must be fed back into the context), and reasoning tokens count as output. Take a typical four-round tool-calling chain: about 8K input tokens accumulated across four rounds (each carrying history) and about 1.5K output tokens, with reasoning taking a substantial share of that output.
| Item | Per task | 500 tasks/day for 30 days |
|---|---|---|
| Input | 8K | 120M |
| Output (including reasoning) | 1.5K | 22.5M |
| V4.1-Flash at full price | 8×1.00 + 1.5×4.00 = CNY 14.0 | about CNY 210 |
| With 80% prefix hits | about CNY 11.5 | about CNY 173 |
| With reasoning mode off | output drops to about 0.5K | about CNY 165 |
| With V3.2 pricing | 8×0.14 + 1.5×0.56 = CNY 1.96 | about CNY 29 |
Three actionable conclusions: (1) in agent workloads output cost dominates, so compressing the output into a short structured format is worth more than optimizing input; (2) turn reasoning on per difficulty band, not for everything; (3) the generational price gap (V4.1-Flash versus V3.2) is an order of magnitude at this volume, which means a routing strategy that sends hard tasks to the strong model and easy tasks to the cheap one is worth more than any single-point optimization.
12. Conclusion: turn "using DeepSeek" into an engineering decision
12.1 One-page cheat sheet
| If you need… | Choose | Key reason | First thing to do |
|---|---|---|---|
| Exploration, iteration, answers a human reads | Official web chat | Lowest iteration cost | Tune the prompt on the web first |
| Production systems, structured output, batching | Official API | Contracts, batching, billing, SLA | Create a key and snapshot GET /models |
| Agents / custom tool calling | Official API | Function Calling exists only here | Define your first tool schema |
| Data that absolutely cannot leave | Self-hosted / private | The data boundary is a hard constraint | Do the data classification |
| Low-cost batch work on non-sensitive data | Aggregator (restricted use) | Price traded for control | Pass the 12 checks in 4.5 |
| Stable high concurrency plus compliance | Hybrid: self-hosted + official API | Local absorbs peaks, the API protects the SLA | Make routing rules configuration, not code |
12.2 Three closing recommendations
- Set the data boundary before choosing the path. Data classification is the only decision input that does not shift when prices and versions shift, and it is the only thing that answers both "should I use an aggregator" and "do I need to self-host". Do that first.
- Write down which way each piece of traffic travels. Every path needs a data class, a model id, a cost owner, and a fallback plan. A path that is not written down does not exist on the Monday morning when something breaks.
- Treat every price and limit as volatile. What this article offers is a November 2026 snapshot plus the method. The durable takeaway is not the numbers but the three scripts — the capability probe, the cache check, and the cost estimate. Run them in your own environment and the conclusions will be yours.