DeepSeek broke its app into blocks: five endpoints, and one parameter that quietly disappears

On the evening of 13 November, DeepSeek moved the machinery behind its consumer app onto the public API: web search, deep thinking search, URL reading, file parsing, OCR, speech-to-text and text-to-speech. The line everyone screenshotted was that a developer can now rebuild the DeepSeek app one to one. The companion front end went up as an MIT project, runs on Node 22.12 or newer, and imports chat history exported from the consumer app.

There is a less quotable sentence in the docs. Enable deepseek_web_search and the temperature you sent no longer applies. For anyone running evals or structured extraction, that matters more than five new endpoints.

Five standalone endpoints, with the numbers

CapabilityEndpointHard limitsPeak price
Web searchPOST /v1/tools/search100 req/s, supports site: and -site:, no image search yet$0.75 per 1,000 successful calls
Page fetchPOST /v1/tools/fetch25 req/s, returns single-page Markdown$0.75 per 1,000 successful calls
OCRPOST /v1/tools/ocr100 MB per file, 1,000 pages max, page-by-page, not stored in the Files API$0.225 per 1,000 pages
ASRPOST /v1/tools/asr120 seconds and 8 MB per file, 16-bit PCM WAV or Ogg Opus only, 21 languages auto-detected$0.116 per hour, $0.058 during the launch discount
TTSPOST /v1/tools/tts or WebSocket on the same path10,000 characters per request, 10 languages, two voices: stella and tide$0.45 per 10,000 characters, $0.225 discounted
Modeldeepseek-flash (V4.1-Flash-1017)1M context, 384K output, vision input, concurrency 2,500$0.30/M input ($0.006 cached), $1.20/M output

Search and fetch bill only on success with usable content, so failed calls and empty results are free. Off-peak model pricing is half.

The ASR row hides the actual work. Pricing is per hour, the endpoint stops at 120 seconds. One hour of audio becomes 30 segments and 30 requests, and you still have to stitch 30 relative timestamps into an absolute timeline. There is no long-audio endpoint, so the slicing logic is yours to write.

Two integration layers: let the server turn the screws, or turn them yourself

The first layer declares tools inside a chat request and lets the server run the loop. All three protocols accept the same tool names on deepseek-flash:

import requests

payload = {
    "model": "deepseek-flash",
    "thinking": {"type": "enabled"},
    "tools": [{"type": "deepseek_web_search"}, {"type": "deepseek_read_url"}],
    "safety_check": {"level": "high"},
    "messages": [{"role": "user", "content": "new papers on KV cache compression last week"}],
    "stream": True,
}
r = requests.post(
    "https://api.deepseek.com/chat/completions",
    headers={"Authorization": "Bearer " + API_KEY},
    json=payload,
    stream=True,
    timeout=120,
)
for line in r.iter_lines():
    if line:
        print(line.decode("utf-8"))

With thinking off, deepseek_web_search is ordinary cited search. With thinking on it becomes deep thinking search: the model decides what to search and which page to open across multiple reasoning steps, up to roughly 20 automatic searches and page reads in a single turn. deepseek_read_url works differently. It scans the latest user message for up to 10 links, fetches them server-side, and returns the page payload inside a signature field that the client passes back untouched. No crawler of your own.

What comes back is not a string. It is a stream of typed blocks: thinking, server_tool_use, web_search_tool_result, web_fetch_tool_result, text with citation markers, and a refusal stop reason when the safety filter trips. The client renders and echoes.

The second layer is the five endpoints under /v1/tools/, with the loop written by you. The cases that call for it are specific: reusing retrieved pages across turns, persisting fetched text, swapping search providers for an A/B, running reproducible regressions in CI. Server-side orchestration saves you the loop code and takes away control, including the control listed in the next table.

The parameters that disappear

ProtocolFields ignored once server tools are on
Chat Completionstemperature, top_p, frequency_penalty, presence_penalty, stop, seed, n, preserve_thinking, parallel_tool_calls
MessagesAll of the above plus top_k, stop_sequences, thinking.budget_tokens, tool_choice.disable_parallel_tool_use, metadata (except user_id)
Responsestemperature, top_p, reasoning.summary, text.verbosity, include, max_tool_calls, truncation, metadata, parallel_tool_calls, store

The consequence is not a slightly worse result. The meaning of the request changes. temperature=0 used to mean the same input yields the same output, which is the premise of regression tests, structured extraction and controlled comparisons. Turn on search and the premise is gone, while the request still returns 200 and the logs look clean. A score that drifts in your eval may just be a different sampling regime.

A second trap sits on max_tokens. It caps the output of each inference step, not the turn. A deep thinking search turn can run a dozen steps, so real output can be an order of magnitude above the number you configured. Capacity planning on max_tokens will underestimate the bill by roughly that factor.

A third conflict is practical. Serving an application to the public means turning on safety_check, and that switch overrides temperature and top_p as well. Compliance and output control collide on the same flag.

