DeepSeek V4 Claude Code Setup: Comment Cleaning Costs
We ran the numbers for Claude Code on deepseek-flash, with EveryInfra MCP pulling 695 YouTube, Bilibili and Douyin comments. Peak price is 1/10 of Sonnet 5.5, but more than Haiku 5.5.

You can run Claude Code on DeepSeek's deepseek-flash model and use the EveryInfra remote MCP server to pull and clean video comments. It is cheap, but the "one tenth of the cost" claim is true only when DeepSeek's cache hits. We priced the sample session from the official Claude Code cost docs: deepseek-flash at peak price costs $0.0274, exactly 10% of Claude Sonnet 5.5 ($0.2744). With no cache hits, the same session costs $0.3037, which is more than Sonnet 5.5 with a working cache.
Claude Haiku 5.5 runs the same session for $0.0184. On October 26, 2026, from 17:26 to 17:38 Singapore time (SGT), we called EveryInfra for 695 comment rows from 15 videos. After cleaning, 655 comments stayed, and the estimated model input fell from 84,109 tokens to 20,176. On Bilibili and Douyin, the data fee per 1,000 comments was higher than the deepseek-flash model fee.
In this article, "cleaning comments" means one specific job. Claude Code reads the EveryInfra capability catalog. Then it calls the MCP tool everyinfra_call_api to pull comments with youtube/comments, bilibili/comments and douyin/comments. A short script removes duplicates, empty replies and promotion.
Keyword rules label about half of the rest as "setup and errors", "price and quota", "compares models" or "praise". The model labels what the rules cannot. The output is a table with the original text and a cost record. The model behind Claude Code is not from Anthropic.
It is deepseek-flash, served through the DeepSeek Anthropic-compatible endpoint. We do not have a DeepSeek key. So every DeepSeek and Claude Code step below is a config example that follows the official docs, and we did not run it. Every EveryInfra call and every number from our data is real.
The picture shows where the money goes. The expensive step is the desk at the front right, where the model reads each comment and labels it. A finer sieve on the left sends less to the desk.
First we cover the setup. Then we show five tests. At the end, we do the math.
Bottom line: one tenth of the cost only when the cache hits
The working title for this topic in our research notes was "clean comments for one tenth of the cost." Before we started, we turned it into two questions with numeric answers. With the same usage, is deepseek-flash at peak price within 10% of Claude Sonnet 5.5? Is it cheaper than Claude Haiku 5.5? The answers are "yes, exactly" and "no."
We did not invent the usage. We copied the /cost sample from the Claude Code cost docs: 1.2k input, 5.3k output, 940.0k cache read and 50.0k cache write tokens. The docs list it as Claude Sonnet 4.6 at $0.55. We first priced it again at Sonnet 4.6 rates and got $0.5526. That matches the docs, so the method is correct.
Then we applied each public price that we read on October 26, 2026. Claude prices come from the Anthropic pricing page. DeepSeek prices come from the DeepSeek pricing page in USD. We also checked them against the Chinese pricing page in CNY.
| Model (public price, Oct 26, 2026) | All cache hits | No cache hits | Share of Sonnet 5.5 (hits) |
|---|---|---|---|
| Claude Opus 5.5 | $0.5488 | $4.1208 | 200% |
| Claude Sonnet 5.5 | $0.2744 | $2.0604 | 100% |
| deepseek-v4-pro, peak | $0.1299 | $1.3294 | 47.3% |
| deepseek-flash, peak | $0.0274 | $0.3037 | 10.0% |
| Claude Haiku 5.5 | $0.0184 | $0.1030 | 6.7% |
| deepseek-flash, off-peak | $0.0137 | $0.1519 | 5.0% |
The middle column is easy to miss. In an agent such as Claude Code, cache reads are most of the input. In the sample session, 940.0k of 991.2k input tokens are cache reads, which is 94.8%. So two things set the size of the bill: the cache-hit price, and whether the cache hits at all.
The deepseek-flash hit price is $0.006 per million tokens at peak and $0.003 off-peak, which is lower than the $0.01 for Haiku 5.5. But its miss price is $0.30, three times the Haiku 5.5 rate of $0.10. When the cache hits, deepseek-flash lands near one tenth of Sonnet 5.5. When it misses, it costs more than Sonnet 5.5 with a working cache.
One limit applies to the whole table. It compares token prices, not model quality. The two vendors use different tokenizers. The Anthropic pricing page says the tokenizer in Claude 4.7 and later makes about 30% more tokens for the same text. That is compared with Claude 4.6 and earlier.
There is no public ratio between DeepSeek and Claude tokens. Anthropic has a free token counting endpoint, and DeepSeek offers an offline tokenizer. But we have no key for either vendor, so we did not calibrate against real usage data. All token counts in this article are estimates, and we use the same token count for both sides.
Why give this job to a low-cost model like deepseek v4.1 flash
Comment cleaning is high volume, and each item is easy. Look under a video about DeepSeek V4 in Claude Code. Most comments ask why the setup fails, how billing works, or how it compares with Claude's own models. Each judgment is simple, but many comments mean many tokens.
On October 17, 2026, DeepSeek updated deepseek-flash to DeepSeek-V4.1-Flash-1017. The release note says that the new model shortens task run time and output length. The Hugging Face model card says DeepSeek ran Terminal-Bench 4.0 with the Claude Code harness and scored 42.3.
On the Anthropic side, the Claude Haiku 5.5 launch page (October 7, 2026) names summaries, compaction and classification as its core work. It also names subagent work for Opus 5.5 and Sonnet 5.5. It lists Terminal-Bench 4.0 at 39.2% for Haiku 5.5 and 70.6% for Sonnet 5.5.
Each vendor reports its own numbers with its own method, so you cannot rank them directly. But the numbers show one fact: two low-cost models can now run inside Claude Code. The real comparison is cost and setup effort.
| Item | deepseek-flash (DeepSeek Anthropic-compatible endpoint) | Claude Haiku 5.5 (Anthropic direct) |
|---|---|---|
| Input miss / output, per million tokens | Peak $0.30 / $1.20; off-peak $0.15 / $0.60 | $0.10 / $0.50 (prompts up to 100k tokens) |
| Cache hit | Peak $0.006; off-peak $0.003 | $0.01 |
| How caching works | Automatic prefix cache on disk; cache_control is ignored | Uses the cache_control markers from Claude Code |
| Context window | 1M | 1M (prompts over 100k tokens cost more) |
| Image input | Yes (deepseek-v4-pro: no) | Yes |
| Official support in Claude Code | DeepSeek publishes a config; Anthropic says it does not support non-Claude models through a gateway | Native |
Read the last row with care. The Claude Code gateway docs say that Anthropic does not endorse, maintain or audit third-party gateways. They also say Anthropic does not support routing Claude Code to non-Claude models through any gateway. The DeepSeek setup uses exactly this path, a custom ANTHROPIC_BASE_URL.
If something breaks, Claude Code support will not cover it. The supported third-party routes are cloud platforms such as Amazon Bedrock, Google Cloud and Microsoft Foundry. See the third-party integration docs and the Anthropic gateway options.
Pass and fail criteria we wrote first
Before the first comment call, we wrote nine criteria for "this job works." We did not change them after we saw results. Two criteria only record numbers (noise share and tool definition size). The others have a pass line.
| ID | Criterion | Pass line | Result |
|---|---|---|---|
| J1 | All 9 env vars from DeepSeek exist in the Claude Code docs | 9 of 9 | Pass: 9 of 9 |
| J2 | MCP fields are all in the catalog response_fields and match REST | Both true | Pass |
| J3 | Each charged_usd equals catalog price × billing units; failures cost $0 | Every call matches | Pass: 15 comment calls, 3 searches and 1 MCP call |
| J4 | Cleaned model input is at most 40% of the raw JSON tokens | ≤40% | Pass: 38.0% / 17.5% / 5.6% |
| J5 | Noise share (record only) | — | YouTube low (2.2%); Bilibili and Douyin medium (12.0%, 13.0%) |
| J6 | Peak flash ≤10% of Sonnet 5.5? Cheaper than Haiku 5.5? | Answer with numbers | Q1: session 10.0%, yes; batch labels 13.5%, no. Q2: no |
| J7 | A bad parameter gives 422 with a fix, and "not charged" is in the error text | REST and MCP | Pass |
| J8 | Size of 25 tool definitions (record only) | — | About 8,556 tokens; about 1,058 for the 4 we keep |
| J9 | No key on disk | 0 hits | Pass |
J7 asks for "not charged" in the error text, not only in the HTTP status or the MCP isError flag. The reason is in the compatibility section below: the DeepSeek endpoint ignores the is_error field in tool_result.
deepseek claude code setup: 9 env vars checked against the docs
The DeepSeek Claude Code integration page lists nine environment variables. We looked up each one in the Claude Code environment variable reference. All nine exist, and their meaning matches the DeepSeek usage.
![Screenshot of the DeepSeek API docs page Integrate with Claude Code. A teal box marks the nine export lines for Linux and Mac. ANTHROPIC_BASE_URL points to api.deepseek.com/anthropic, ANTHROPIC_AUTH_TOKEN holds the DeepSeek key, the main, Opus and Sonnet model vars are deepseek-flash[1m], the Haiku and subagent models are deepseek-flash, the effort level is max and the auto-compact window is 786432.](/articles/deepseek-v4-claude-code-comment-cleaning/img-ds-env.webp)
# Config example (we have no DeepSeek key and did not run this block)
export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN="$DEEPSEEK_API_KEY" # sent as Authorization: Bearer
export ANTHROPIC_MODEL='deepseek-flash[1m]'
export ANTHROPIC_DEFAULT_OPUS_MODEL='deepseek-flash[1m]'
export ANTHROPIC_DEFAULT_SONNET_MODEL='deepseek-flash[1m]'
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-flash # background tasks use it too
export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-flash
export CLAUDE_CODE_EFFORT_LEVEL=high # DeepSeek shows max; comment work does not need it
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=786432
# Two more lines that we recommend:
export ENABLE_TOOL_SEARCH=false # defer_loading is not in the compatibility table
export EVERYINFRA_API_KEY=... # for .mcp.json; keep it out of project files| Variable | What it controls in Claude Code | What to watch in this job |
|---|---|---|
ANTHROPIC_BASE_URL | Sends requests to a proxy or gateway | With a host other than api.anthropic.com, Remote Control is off |
ANTHROPIC_AUTH_TOKEN | Value for the Authorization: Bearer header | Takes priority over a saved claude.ai login; without it, your plan login still applies |
ANTHROPIC_MODEL | Main session model | The [1m] suffix asks for a 1M context window |
ANTHROPIC_DEFAULT_OPUS_MODEL / _SONNET_ | Where the opus and sonnet aliases go | If unset, DeepSeek maps claude-opus* to deepseek-v4-pro at Pro prices |
ANTHROPIC_DEFAULT_HAIKU_MODEL | The haiku alias and background tasks | Background tasks also cost money |
CLAUDE_CODE_SUBAGENT_MODEL | Default model for subagents | Subagents per platform all use it |
CLAUDE_CODE_EFFORT_LEVEL | Effort level | DeepSeek maps medium, high and xhigh to high |
CLAUDE_CODE_AUTO_COMPACT_WINDOW | Token count that starts auto-compaction | Range 100,000 to 1,000,000 |
ENABLE_TOOL_SEARCH | MCP tool search | With false, every request carries all tool definitions |
Three points appear only when you read both sets of docs. First, model mapping. The DeepSeek compatibility notes say model names that start with claude-opus map to deepseek-v4-pro at Pro prices.
Names that start with claude-haiku or claude-sonnet map to deepseek-flash. If you set only ANTHROPIC_MODEL and then switch to opus, you pay Pro prices. For the sample session, Pro at peak is $0.1299, which is 4.7 times the flash price.
Second, capability detection. The Claude Code model configuration docs say Claude Code turns on effort levels and extended thinking by matching the model ID against known patterns. An unknown ID can leave those features off. You can declare them with variables such as ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES.
The gateway compatibility guide also says Claude Code treats unknown model names as current models and still sends thinking: {"type": "adaptive"}. The two statements cover different cases, and we could not test them. Our advice: after setup, run /status and /model to check the model and effort level before a batch job.
Third, effort. The DeepSeek page sets max. The DeepSeek thinking mode docs say a request for medium, high or xhigh runs as high, and max or ultra runs as max. Comment labels do not need the top level, and thinking tokens are billed as output. So our example uses high.
Connect EveryInfra as MCP: one .mcp.json and only 4 tools
Claude Code can add a remote MCP server in two ways. One is the command claude mcp add --transport http. The other is a .mcp.json file in the project root.
We recommend the file. The Claude Code MCP docs say .mcp.json expands ${VAR} in url and headers, so the key stays out of project files. The command line expands the variable when you run it and stores the key in ~/.claude.json.
{
"mcpServers": {
"everyinfra": {
"type": "http",
"url": "https://api.everyinfra.com/mcp",
"headers": { "Authorization": "Bearer ${EVERYINFRA_API_KEY}" },
"timeout": 150000
}
}
}One safety rule helps this setup. The same docs say Claude Code reads its own credential variables, such as ANTHROPIC_AUTH_TOKEN and ANTHROPIC_API_KEY, as empty in a remote server's url and headers. So even if a .mcp.json file asks for Bearer ${ANTHROPIC_AUTH_TOKEN}, your DeepSeek key does not go to any MCP server.
EVERYINFRA_API_KEY is not on that list, so it expands as usual. We set timeout to 150 seconds. Our slowest YouTube comment call took 78.6 seconds, and the EveryInfra sync budget is 85 seconds.
At 17:26 SGT on October 26, 2026, we sent https://api.everyinfra.com/mcp the same initialize and tools/list requests that Claude Code sends when it connects. The server returned 25 tools. We estimated their size with the ratio on the DeepSeek token usage page. It gives about 0.3 token per English character and 0.6 token per Chinese character. The names, descriptions and input schemas of the 25 tools come to about 8,556 tokens.
8,556 tokens is not much by itself, but two factors multiply it. First, we recommend turning off tool search to avoid compatibility problems. Then Claude Code sends all tool definitions in every request. Second, the Claude Code permissions docs say a deny rule with a bare tool name removes that tool from the model's context. So for this job, deny the other 21 tools in .claude/settings.json (format in the settings docs). Each request then drops from about 8,556 to about 1,058 tool tokens:
{
"permissions": {
"allow": ["mcp__everyinfra__everyinfra_list_capabilities", "mcp__everyinfra__everyinfra_call_api",
"mcp__everyinfra__everyinfra_get_job", "mcp__everyinfra__everyinfra_usage"],
"deny": ["mcp__everyinfra__everyinfra_search",
"mcp__everyinfra__everyinfra_solve_captcha", "mcp__everyinfra__everyinfra_key_create",
"mcp__everyinfra__everyinfra_key_delete", "mcp__everyinfra__everyinfra_settings_update",
"mcp__everyinfra__everyinfra_webhook_set", "mcp__everyinfra__everyinfra_create_ticket"]
}
}The example lists 7 of the 21 tools. Add the other 14 in the same format. In tools/list, everyinfra_call_api has readOnlyHint: false and no idempotentHint.
Since Claude Code 2.1.307 (October 21, 2026), this has a benefit. The changelog says that when an HTTP MCP connection closes mid-call, Claude Code retries only read-only or idempotent tools. So a dropped connection does not silently send a comment pull twice and charge you twice.
One real round trip: what the model sends and what we return
Claude Code and a remote MCP server use tools/call from the MCP specification. With Claude or DeepSeek behind it, the model only writes a tool_use block with a tool name and arguments. Claude Code sends the HTTP request.
So the request body below does not depend on the model. Tool definitions, tool_use and tool_result still count as model input tokens, as the Anthropic tool use docs explain. The same applies on the DeepSeek side.
At 17:37:32 SGT on October 26, 2026, we used curl to send EveryInfra the same tools/call that Claude Code sends. It asked for the 20 newest comments on one YouTube video. After 14.0 seconds, the server returned 200. result.content[0].text was a JSON string (RFC 8259) of 8,926 characters. The charge was $0.000556, the catalog price of the YouTube Comments Scraper API.
![Screenshot of one real request and response on the EveryInfra remote MCP server. POST https://api.everyinfra.com/mcp, method tools/call, tool everyinfra_call_api, arguments platform youtube, action comments, a YouTube video URL, sort newest and limit 20. The response is 200 at 17:37:32 SGT on Oct 26, 2026, after 14.0 seconds. content[0].text is a JSON string of 8,926 characters. The first row has id, text, author_name (masked), like_count, reply_count, posted_at as 11 hours ago, and is_reply. Teal boxes mark count 20 and charged_usd 0.000556.](/articles/deepseek-v4-claude-code-comment-cleaning/img-api-mcp-call.webp)
We compared the fields in this MCP response with the REST response for the same video at 17:28:19. We also checked them against the response_fields for youtube/comments in the catalog:
| Field | Catalog `response_fields` | MCP | REST | Use in cleaning |
|---|---|---|---|---|
id | Yes | Yes | Yes | Key for step 1 dedupe |
text | Yes | Yes | Yes | The only text that goes to the model |
author_name | Yes | Yes | Yes | Not sent; hidden in reports |
like_count | Yes | Yes | Yes | Kept as a weight |
reply_count | Yes | Yes | Yes | Not sent |
posted_at | Yes | Yes | Yes | YouTube gives relative time such as "11 hours ago" |
is_reply | Yes | Yes | Yes | Kept as one letter, r or t |
reply_to_id | Yes | Not in these 20 top-level rows | Yes | Links a reply to its parent |
platform | Yes | Yes | Yes | Not sent |
No field from either path is outside the catalog. The MCP response has no reply_to_id only because these 20 newest comments had no replies. J2 passes. One more number from the Claude Code docs matters here.
Claude Code warns when an MCP tool result is over 10,000 tokens, and the default limit is 25,000 tokens. It saves a larger result, or a text result over 50,000 characters, to a file and keeps only the path in the chat. Our 100-comment YouTube pulls were about 33,000 to 35,000 characters, about 10,000 estimated tokens. That is right at the warning line.
deepseek anthropic api: 7 compatibility rows that affect tool calls
The DeepSeek Anthropic API notes have a field-by-field support table. We took the rows that affect tool calls and tool results. Then we compared them with what the gateway guide says Claude Code sends. "Not in the docs" marks a gap that we could not test.

| Field or behavior | DeepSeek table | What it means for comment cleaning |
|---|---|---|
tool_result.is_error | Ignored | The model sees only text; the error text must say how to fix it and whether you paid |
cache_control on tools, text, tool_use, tool_result | Ignored | DeepSeek's disk cache matches prefixes on its own; Anthropic's caching rules do not apply |
disable_parallel_tool_use in tool_choice | Ignored | The model can send several tools/call at once and hit rate limits |
mcp_servers | Ignored | No effect on Claude Code, which is a local MCP client |
mcp_tool_use, mcp_tool_result blocks | Not supported | Same; Claude Code sends normal tool_use and tool_result |
document, search_result blocks | Not supported | Do not send PDFs as document blocks |
defer_loading, tool_reference (tool search) and strict | Not in the docs | Since 2.1.304, tool search is on behind a custom URL; Claude Code retries once without it after a 400 or 422. To avoid it, set ENABLE_TOOL_SEARCH=false |
The first row matters most to us. In the MCP spec, a tool execution error returns isError: true. Claude Code then passes it to the model as a tool_result with is_error. DeepSeek ignores the flag, so the model gets only text. So whether the model can fix its own mistake depends only on how clear the error text is.
The second row sets the cost. The Claude Code prompt caching docs list three ways a gateway can handle cache_control. In the third, the gateway removes the markers and still returns success. With Claude billing, that means the whole conversation is billed as uncached input on every turn. DeepSeek ignores the markers, but it has its own disk cache.
It is on by default for all users and matches request prefixes. Matched tokens are billed at the hit price. The docs call it best effort with no 100% hit guarantee. Unused cache entries usually clear within a few hours to a few days.

One more detail affects prefix matching. The gateway guide says Claude Code adds an attribution block at the start of the system prompt. It contains the client version and a fingerprint from the conversation. The Anthropic endpoint strips it before processing, but other endpoints receive it as part of the prompt. The DeepSeek cache needs a full match with a stored prefix unit.
The docs do not say whether this block stays the same through one conversation, and we could not check. That is why our cost table has two columns, all hits and no hits. Your real bill will fall between them. Check prompt_cache_hit_tokens in your DeepSeek usage data.
Test 1: what comments from three platforms look like
From 17:26:56 to 17:27:16 SGT, we searched "deepseek v4 claude code" and "DeepSeek Claude Code" with youtube/search, bilibili/search and douyin/search. From the results, we picked 15 videos about running DeepSeek in Claude Code. There are 6 on YouTube (4 in English, 1 in Chinese, 1 in Spanish), 5 on Bilibili and 4 on Douyin. Douyin search returns only the first page for now (20 results here, with no next_page_token), so to get more candidate videos, search again with other keywords. The topic choice is part of the method. The comments under these videos are first-hand reports of where real users get stuck with this setup.
| Platform | Videos | Rows asked per call | Rows returned (with replies) | Charge | Time per call |
|---|---|---|---|---|---|
| YouTube | 6 | 100 | 461 (289 top-level, 172 replies) | 6 × $0.000556 = $0.003336 | 11.5 to 78.6 s |
| Bilibili | 5 | 50 | 50 (10 per call) | 5 × $0.000556 = $0.002780 | 8.7 to 11.4 s |
| Douyin | 4 | 50 | 184 (86 top-level, 98 replies) | $0.006112 (per 20 rows) | 14.4 to 44.0 s |
We checked every charge. In the catalog, youtube/comments and bilibili/comments cost one price per call, whatever the row count. The Douyin Comments Scraper API has rows_per_unit: 20, so each 20 rows is one unit. 50 rows is 3 units (120 credits, $0.001667), and 34 rows is 2 units (80 credits, $0.001111). For all 15 calls, credits equals the catalog price times the units. J3 passes.
We also saw three things that you should know. First, the Bilibili Comments Scraper API returned only 10 rows on each of the 5 calls. We asked for 50. We do not cut these rows: Bilibili gives at most 10 comments per video. The catalog now says default 10, maximum 10. A larger limit is still accepted, but only 10 rows come back. At 20:01:21 SGT we checked the same video again with limit=50: 10 rows, $0.000556. This makes the Bilibili data fee high, $0.0556 per 1,000 rows.
So budget for at most 10 comments per Bilibili video. Second, on two Douyin pages the same comment id appeared twice. That was 8 of 184 rows. This was fixed at 19:53 SGT on October 26: the API now removes repeats by id and keeps the first one, and a billing unit that falls short after this is refunded by the normal rules. Our 184 rows came before the fix. Step 1 of the cleaning script still removes rows with a repeated id, as a safety net.
Third, YouTube posted_at is relative time, such as "7 days ago (edited)". Bilibili and Douyin give standard timestamps with a time zone. To group YouTube comments by date, convert from the fetch time, and treat the result as approximate.
Call time matters in Claude Code. Its MCP docs say an MCP call in the main conversation that runs past two minutes moves to a background task. The model gets a task ID at once and keeps working, and the result arrives later as a notification. Our slowest call was 78.6 seconds, well under two minutes.
The async_mode section of the EveryInfra catalog says the sync budget is 85 seconds. For large limit values, it suggests mode: "async" and the free everyinfra_get_job to read the result. If DeepSeek sends several calls at once (remember that disable_parallel_tool_use is ignored), your EveryInfra key also has a per-minute limit and returns 429 when you go over it. DeepSeek counts concurrency per account, and deepseek-flash allows 2,500 requests at once before it returns 429 (rate limit docs).
Test 2: what the cleaning script removed
We did not give the cleaning step to the model. We let the model write a script for it. If a rule can decide, sending the comment to the model only pays for reading.
The Claude Code cost docs give the same advice. Do not make the model read a 10,000-line log. A hook can grep for ERROR first and cut the context from tens of thousands of tokens to hundreds.
The script does four checks in order and stops at the first match. Step 2 uses Unicode NFKC normalization (UAX #15; in Python, unicodedata.normalize). It then removes links, emoji codes and punctuation, so the same sentence in full-width or different case counts as a duplicate. All rules are Python regular expressions, and you can run them again on the same data:
# Cleaning rules, version 4 (excerpt; the full script is saved with the raw responses)
BRACKET_EMOJI = re.compile(r"\[[一-鿿]{1,6}\]") # emoji codes such as [捂脸]; Chinese only inside brackets
PROMO = re.compile(r"(subscribe(?!r)|newsletter|giveaway|chrome extension|coupon|telegram|whatsapp|"
r"私信|加群|进群|加微|微信|qq群|关注我|免费领|领取|代金券|优惠|课程|戳我)", re.I)
for r in rows:
if (video, r["id"]) in seen_id: drop("same id"); continue # 1. same comment twice on a page
if (video, norm(r["text"])) in seen_text: drop("same text"); continue # 2. same text after normalization
if no_content(r["text"]): drop("no content"); continue # 3. emoji only, 666, two characters, not a question
if PROMO.search(r["text"]) or (has_link and (few_chars or bait)): drop("promotion"); continue # 4.
keep(f'{i}|{likes}|{"r" if r["is_reply"] else "t"}|{text_with_links_shortened}')We changed the script four times. Each change came after we read the removed comments and found a wrong removal. This process is the main lesson of the article. Cleaning rules always remove some good comments. You find them only when you read what you removed. Version 1 treated "New subscriber here" as promotion, because subscribe matched subscriber.
It also removed a Spanish question, "¿qué extensiones concretamente?", because of extension. And it removed a helpful reply that linked to the official Git download page. Version 2 fixed those three. Version 3 kept "Normal, están con un 90% de descuento", a normal comment about a DeepSeek discount, and stopped removing the two-character Chinese question "guì bù" ("is it expensive?").
Version 4 came from reading the kept text. The regex for bracketed emoji codes (a Chinese word in square brackets, such as the code for facepalm) was too wide. It deleted messages[1] from an error message and [1m] from a model name, and those were two of the most useful clues in this batch.
We read all 40 rows that version 4 removed and found no more wrong removals. We did not read all 655 kept rows. So some promotion without links or keywords is still in the data, for example offers to install the tools for a fee. On Douyin, "can help install" replies appeared several times. Text dedupe removed the repeats and kept the first one.

The noise share differs a lot by platform: 2.2% on YouTube, 12.0% on Bilibili and 13.0% on Douyin. One possible reason for the low YouTube number is that the platform filters first. The YouTube Data API commentThreads docs say only the channel owner can see "likely spam" and "held for review" comments in an authorized request. Public requests get published comments by default.
At Made on YouTube on September 23, 2026, YouTube also said it is testing opt-in AI comment moderation that learns each channel's style. On Douyin and Bilibili, the noise is mostly emoji, "666" and repeats, not outside links. The rule hits show the same pattern.
Test 3: how many tokens the model reads after cleaning
Cleaning saves more than rows. With the DeepSeek ratio, we estimated two token counts. The first sends the API JSON as is. The second sends only the cleaned line.
Douyin shrinks the most because of its fields. In the catalog, douyin/comments has 19 response fields, such as the avatar URL, IP location, mentioned users and whether the author liked the comment. One raw JSON row is about 180 tokens on average, but the median text is only 13 characters.
YouTube comments are longer, with a median of 61 characters and only 9 fields, so 38.0% stays after cleaning. Across the three platforms, 84,109 estimated tokens fall to 20,176, or 24.0%. J4 passes.
Why does this matter so much in Claude Code? An MCP tool result goes straight into the conversation context. Every later turn reads it again as part of the prefix. At the DeepSeek hit price, reading 10,000 tokens again costs only $0.00006. But you do not control the hit rate.
On a miss, the same 10,000 tokens cost $0.003 at $0.30 per million, and over dozens of turns that adds up. A safer pattern is to have Claude Code write a script. The script calls the EveryInfra REST API with curl, saves the raw JSON to files and prints only the cleaned text and counts. Keep MCP for interactive steps such as a first look, picking a capability and testing parameters.
# Batch pulls go through REST; raw responses go to disk, not into the chat
curl -s https://api.everyinfra.com/api/v1/social \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" -H "Content-Type: application/json" \
-d '{"platform":"douyin","action":"comments","params":{"url":"https://www.douyin.com/video/<video_id>","limit":50}}' \
-o raw/dy_<video_id>.json
python3 clean.py raw/ > cleaned.txt # prints only "index|likes|r/t|text" and the removal countsTest 4: what the rules label, and what goes to the model
After cleaning, we ran keyword rules to see how much they can label. The rules allow several labels on one comment, for example "price" and "compares models".
No rule matched 43.7% of YouTube comments, 29.5% on Bilibili and 48.1% on Douyin. That number sets how much the model must read: about half. Rules cannot replace the model. But they cut its work in half, and the half they label is usually the easiest and least worth paying for.
| Platform | Kept | Setup and errors | Price and quota | Compares models | Praise | No rule matched | Has a question |
|---|---|---|---|---|---|---|---|
| YouTube | 451 | 58 | 91 | 118 | 70 | 197 (43.7%) | 138 |
| Bilibili | 44 | 25 | 5 | 9 | 2 | 13 (29.5%) | 27 |
| Douyin | 160 | 52 | 18 | 19 | 2 | 77 (48.1%) | 59 |
The comments themselves are worth reading. On Bilibili, 25 of 44 ask about setup and errors. On Douyin, 52 of 160 do. The same questions repeat.
Why does it still ask for a login after setup? Why can it not read images? Why does it say it is Claude? Why does it burn tokens so fast?
On YouTube, two error messages stayed in the data word for word. The first is API Error: 400 Failed to deserialize the JSON body into the target type: messages[1].role: unknown variant system. The second is The content[].thinking in the thinking mode must be passed back. The FAQ below answers both from the official docs.
Under the Spanish video, the 83 Spanish comments talk most about price changes. More than one commenter says they got an email from DeepSeek about higher API prices. We treat this as a user report only. For prices, we use the DeepSeek pricing page.
For the model half, we give a config example. Claude Code sends the unmatched comments to a subagent in batches of 100, in the format "index|text". The subagent must return only a JSON array, with an index and one label per comment. The DeepSeek JSON output and tool call docs support structured output like this.
In Claude Code, the simplest way is to write the output format in the subagent definition. Then CLAUDE_CODE_SUBAGENT_MODEL=deepseek-flash runs it on the low-cost model. The subagent docs say this variable sets the default subagent model.
The deliverable: a label table that links back to the source
The output of this job is a table. Each row is one kept comment, with the platform, like count, original text (no user names), label and who applied the label. Below are 10 rows, sorted by likes. The rule label column shows the first pass by keyword rules. The last column shows our own review of each row.
| Platform | Likes | Comment (excerpt; Chinese translated) | Rule label | Our review |
|---|---|---|---|---|
| Douyin | 615 | "Just started using it. A batch of data files would take me days by hand; this did it in ten minutes or so" | None | User experience, positive; rules missed it |
| Douyin | 51 | "Can you install Claude Code for me?" | Compares models | Asks for install help; "claude" triggered the wrong label |
| Douyin | 36 | "Don't you feel tokens run out fast after you connect it?" | Price and quota | Correct |
| Douyin | 28 | "After I connected DeepSeek V4, Claude keeps loading the session. What do I do?" | Compares models | Error help; rules do not know this phrase |
| Douyin | 24 | "It seems the DeepSeek model cannot make images?" | None | Question about limits |
| Douyin | 14 | "Asked a few small questions and burned 700k tokens. Too fast." | Price and quota | Correct |
| Bilibili | 10 | "Didn't they say CC has safety risks? Do you still recommend it?" | None | Safety concern |
| YouTube | 17 | "Aprovechen los 0.14, porque va a subir los precios." | Price and quota | Correct |
| YouTube | 17 | "IT DOES NOT MATCH OPUS 5.5" | Compares models | Correct |
| YouTube | 6 | "i didn't understand single thing related to setup" | Setup and errors | Correct (feedback on the tutorial) |
In these 10 rows, the rules were right 5 times, missed 3 times and were wrong 2 times. The sample is too small to measure accuracy, but it shows the two types of rule errors. One type is a keyword that is too wide: any comment with "claude" counts as a model comparison. The other type is too many ways to say one thing: people ask for help with many different phrases, and rules cannot list them all. That is the part for the model, and it is why rules are only a first pass.
The model must be able to change a rule label before it goes into a report. A low-cost pattern in Claude Code is to send the model only two groups. One is rows with no rule label. The other is rows labeled only "compares models", where wrong labels collect. With our data, that is 368 of 655 kept comments, about 56%.
The most useful row for a product team is the comment with 615 likes. The most liked comment is not about setup or price. It is about a result: a batch of data files handled in minutes.
With rules only, this row falls into "other", yet it is the most typical voice under that video. This is why we keep the like count in the cleaned text. It costs almost no tokens and gives the model a cheap weight for "how many people agree".
Test 5: what the model sees after a bad parameter
At 17:26:46 SGT, our first searches put limit at the top level of the request body. All three platforms returned 422 with the error code unknown_param. The message said "limit goes inside params, not at the top level of the body", with did_you_mean: ["params.limit"] and a last sentence, "Nothing was charged." This was not on purpose. It is the type of mistake a model makes. At 17:37:53, we sent sort: "top" through MCP on purpose:

| Case | Response | What the model sees on DeepSeek | Charge |
|---|---|---|---|
REST: limit at the top level (17:26:46, three platforms) | 422 unknown_param, did_you_mean: ["params.limit"] | Not applicable (a script handles REST) | $0 |
REST: sort: "top" (17:38:00) | 422 invalid_value, allowed: ["newest","popular"] | Not applicable | $0 |
MCP: sort: "top" (17:37:53) | isError: true, two text parts and structuredContent | Two text parts: the bad parameter, allowed values and "Nothing was charged." | $0 |
The third row proves J7. DeepSeek ignores is_error, so the model does not know this was a failure. It reads only the two text parts. Those parts already name the bad parameter, list the allowed values, say to change only that value and resend, and say nothing was charged. The error codes and the "failures are free" rule are in the error table of the EveryInfra docs.
The full request and error formats are in the OpenAPI file. Unknown parameters and bad enum values return 422 with the supported parameters, allowed values and a suggestion. They are never ignored and charged. A sync call over 85 seconds returns 503 timeout and is not billed either. For a model endpoint that ignores the error flag, this rule is what lets the model fix itself.
Cost: DeepSeek token prices plus the EveryInfra data fee
The DeepSeek pricing page (read October 26, 2026) splits the day into peak and off-peak. Peak is 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday through Friday, except Chinese public holidays. All other hours are off-peak, at half price. For US readers this has a useful effect. On October 26, the US East Coast is on daylight time (UTC−4), so peak is 21:00 to 24:00 and 02:00 to 06:00 Eastern.
Your whole working day is off-peak. On the West Coast (UTC−7), peak is 18:00 to 21:00 and 23:00 to 03:00 Pacific. Our test ran on a Monday at 17:26 to 17:38 SGT, which is 09:26 to 09:38 UTC and inside peak hours. So our peak prices are the worst case for a US daytime user.
| Per million tokens (USD) | deepseek-flash peak | deepseek-flash off-peak | deepseek-v4-pro peak | Claude Haiku 5.5 | Claude Sonnet 5.5 | Claude Opus 5.5 |
|---|---|---|---|---|---|---|
| Input (miss) | $0.30 | $0.15 | $1.32 | $0.10 | $2.00 | $4.00 |
| Cache hit | $0.006 | $0.003 | $0.044 | $0.01 | $0.10 | $0.20 |
| Cache write (5 min) | No separate price | No separate price | No separate price | $0.125 | $2.50 | $5.00 |
| Output | $1.20 | $0.60 | $3.96 | $0.50 | $10.00 | $20.00 |
The Chinese pricing page lists flash input at CNY 2 (peak) and CNY 1 (off-peak) per million tokens. Output is CNY 8 and CNY 4. We used about CNY 6.67 per dollar, the price_cny to price_usd ratio in the EveryInfra catalog on the same day.
That gives about $0.30, $0.15, $1.20 and $0.60, the same as the USD page. Haiku 5.5 prices apply to prompts up to 100,000 tokens. Longer prompts cost $0.50 and $2.50.
The data fee follows the EveryInfra catalog price_usd. youtube/comments, bilibili/comments and douyin/comments each cost $0.000556 per call ($0.56 per 1,000 calls), and Douyin also bills per 20 rows. With our average rows per call, the data fee per 1,000 kept comments is $0.0074 on YouTube, $0.0632 on Bilibili and $0.0382 on Douyin.
For the model fee, we estimated only the labeling step. Input is the cleaned tokens for 1,000 comments plus 400 instruction tokens per batch of 100. Output is an 8-token label per comment. There are no thinking tokens.
This is a lower bound, because deepseek-flash uses thinking mode by default. We added one sensitivity case with 1,500 extra thinking tokens per batch. The 1,500 is an assumption, not a measurement.
| Per 1,000 cleaned comments | Data fee | flash peak | flash off-peak | Haiku 5.5 | Sonnet 5.5 | flash peak, +1,500 thinking tokens per batch |
|---|---|---|---|---|---|---|
| YouTube | $0.0074 | $0.0224 | $0.0112 | $0.0083 | $0.1652 | $0.0404 |
| Bilibili | $0.0632 | $0.0168 | $0.0084 | $0.0064 | $0.1282 | $0.0348 |
| Douyin | $0.0382 | $0.0143 | $0.0072 | $0.0056 | $0.1114 | $0.0323 |
This table changed what we expected. We thought the model fee would dominate and the data fee would not matter. On YouTube that is true: the model fee is 3 times the data fee. But on Bilibili and Douyin, the comments are short and the cleaned token count is small.
There, the data fee is higher than the deepseek-flash peak model fee. For short Chinese comments on flash, the data side is the larger part of the bill. Then the data source and the rows per call matter most.
Now put it into one month. Each platform has 120 videos per month (30 per week). Claude Code runs one session per week with the sample usage from the cost docs, with cache hits.
| One month (120 videos per platform, 4 sessions) | Data fee | Label model fee | Session fee (hits) | Total |
|---|---|---|---|---|
| deepseek-flash peak | $0.3168 | $0.2883 | $0.1096 | $0.7147 |
| deepseek-flash off-peak | $0.3168 | $0.1441 | $0.0548 | $0.5157 |
| Claude Haiku 5.5 | $0.3168 | $0.1080 | $0.0736 | $0.4984 |
| Claude Sonnet 5.5 | $0.3168 | $2.1602 | $1.0976 | $3.5746 |
| deepseek-v4-pro peak | $0.3168 | $1.1115 | $0.5196 | $1.9479 |
One month pulls about 15,940 rows and keeps about 14,876 comments. All of it costs under $0.72 at flash peak prices and about $3.57 on Sonnet 5.5. Haiku 5.5 costs $0.50, less than flash at peak and about the same as flash off-peak. The data fee of $0.3168 is the same in every row, because it depends only on how much you pull.
Same job on official Claude models: how to choose
Together, the tables give a clear choice. On token price, Claude Haiku 5.5 is one of the cheapest options for this job. It is also a native Claude Code model, so none of the compatibility issues above apply.
Caching follows cache_control, is_error reaches the model, and tool search and structured output work. deepseek-flash is cheaper only when two things are both true: you run off-peak, and most of your cache hits. For US daytime users, the first condition is true by default.
Why would anyone pick DeepSeek, then? The comments give real reasons. Some users are in mainland China, where direct access to Anthropic is limited by region. Some already have DeepSeek credit. Some want open weights that they can host.
Some want another worker model in an "Opus 5.5 plans, a low-cost model executes" split. In one Reddit user's own 86-question test, DeepSeek Flash and Haiku 5.5 scored almost the same (86.6 and 84.7). The author says the test is small and a 2-point gap is noise. He also says DeepSeek Flash sometimes "thought itself into a hole and returned nothing." Use second-hand tests like this as context only.
| Your situation | Better choice | Reason |
|---|---|---|
| You can reach Anthropic and want few surprises | Haiku 5.5 as the subagent; Sonnet 5.5 or Opus 5.5 as the main session | One of the lowest prices, no compatibility gaps |
| You can use only DeepSeek, or already paid for it | deepseek-flash on all aliases; run batches off-peak | Off-peak is half price; turn off tool search and watch cache hits |
| Large volume of short Chinese comments | Either; first improve cleaning and pulling | The data fee is already the same size as the model fee |
| You need images (error screenshots) | Do not leave the opus alias on deepseek-v4-pro | The pricing page says deepseek-v4-pro has no image input |
What the new DeepSeek Search/Fetch API covers
In the same October 17 release note, DeepSeek opened its own Search and Fetch APIs to the public. Each costs $0.75 per 1,000 successful requests (guide). The search guide says Search returns web results with title, link, summary and page text, and Fetch turns one page into Markdown. Failed requests, empty results and timeouts are not billed. The limits are 100 requests per second for Search and 25 for Fetch, per account.
One sentence in it matters for this job. When you use the DeepSeek API in Claude Code, web search runs through server-side tool calls that hit the DeepSeek Search and Fetch APIs. These calls are free now, and billing per request starts on November 1, 2026, at 00:00 Beijing time (16:00 UTC on October 31). After that, each "look it up on the web" in this setup costs $0.75 per 1,000 searches on top of model tokens.
Search and Fetch cover the general web: what a blog post says, or what a docs page shows now. They do not cover data inside platforms. Examples are the likes on one YouTube comment, the reply rows on a Douyin page, or the post time of a Bilibili comment. That data is not in public page text, or it needs pages, logins and structured fields.
So in this setup, the two tools split the work. DeepSeek Search and Fetch handle the general web. EveryInfra data APIs handle comments, posts, profiles and search results inside platforms. DeepSeek's own agent harness, DeepSeek Harness, splits the work the same way: it has built-in web search, and platform data still needs another tool.
Limits and things to watch
First, the support boundary. The Anthropic gateway docs say routing Claude Code to non-Claude models through a gateway is not supported. Each Claude Code release adds features, and if a gateway or compatible endpoint does not pass them through, those features break. In four releases from October 19 to 23, the changelog fixed several request failures behind a custom ANTHROPIC_BASE_URL. Version 2.1.304 turned tool search on by default.
Version 2.1.305 fixed the "every request fails" bug that came with it. Version 2.1.310 retries when a compatible server rejects the effort beta header or a mid-conversation system message. With this setup, expect it to work better or worse as Claude Code changes. When a new problem appears, search the Claude Code GitHub repository first.
Second, where the data goes. Comment text goes to DeepSeek servers for processing. The comments are public, but they contain user names and IP locations, which are personal data.
Our script sends only the text, the like count and a reply flag to the model. It never sends user names, avatars or locations, and reports hide them too. This saves tokens and sends less personal data.
Third, key safety. In October, a popular Reddit post described a benchmark sandbox that put an API key in an environment variable. The tester says DeepSeek V4.1 Flash found that key and abused it (original post). The author later called it "API key abuse but not exfiltration", and many comments blame the sandbox design.
Whatever the label, the lesson applies to every model: do not let a model read a key that it should not use. Create a separate EveryInfra key for this job and pass it only through an environment variable. The rule that Claude Code reads its own credential variables as empty in MCP headers follows the same idea.
Fourth, platform and data limits. We pulled only public comments under public videos, with one request per video and no paging. Bilibili gives at most 10 comments per video. Douyin search returns only the first page. Without a page token, Douyin reads only about 50 rows from the top, with replies. YouTube times are relative.
Content on mainland Chinese platforms is also under active regulation. On September 30, 2026, the Cyberspace Administration of China started a two-month campaign against fake personas in short videos. On September 2, it reported phase two of its campaign on AI app misuse. Promotion and install offers in comment sections will change with platform enforcement. Our noise shares apply only to these 15 videos on this day.
Fifth, what we did not do. We did not run the DeepSeek and Claude Code side, so every claim about DeepSeek behavior comes from its docs. Token counts are estimates from a ratio. We did not measure label accuracy, because we have no human-labeled set. The session cost uses one sample from the Claude Code docs, and your sessions can be much longer or shorter.
Recent changes worth knowing (September to October 2026)
- October 17, 2026: DeepSeek V4.1-Flash-1017 ships, and the Search/Fetch API opens (release note). What it means for you: the model behind the name
deepseek-flashhas changed. The old namedeepseek-v4-flashstill works at Flash prices. Web search inside Claude Code starts to cost money on November 1. - October 7, 2026: Claude Haiku 5.5 launches, and Sonnet 5.5 cache reads drop to $0.10 (release notes). What it means for you: the low-cost tier now includes a Claude model, so add Haiku 5.5 to any price comparison. Manual
budget_tokens,temperatureand similar parameters return 400 on Haiku 5.5, so update old code. - October 19 to 23, 2026: Claude Code 2.1.304 to 2.1.310 change behavior behind custom URLs (changelog, npm package). What it means for you: tool search is on by default behind a gateway, with an automatic retry after 400 or 422. Check your setup again after each Claude Code upgrade.
- September 23 to October 14, 2026: GIFs in YouTube comments and a test of AI comment moderation (YouTube Official Blog, 9to5Google report). What it means for you: expect more comments with a GIF and no text, so your "no content" rule needs to handle them. Stronger platform moderation also means less spam in public comments.
- September 30, 2026: the Cyberspace Administration of China starts a campaign on fake personas in short videos (notice). What it means for you: platforms will remove more promotion, install offers and fake-persona ads from Douyin and Bilibili comments. Noise shares can change within weeks.
- October 15, 2026: the YouTube Data API commentThreads page is updated (docs). What it means for you: the official API costs 1 quota unit per call and returns up to 100 items per page. It shows "likely spam" only to the channel owner. For public comments on other channels, use the quota rules in the YouTube Data API overview, or use a data API.
FAQ
Claude Code still asks me to log in after the deepseek claude code setup. Why?
A Douyin commenter asked "why can't I skip the login?" The Claude Code gateway connection docs cover this in the troubleshooting table. In interactive mode, an env block in the project .claude/settings.json applies only after the first-run wizard and the trust prompt. So the CLI starts without a credential.
Set ANTHROPIC_AUTH_TOKEN in your shell or in user settings. If you set only ANTHROPIC_BASE_URL with no credential, your claude.ai login still applies. Sources: Douyin comments we pulled (Oct 26, 2026); Claude Code docs.
What does `The content[].thinking in the thinking mode must be passed back` mean?
This exact error appeared in YouTube comments that we pulled. The DeepSeek thinking mode docs cover requests that have tools. In them, all earlier reasoning content must be sent back in full, or the API returns 400. Claude Code sends thinking blocks back as they are.
If a third-party converter in the middle drops them, you get this error. Try once with a direct connection to the DeepSeek Anthropic endpoint. If you see Extra inputs are not permitted, the Claude Code error reference says to upgrade to 2.1.304 or later, or set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1. Sources: YouTube comments we pulled; DeepSeek docs; Claude Code docs.
How do I fix `messages[1].role: unknown variant system`?
This also came from YouTube comments that we pulled. Claude Code adds system messages in the middle of a conversation. The DeepSeek tool call docs say its Anthropic API supports mid-conversation system messages, but some middle layers do not. The Claude Code 2.1.310 changelog (October 23, 2026) says Claude Code now retries without those messages when a compatible server rejects them.
Upgrading to 2.1.310 or later usually fixes it. DeepSeek also publishes a prompt encoding library, deepseek-recipe, and its tests include mid-conversation system messages, so the model is built for this format. Sources: YouTube comments we pulled; Claude Code changelog.
Why can't it read images after I connect DeepSeek?
A Douyin commenter asked "what do I do if this model cannot read images?" The DeepSeek pricing table says deepseek-flash supports images and deepseek-v4-pro does not. Model names that start with claude-opus map to deepseek-v4-pro. If your opus alias does not point to deepseek-flash, it cannot read images after you switch to Opus. Sources: Douyin comments we pulled; DeepSeek pricing and compatibility pages.
Isn't Haiku 5.5 cheaper?
A YouTube commenter asked exactly this. By our math, yes. For the sample session, Haiku 5.5 costs $0.0184 and deepseek-flash at peak costs $0.0274.
To label 1,000 YouTube comments, the model fee is $0.0083 on Haiku 5.5 and $0.0224 on flash at peak. Flash is cheaper only off-peak with most cache hits. Sources: YouTube comments we pulled; Anthropic and DeepSeek pricing pages (read Oct 26, 2026).
Can the deepseek anthropic api connect to MCP servers directly?
"deepseek claude code mcp" is a common search suggestion. The DeepSeek compatibility table says it ignores mcp_servers in the request and does not support mcp_tool_use or mcp_tool_result blocks. So DeepSeek will not connect to MCP servers for you.
In Claude Code this is not a problem. Claude Code is the MCP client, sends tools/call locally and gives the model normal tool definitions and tool results. Sources: Google search suggestions (Oct 26, 2026); DeepSeek compatibility notes.
Can the deepseek search api replace a platform comment API?
Not fully. DeepSeek Search returns web search results and page text, which is good for general facts. It does not cover structured data inside platforms, such as comments under a video, like counts and reply links. Sources: Google search suggestion "deepseek search api" (our research notes, Oct 26, 2026); DeepSeek search guide.
Related reading
- Remote MCP setup: one config for common clients
- Selling topic reports from YouTube comments: a cost log for mid-size creators
- How to reconcile failure refunds
- What the MCP 2026 spec still lacks for production
- EveryInfra MCP server, pricing and the Douyin Comment Replies Scraper API
References
- DeepSeek V4.1 Flash new version release note (Chinese), DeepSeek, 2026-10-17, <https://api-docs.deepseek.com/zh-cn/news/news261017>
- Integrate with Claude Code, DeepSeek API Docs, read 2026-10-26, <https://api-docs.deepseek.com/quick_start/agent_integrations/claude_code>
- Using the Anthropic API, DeepSeek API Docs, read 2026-10-26, <https://api-docs.deepseek.com/guides/anthropic_api>
- Models & Pricing (USD), DeepSeek API Docs, read 2026-10-26, <https://api-docs.deepseek.com/quick_start/pricing>
- Models & Pricing (CNY), DeepSeek API Docs, read 2026-10-26, <https://api-docs.deepseek.com/zh-cn/quick_start/pricing>
- Search & Fetch, DeepSeek API Docs, read 2026-10-26, <https://api-docs.deepseek.com/guides/search>
- Context Caching, DeepSeek API Docs, read 2026-10-26, <https://api-docs.deepseek.com/guides/kv_cache>
- Token & Token Usage, DeepSeek API Docs, read 2026-10-26, <https://api-docs.deepseek.com/quick_start/token_usage>
- Rate Limit & Isolation, DeepSeek API Docs, read 2026-10-26, <https://api-docs.deepseek.com/quick_start/rate_limit>
- Thinking Mode, DeepSeek API Docs, read 2026-10-26, <https://api-docs.deepseek.com/guides/thinking_mode>
- Tool Calls, DeepSeek API Docs, read 2026-10-26, <https://api-docs.deepseek.com/guides/tool_calls>
- JSON Output, DeepSeek API Docs, read 2026-10-26, <https://api-docs.deepseek.com/guides/json_mode>
- DeepSeek-V4.1-Flash-1017 model card, Hugging Face, read 2026-10-26, <https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017>
- DeepSeek Harness Quickstart, DeepSeek, read 2026-10-26, <https://deepseek-harness.github.io/deepseek-harness/en/guide/quickstart>
- Environment variables, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/env-vars>
- Connect Claude Code to tools via MCP, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/mcp>
- Other LLM gateways, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/llm-gateway>
- Gateway compatibility guide, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/llm-gateway-protocol>
- Connect Claude Code to an LLM gateway, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/llm-gateway-connect>
- Manage costs effectively, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/costs>
- Model configuration, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/model-config>
- Subagents, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/sub-agents>
- Hooks, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/hooks>
- Prompt caching, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/prompt-caching>
- Changelog (2.1.304 to 2.1.310, Oct 19 to 23, 2026), Claude Code Docs, <https://code.claude.com/docs/en/changelog>
- Permissions, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/permissions>
- Settings, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/settings>
- @anthropic-ai/claude-code, npm, read 2026-10-26 (latest 2.1.310), <https://www.npmjs.com/package/@anthropic-ai/claude-code>
- anthropics/claude-code, GitHub, read 2026-10-26, <https://github.com/anthropics/claude-code>
- Pricing, Claude Platform Docs, read 2026-10-26, <https://platform.claude.com/docs/en/about-claude/pricing>
- Release notes, Claude Platform Docs, read 2026-10-26, <https://platform.claude.com/docs/en/release-notes/overview>
- Prompt caching, Claude Platform Docs, read 2026-10-26, <https://platform.claude.com/docs/en/build-with-claude/prompt-caching>
- Tool use overview, Claude Platform Docs, read 2026-10-26, <https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview>
- Token counting, Claude Platform Docs, read 2026-10-26, <https://platform.claude.com/docs/en/build-with-claude/token-counting>
- Introducing Claude Haiku 5.5, Anthropic, 2026-10-07, <https://www.anthropic.com/claude-haiku-5-5>
- Tools (MCP specification 2025-06-18), Model Context Protocol, <https://modelcontextprotocol.io/specification/2025-06-18/server/tools>
- CommentThreads: list, YouTube Data API, updated 2026-10-15, <https://developers.google.com/youtube/v3/docs/commentThreads/list>
- YouTube Data API Overview (quota), Google for Developers, read 2026-10-26, <https://developers.google.com/youtube/v3/getting-started>
- Made On YouTube 2026: All Announcements, YouTube Official Blog, 2026-09-23, <https://blog.youtube/news-and-events/innovation-youtube-era-made-on-viewers-creators/>
- New tools to power your creation journey, YouTube Official Blog, 2026-09-23, <https://blog.youtube/news-and-events/made-on-youtube-new-tools-power-creation-journey/>
- YouTube begins rolling out GIF support for comments, 9to5Google (secondary report; original at item 39), 2026-10-14, <https://9to5google.com/2026/10/14/youtube-begins-rolling-out-gif-support/>
- CAC campaign on fake personas in short videos (Chinese), Cyberspace Administration of China, 2026-09-30, <https://www.cac.gov.cn/2026-09/30/c_1792520301987752.htm>
- CAC campaign on AI app misuse, phase two (Chinese), Cyberspace Administration of China, 2026-09-02, <https://www.cac.gov.cn/2026-09/02/c_1790099041364574.htm>
- EveryInfra capability catalog, EveryInfra, read 2026-10-26 17:23 SGT, <https://api.everyinfra.com/api/v1/social/catalog>
- EveryInfra OpenAPI, EveryInfra, read 2026-10-26, <https://api.everyinfra.com/openapi.json>
- PSA: DeepSeek V4.1 Flash habitually exfiltrates API keys, Reddit r/LocalLLaMA (user post, secondary), October 2026, <https://www.reddit.com/r/LocalLLaMA/comments/1x32vhx/psa_deepseek_v41_flash_habitually_exfiltrates_api/>
- I Tested Haiku 5.5 vs Luna vs DeepSeek Flash vs Gemini 3.8 Flash, Reddit r/ClaudeAI (user post, secondary), October 2026, <https://www.reddit.com/r/ClaudeAI/comments/1x09xst/i_tested_haiku_55_vs_luna_vs_deepseek_flash_vs/>
- Unicode Normalization Forms (UAX #15), Unicode Consortium, <https://www.unicode.org/reports/tr15/>
- unicodedata, Python docs, <https://docs.python.org/3/library/unicodedata.html>
- RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format, IETF, <https://www.rfc-editor.org/rfc/rfc8259>
- Claude Code on third-party platforms, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/third-party-integrations>
- Gateways overview, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/gateways>
- Errors, Claude Code Docs, read 2026-10-26, <https://code.claude.com/docs/en/errors>
- deepseek-ai/deepseek-recipe, GitHub, read 2026-10-26, <https://github.com/deepseek-ai/deepseek-recipe>
- re — Regular expression operations, Python docs, <https://docs.python.org/3/library/re.html>
Reference BL-56