1. Home
  2. Insights
  3. AI & Chatbots

DeepSeek V4.1 Flash 1017 API: Pricing, Search Tool and Code

DeepSeek updated V4.1 Flash on 17 October and opened a web Search API. Prices, the model name, thinking settings, search code and where the model fits.

Abstract illustration for our DeepSeek V4.1 Flash 1017 guide, showing the title DeepSeek V4.1 Flash 1017 API: Pricing, Search Tool and Code.
Illustration: Apex Logic
On this page
  1. DeepSeek V4.1 Flash 1017 at a glance
  2. What changed in the 1017 update
  3. DeepSeek V4.1 Flash pricing
  4. How to call DeepSeek V4.1 Flash from Python
  5. DeepSeek Search and Fetch APIs
  6. Use DeepSeek V4.1 Flash in Claude Code or OpenCode
  7. Running the open weights
  8. Check the data rules before you send customer data
  9. Where DeepSeek V4.1 Flash fits in a business tool
  10. DeepSeek V4.1 Flash FAQ

Quick answer

DeepSeek V4.1 Flash 1017 is the 17 October 2026 update to DeepSeek's low-cost model, and the deepseek-flash model name now serves it at unchanged prices: as of 18 October 2026, $0.30 per 1M input tokens and $1.20 per 1M output tokens at peak, and half that off-peak. DeepSeek also opened Search and Fetch APIs at $0.75 per 1,000 successful requests each. The MIT-licensed weights are on Hugging Face and ModelScope.

  • deepseek-flash now serves V4.1 Flash 1017, same prices
  • Peak $0.30 in / $1.20 out per 1M tokens, off-peak half
  • New Search and Fetch APIs at $0.75 per 1,000 calls
  • MIT-licensed weights on Hugging Face and ModelScope

Updated 18 October 2026. DeepSeek released V4.1 Flash 1017 and opened its Search and Fetch APIs on 17 October, and this guide covers prices, settings and working code.

DeepSeek V4.1 Flash 1017 is the newest version of DeepSeek's low-cost model, and if your code calls deepseek-flash, you are already using it. DeepSeek released it on 17 October 2026 as a minor update to V4.1 Flash, which launched on 10 September. The model name, the way you call it and the prices did not change. DeepSeek says the update scores higher on its coding and agent tests, finishes tasks faster and writes shorter answers.

As of 18 October 2026, deepseek-flash costs $0.30 per 1M input tokens, $0.006 per 1M cached input tokens and $1.20 per 1M output tokens at peak times, and exactly half that off-peak. DeepSeek also opened two web tools, Search and Fetch, at $0.75 per 1,000 successful requests each, and published the weights on Hugging Face under the MIT license. Below: quick facts, a cost example, Python code and where the model fits.

DeepSeek V4.1 Flash 1017 at a glance

From DeepSeek's models and pricing page, release note and changelog, checked on 18 October 2026:

ItemDeepSeek V4.1 Flash 1017
API model namedeepseek-flash; the retired names deepseek-v4-flash and deepseek-v4-flash-vision-exp still work and are billed at the Flash price
ReleasedV4.1 Flash on 10 September 2026, the 1017 update on 17 October 2026
Context window1M tokens
Maximum output384K tokens
ModesThinking (the default) and non-thinking, with effort low, high or max
FeaturesJSON output, tool calls, image input, Responses API, Anthropic-format API, chat prefix completion (beta), fill-in-the-middle completion (beta, non-thinking only)
Concurrency limit2,500 requests for deepseek-flash (500 for deepseek-v4-pro)
Base URLshttps://api.deepseek.com (OpenAI format) and https://api.deepseek.com/anthropic (Anthropic format)
WeightsHugging Face and ModelScope, MIT license

One catch: deepseek-flash always points to the latest Flash version, and the pricing page lists no dated model name you can pin. Keep a set of test prompts with known good answers and re-run them after every DeepSeek update.

What changed in the 1017 update

DeepSeek calls 1017 a Pareto improvement: better scores, faster task completion and shorter outputs, which together cut the cost of a finished task. It credits reinforcement learning with self-feedback and says the model is tuned for agent tools such as DeepSeek Harness, Tencent CodeBuddy and WorkBuddy. DeepSeek's own results, from the Hugging Face model card:

Test (DeepSeek-reported)V4.1 Flash 1017V4.1 Flash (Sept)Kimi K3GLM-5.3GPT-5.6 SolClaude Opus 5
HLE, no tools42.636.843.542.0 (text only)44.556.3
Terminal-Bench 4.042.331.212.637.939.951.8
DeepSWE v1.177.074.267.566.973.074.0
Automation-Bench v1.0.660.554.846.748.845.850.3
Agents' Last Exam35.431.827.628.526.728.6
BabyVision (with tools)92.589.685.7Not reported88.994.1

DeepSeek ran Terminal-Bench 4.0 in the Claude Code harness. The table compares against GPT-5.6 Sol and Claude Opus 5, not the newer GPT-6 or Claude 5.5 models, and Opus 5 still leads on HLE, Terminal-Bench 4.0 and BabyVision. The Decoder reported that on DeepSeek's cost chart, 1017 reaches 77.0% on DeepSWE for just under $0.20 per task, against about $0.50 for the September version, with no independent benchmarks yet. Treat the numbers as a reason to test.

DeepSeek V4.1 Flash pricing

Prices per 1M tokens in US dollars for deepseek-flash, as of 18 October 2026:

Token typePeakOff-peak
Input, cache hit$0.006$0.003
Input, cache miss$0.30$0.15
Output$1.20$0.60

Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday, excluding Chinese public holidays. Every other hour, including weekends, is off-peak. A 9 to 5 working day on the US East Coast falls entirely in off-peak time, while UK and European mornings overlap the 06:00 to 10:00 UTC window. For comparison, deepseek-v4-pro costs $1.32 per 1M input tokens and $3.96 per 1M output tokens at peak ($0.66 and $1.98 off-peak) and does not take images.

DeepSeek bills input and output tokens from a prepaid balance and says prices can change. Thinking mode generates more tokens per request, so measure real requests in your usage log before you set a budget.

What a month of chatbot traffic costs

A hypothetical example at the prices above: a support chatbot handles 1,000 requests a day for 30 days. Each request sends 3,000 input tokens, 2,000 of them a fixed system prompt that hits the cache, and gets 500 output tokens back. That is 60M cached and 30M uncached input tokens, plus 15M output tokens a month.

  • All at peak: 60 x $0.006 = $0.36, plus 30 x $0.30 = $9.00, plus 15 x $1.20 = $18.00, so $27.36 a month.
  • All off-peak: $0.18 + $4.50 + $9.00 = $13.68 a month.
  • Peak with no cache hits: 90 x $0.30 = $27.00, plus $18.00 for output, so $45.00 a month.

So keep the fixed part of the prompt identical between requests, and move batch jobs such as nightly summaries to off-peak hours. Our LLM API costs guide covers more ways to cut the bill.

How to call DeepSeek V4.1 Flash from Python

  1. Create an API key on the DeepSeek Platform (platform.deepseek.com, API keys page) and top up your balance.
  2. Store the key in an environment variable, here DEEPSEEK_API_KEY.
  3. Install the OpenAI Python SDK and point it at DeepSeek's base URL, as DeepSeek's quick start shows.
# pip install openai
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["DEEPSEEK_API_KEY"],
    base_url="https://api.deepseek.com",
)

response = client.chat.completions.create(
    model="deepseek-flash",
    messages=[
        {"role": "system", "content": "You are a polite support assistant for an online store."},
        {"role": "user", "content": "Can I change my delivery address after I order?"},
    ],
    reasoning_effort="low",
    extra_body={"thinking": {"type": "enabled"}},
)

print(response.choices[0].message.content)

The OpenAI SDK has no named thinking argument, which is why it goes in extra_body. For simple, high-volume jobs such as tagging tickets, try extra_body={"thinking": {"type": "disabled"}} and check whether quality holds on your test set.

Thinking mode rules that cause errors

From DeepSeek's thinking mode guide:

  • It is on by default, at high effort. reasoning_effort takes low, high or max. Other names are mapped: minimal becomes low, medium and xhigh become high, and ultra becomes max.
  • The reasoning comes back separately in reasoning_content, next to content; keep it out of customer-facing replies.
  • Tool calls need the reasoning sent back. If a request includes tools, you must pass the reasoning_content of every earlier assistant turn back to the API, or it returns a 400 error. Without tools, you can drop it.
  • Some sampling settings do nothing. In thinking mode, temperature, presence_penalty and frequency_penalty have no effect. For deepseek-flash, top_p only applies in thinking mode, between 0.95 and 1.0.

DeepSeek Search and Fetch APIs