None of this is a bug. Once the server owns the tool loop, you cannot sit inside that loop tuning temperature, because the loop is no longer one you can see. The mental model has to change: a request with server-side tools is a service call, not a function call.

Step one: catch the dropped fields before the request leaves

Standard library only, wired in front of your SDK as a pre-flight guard. It exits non-zero so CI fails:

IGNORED = {
    "chat": {"temperature", "top_p", "frequency_penalty", "presence_penalty",
             "stop", "seed", "n", "preserve_thinking", "parallel_tool_calls"},
    "messages": {"temperature", "top_p", "top_k", "stop_sequences",
                 "thinking.budget_tokens", "tool_choice.disable_parallel_tool_use", "metadata"},
    "responses": {"temperature", "top_p", "max_tool_calls", "truncation", "store", "metadata"},
}
SERVER_TOOLS = {"deepseek_web_search", "deepseek_read_url"}


def audit(payload, proto="chat"):
    tools = {t.get("type") for t in payload.get("tools", []) if isinstance(t, dict)}
    hijack = bool(tools & SERVER_TOOLS) or payload.get("safety_check") or payload.get("title")
    if not hijack:
        return [], []
    dropped = sorted(k for k in payload if k in IGNORED[proto])
    return dropped, sorted(tools & SERVER_TOOLS)


body = {
    "model": "deepseek-flash",
    "temperature": 0.0,
    "top_p": 0.9,
    "seed": 42,
    "tools": [{"type": "deepseek_web_search"}],
    "messages": [{"role": "user", "content": "what happened in AI this week"}],
}
dropped, tools = audit(body, "chat")
print("server tools:", ", ".join(tools) or "none")
print("silently ignored:", ", ".join(dropped) or "none")

Which prints this and exits 1:

server tools: deepseek_web_search
silently ignored: seed, temperature, top_p

Wire it into the eval pipeline so a payload containing both deepseek_web_search and temperature fails the build. It forces the author to pick a side: reproducible, or able to search. Not both.

Step two: a cost model that reconciles

A support-bot shape: 3,000 turns a day, one search per turn, 6,500 cumulative input tokens and 500 output tokens per turn, 38 percent prefix cache hit rate. Standard library, nothing to install:

M = 1_000_000
P = {"in_miss": 0.30, "in_hit": 0.006, "out": 1.20}
T = {"search": 0.75}


def daily(turns=3000, in_tok=6500, out_tok=500, hit=0.38, searches=1.0):
    cost_in = turns * (in_tok * (1 - hit) * P["in_miss"] + in_tok * hit * P["in_hit"]) / M
    cost_out = turns * out_tok * P["out"] / M
    cost_tool = turns * searches * T["search"] / 1000
    return cost_in, cost_out, cost_tool


for hit in (0.0, 0.38):
    a, b, c = daily(hit=hit)
    tot = a + b + c
    print("hit %4.0f%%  in $%6.2f  out $%6.2f  search $%6.2f  day $%6.2f  month $%7.2f"
          % (hit * 100, a, b, c, tot, tot * 30))

Output:

hit    0%  in $  5.85  out $  1.80  search $  2.25  day $  9.90  month $ 297.00
hit   38%  in $  3.67  out $  1.80  search $  2.25  day $  7.72  month $ 231.64

mix at 38%: input 48% / output 23% / search 29%
per turn: $0.0026
one search ($0.00075) equals 125,000 cached input tokens

Two takeaways. Cached input at $0.006/M against $0.30/M uncached is a 50x spread, so keeping the system prompt and tool definitions stable at the front of the request is the highest-leverage change available here; 38 percent hit rate already shaves a fifth off the bill. Search is 29 percent of spend, and one search costs the same as 125,000 cached tokens. That is out of proportion to what it does, so rate-limit it in your own code instead of letting the model decide whether to search.

Before shipping

  • Slice long audio yourself. The 120-second and 8 MB caps are hard, and the segmenter is your code to write.
  • The discount is temporary. 0.39 CNY per hour is the half-price number; at list it doubles. Do not bake it into a margin model.
  • Use the WebSocket endpoint for TTS. One-shot HTTP on long text produces an ugly time-to-first-byte.
  • Two voices only, stella and tide, across 10 languages. A multi-speaker podcast needs another layer on top.
  • The demo front end is MIT, but it keeps the API key in localStorage and conversations in IndexedDB. Shipping it as a production client means rebuilding key custody.

The subtext of the announcement is not five new endpoints. It is a model vendor selling application-layer glue. Search, parsing and speech used to be dirty work every team rewrote; now it costs five CNY per thousand calls. You trade time for the right to interpret what your request means. Whether that trade is good depends on one question: does your product need reproducibility, or speed.

Further reading

Commentaires

Ce site est uniquement frontal : pas de backend ni de compte. Les commentaires vont sur GitHub Issues, Discussions ou par e-mail.

Collez ceci dans l'issue ou l'e-mail pour m'aider à localiser le problème ; cela n'inclut rien de ce que vous avez saisi

Aussi :Voir les commentaires existants · Commentaires par e-mail (sans compte GitHub) :278975598@qq.com