The second 17 October launch matters for agent builders: DeepSeek opened its in-house search engine through two JSON endpoints that use your normal API key. From the Search and Fetch guide:

ItemSearchFetch
EndpointPOST https://api.deepseek.com/v1/tools/searchPOST https://api.deepseek.com/v1/tools/fetch
ReturnsRanked results with title, URL, snippet, summary, optional page text, date and scoresOne web page as Markdown, plus its title
Main inputsquery (1 to 128 characters), count (1 to 50, default 10), need_contenturl (HTTP or HTTPS, up to 8,192 characters)
Price, as of 18 October 2026$0.75 per 1,000 successful requests$0.75 per 1,000 successful requests
Rate limit5 requests per second per account5 per second per account, plus a per-domain limit

Only HTTP 200 responses with a result are billed, so failed calls, empty searches and timeouts cost nothing, and count does not change the price. Search tool calls made through DeepSeek Harness, Claude Code or Codex are free until billing starts at 16:00 UTC on 31 October 2026 (midnight on 1 November in Beijing). The guide does not say direct API calls are free meanwhile, so budget for them.

Queries accept operators such as site:, -site:, exact phrases in quotes, lang:, after: and before:. Each result carries a rerank_score from 0 to 3, where DeepSeek treats 1.5 or higher as high quality, and an authority score from 0 to 4. This code searches, keeps the strong results and fetches the best page:

import os
import requests

HEADERS = {
    "Authorization": "Bearer " + os.environ["DEEPSEEK_API_KEY"],
    "Content-Type": "application/json",
}

def search(query, count=5):
    r = requests.post(
        "https://api.deepseek.com/v1/tools/search",
        headers=HEADERS,
        json={"query": query, "count": count},
        timeout=30,
    )
    r.raise_for_status()
    return r.json()["results"]

def fetch(url):
    r = requests.post(
        "https://api.deepseek.com/v1/tools/fetch",
        headers=HEADERS,
        json={"url": url},
        timeout=60,
    )
    r.raise_for_status()
    return r.json()

hits = [h for h in search("DeepSeek V4.1 Flash 1017 lang:en") if h["rerank_score"] >= 1.5]
for h in hits:
    print(round(h["rerank_score"], 2), h["title"], h["url"])

if hits:
    page = fetch(hits[0]["url"])
    print(page["title"])
    print(page["content"][:500])

To answer a question from fresh sources, pass the results' summary fields to the model and ask it to cite the URLs. This illustrative snippet reuses client from the first example:

question = "What changed in DeepSeek V4.1 Flash 1017?"
hits = search(question, count=5)
sources = "\n\n".join(h["title"] + " (" + h["url"] + ")\n" + h["summary"] for h in hits)

answer = client.chat.completions.create(
    model="deepseek-flash",
    messages=[
        {"role": "system", "content": "Answer only from these sources and cite their URLs.\n\n" + sources},
        {"role": "user", "content": question},
    ],
    extra_body={"thinking": {"type": "disabled"}},
)
print(answer.choices[0].message.content)

Cost check, as of 18 October 2026: three searches and two fetches per question is five billable requests, about $0.00375, so 10,000 questions a month adds about $37.50 before token costs. Requests above 5 per second get HTTP 429, so queue them and retry.

Use DeepSeek V4.1 Flash in Claude Code or OpenCode

Because DeepSeek also speaks the Anthropic API format, coding agents built for Claude can run on it. DeepSeek's Claude Code setup page lists these variables for Linux and Mac (it also shows PowerShell):

export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN=your-deepseek-api-key
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
export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-flash
export CLAUDE_CODE_EFFORT_LEVEL=max
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=786432

Watch the model mapping on DeepSeek's Anthropic-format endpoint: any model name starting with claude-opus is served by deepseek-v4-pro and billed at the V4 Pro price, while claude-sonnet and claude-haiku names go to deepseek-flash. Web search inside Claude Code runs on DeepSeek's search engine and moves to Search API billing when that starts. For OpenCode, DeepSeek's OpenCode page, written for 1.x releases, says to run /connect, choose deepseek and paste your key; read our OpenCode 2.0 upgrade guide before you move to the new version.

Running the open weights

The 1017 weights use the MIT license, which permits commercial use. The model card shows serving with vLLM, SGLang, Transformers and Docker Model Runner, and lists quantized builds for llama.cpp, Ollama, LM Studio and Jan. There is no Jinja chat template: DeepSeek ships a Python reference encoder and recommends its deepseek-recipe library to build prompts and parse thinking and tool calls.

Plan for a server, not a laptop. DeepSeek's September launch note describes a 552B-parameter mixture-of-experts model with 8B active parameters for input and 16B for output, while the Hugging Face listing for 1017 shows 763B parameters; we found no explanation for the gap. At 8 bits per parameter, that is roughly 550 to 760 GB for the weights alone (our arithmetic; the card states no hardware requirements). Hosted options exist too: OpenRouter lists it as deepseek/deepseek-v4.1-flash-1017, though its page says EU in-region routing is not available for it. Our guide to open-weight LLMs vs API models covers the trade-offs.

Check the data rules before you send customer data

DeepSeek's privacy policy, last updated 10 February 2026, says it collects, processes and stores personal data in the People's Republic of China. It also says data that a developer's own app collects from its users falls outside that policy and is the developer's responsibility. Read DeepSeek's Open Platform terms too, then decide what may go into prompts. Common choices are keeping names, emails and order numbers out of prompts, sending only public or internal data to the API, or self-hosting the MIT weights in your own region for regulated data.

Where DeepSeek V4.1 Flash fits in a business tool

The jobs we would test it on first, on your own data and against a second model:

It fits less well when prompts must carry personal data that cannot leave your region, or when a feature cannot tolerate the model changing under a fixed name. If you want a support bot or research agent on DeepSeek, or one that can switch providers through configuration, tell us what you are building.

DeepSeek V4.1 Flash FAQ

Do I need to change my code for DeepSeek V4.1 Flash 1017?

No. Requests to deepseek-flash have been served by V4.1 Flash 1017 since 17 October 2026, and DeepSeek says the calling method and prices did not change. The retired V4 Flash names are routed to it as well. Because the model now writes shorter answers, re-run your test prompts and check anything that parses its output.

How much does the DeepSeek V4.1 Flash API cost?

As of 18 October 2026, deepseek-flash costs $0.30 per 1M input tokens on a cache miss, $0.006 per 1M on a cache hit and $1.20 per 1M output tokens at peak times. Off-peak prices are half: $0.15, $0.003 and $0.60. Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays, excluding Chinese public holidays.

What is the difference between deepseek-flash and deepseek-v4-pro?

deepseek-flash runs V4.1 Flash 1017, accepts images and allows 2,500 concurrent requests. deepseek-v4-pro runs V4 Pro 0813, does not accept images, allows 500 concurrent requests and costs about four times as much for input and three times as much for output. DeepSeek's September launch note says V4.1 Flash scored ahead of V4 Pro, so start with Flash.

How much does the DeepSeek search API cost?

Search and Fetch each cost $0.75 per 1,000 successful requests as of 18 October 2026, and only HTTP 200 responses with a result are billed. Calls made by the built-in search tool in DeepSeek Harness, Claude Code or Codex are free until 16:00 UTC on 31 October 2026. Each endpoint allows 5 requests per second per account, and Fetch also limits requests per domain.

Can I run DeepSeek V4.1 Flash 1017 locally?

You can download it from Hugging Face or ModelScope under the MIT license, but it is a very large mixture-of-experts model. DeepSeek's launch note describes 552B parameters and the Hugging Face listing shows 763B, so even 8-bit weights need hundreds of gigabytes of GPU memory. The model card lists quantized builds for llama.cpp, Ollama and LM Studio, but for most teams the API is simpler.

Is DeepSeek V4.1 Flash better than Claude or GPT?

On DeepSeek's own tests, V4.1 Flash 1017 beats Claude Opus 5 and GPT-5.6 Sol on DeepSWE, Automation-Bench and Agents' Last Exam, while Opus 5 leads on HLE and Terminal-Bench 4.0. The table leaves out GPT-6 and the Claude 5.5 models, and independent results were not out at release. Test it on fifty of your own real tasks before you switch.

Sources

Want an AI tool like this built for your business?

We build custom AI tools on Gemini, GPT and Claude, connected to the software you already use. Fixed quote, live in weeks, and you own the code.

Written by Abdul Ghani

Apex Logic is a software studio in Multan, Pakistan that builds custom web apps, AI tools and automation for clients worldwide.

More from Abdul Ghani

Editor's note: Facts checked against official announcements and documentation on 18 October 2026. These topics are moving fast; prices, availability and features may change.

Comments

Loading comments...