How Much To Run AI
Open weights

DeepSeek V4.1 Flash: API Cost and When to Self-Host

DeepSeek-V4.1-Flash reads text and images and responds in text, with a 1M-token context window and open weights. Start with hosted deepseek-flash or a compatible client, then compare the whole task’s token and tool bill with the memory, runtime and hardware needed to self-host an exact checkpoint.

Content reviewed:

Choose a first task

  • Coding with tools: inspect files, propose a change and run tests through client-supplied actions.
  • Image and long-document work: ask for visible evidence or citations to the supplied material.
  • Creative writing: compare dialogue, revisions, voice and continuity over several turns.

Choose hosted Flash or checkpoint-specific self-hosting

Start with the operating model, then compare the whole task: every model call, tool result and retry for hosted inference, or the complete runtime and hardware for a local checkpoint.

Hosted deepseek-flash

Use the API directly or connect it to an installed client. The client supplies the workspace and actions; hosted inference still processes the model requests.

Budget input and output tokens across follow-up calls and tool results, with cache, peak and off-peak rates plus any applicable Search/Fetch charges.

Self-host an exact checkpoint

For infrastructure teams that need deployment control, match the checkpoint to a compatible runtime and include its full memory and serving stack.

The calculator estimates the original September 10 checkpoint with all weights in GPU memory. For 1017, native mixed precision or SSD/CPU offload, use the complete configuration in the deployment reports below.

API pricing and a practical cost example

The table uses DeepSeek’s uncached input and output rates, in US dollars per million tokens. The example combines 1 million uncached input tokens with 100,000 output tokens. Treat those as total usage for a workload, not a required request size.

DeepSeek bills peak and off-peak periods differently, and cache-hit input has a separate lower rate. Peak hours are Monday–Friday, 01:00–04:00 and 06:00–10:00 UTC, excluding Chinese public holidays; other hours use off-peak rates. For an agent, count the follow-up calls and tool results as well as the initial request when estimating the whole task.

Cache-hit input costs $0.003 per million tokens off-peak or $0.006 at peak, checked October 26. For a workload with 1M cache-hit input tokens and 100K output tokens, the calculated token charge is $0.063 off-peak or $0.126 at peak. Cache misses use the standard input rates in the comparison above; measure the returned cached and uncached usage separately.

USD per 1 million tokens
Billing periodUncached inputOutputExample total
Off-peak$0.15$0.60$0.21
Peak$0.30$1.20$0.42

Example: 1M uncached input tokens + 100K output tokens.

Official pricing · Source checked: · Off-peak

Official pricing · Source checked: · Peak

How to use it: an application or your own API integration

If you want an agent that works on files, start with a client such as DeepSeek Harness or WorkBuddy. These tools supply the workspace, conversation interface and actions around the model. Installing a client on your computer still uses a hosted model when you configure it with a DeepSeek API key.

For your own application, create a DeepSeek platform account, configure an API key on your server and select deepseek-flash. Since October 17, this API name serves V4.1-Flash-1017; the official web and app have moved to that version too. The API calling method and token prices are unchanged. The separate deepseek-v4-pro endpoint serves V4-Pro-0813. Keep the key on the server when building a public website.

Begin with one complete task before building a larger workflow: send the input, inspect the response, record token usage and decide what your application should do next. For coding, use a small, reproducible issue and ask the agent to inspect the relevant files, propose a change and run the tests. The application supplies file access and command execution; the model chooses and interprets tool calls. Decide which file changes and commands need your approval.

For an image or document question, provide a screenshot or document image with a specific question, such as which setting is selected or how two diagrams differ, and ask for the visible evidence behind the answer. For long-document work, start with a bounded comparison and request citations to the supplied text. The large context window provides capacity, but a clear selection of relevant material still helps.

A person using a laptop connected to a hosted AI service for documents, images and coding.

Tools and ecosystem: what they add to the model

A model API returns responses and tool-call requests. A finished agent application also needs to keep the conversation, expose files and tools, execute approved actions and show what happened. Using an existing client saves you from building that surrounding workflow before you can try the model.

For the October 17 model update, DeepSeek recommends DeepSeek Harness 0.2.1-rc.1 or later and reports targeted optimization for Harness, CodeBuddy and WorkBuddy. Its game and 3D-project demonstrations are examples produced in Harness. Try a small project with explicit acceptance checks before handing over a larger task.

Choose a client around the work you need to do. For a repository task, check how it chooses the working directory, previews edits and shows command output. For a document workflow, check how it passes attachments and preserves the source material. Test one representative task before moving a large project into it.

A hosted model connected to a coding workspace, documents and images, and a custom application.
Applications add the workspace, tools and interface around a hosted model.
DeepSeek Harness

A workspace agent with file editing, command execution and task planning. Configure a model connection in Settings → Models, then choose the project directory. It is a useful starting point for trying an agent workflow with an existing interface and permission controls.

Open source ↗
WorkBuddy / CodeBuddy

DeepSeek publishes a connection guide for using Flash in these clients. Follow the model configuration in that guide to connect your API account. This route fits users who want the client’s project interface and tool workflow around the model.

Open source ↗

Search and Fetch: live web tools and their charges

Search returns structured page results; Fetch retrieves a page as Markdown. The endpoints are POST /v1/tools/search and POST /v1/tools/fetch, using your DeepSeek API key on the server. Follow the guide’s request examples.

Each interface costs $0.75 per 1,000 successful requests in the English guide; the Chinese announcement separately quotes CNY 5 per 1,000 successful requests. Billable HTTP 200 responses must contain search results or fetched content. Failures, empty results and timeouts are free. Search result count does not change the fee.

For 1,000 billable searches plus 2,000 billable fetches, the calculated charge is $2.25 at the USD quote, or CNY 15 at the CNY quote, plus model tokens.

When you use the DeepSeek API through DeepSeek Harness, Claude Code or Codex, its server-side Search/Fetch tool calls currently have no separate tool charge. Per-request billing for those calls begins at 2026-10-31 16:00 UTC (November 1, 2026 at 00:00 Beijing time). Model input and output tokens are still billed at the normal rates; this temporary treatment applies only to those server-side tool calls.

DeepSeek V4.1 Flash vs V4 Pro: which should you try?

DeepSeek’s September 10 announcement highlighted V4.1 Flash’s benchmark and efficiency gains and planned to move Pro API traffic to Flash. Its amended update says Pro will remain available in response to user demand. The current API documentation lists them as separate choices.

Creative-writing preferences deserve a separate comparison. In an r/DeepSeek story-writing discussion, Smart_Boysenberry_64 described repetitive phrasing after several turns with Flash. Commenter Silent_Truck_4622 preferred how Pro responded to corrective instructions in the web app. These are specific users’ app experiences; they help identify what to test for fiction and character dialogue.

For your own comparison, give both models the same scene, character notes and revision request. Read several turns rather than just the opening answer. Compare whether each keeps the character’s voice, responds to corrections and avoids repeated wording. For coding, use a separate task and assess the resulting change and tests.

QuestionV4.1 FlashV4 Pro
Which API name selects it?deepseek-flashdeepseek-v4-pro
What does that name currently serve?DeepSeek-V4.1-Flash-1017DeepSeek-V4-Pro-0813
Can it accept images through this API?Yes, alongside textText input only
Why include it in a trial?Image questions, coding workflows and lower token pricesA separate option to compare for prose, dialogue and revision style

Can you run it on your own hardware?

The original V4.1 Flash checkpoint has downloadable MIT-licensed weights and is a large distributed-inference project. Its 552B-parameter backbone and 196B Engram component need far more storage than the 8B/16B active-parameter figures suggest. For a typical personal or small-business setup, start with a hosted service.

For infrastructure teams, SGLang has a model-specific cookbook and vLLM has added V4.1 support. The reference inference guide covers checkpoint conversion and distributed execution. The release announcement links the new DeepSeek-V4.1-Flash-1017 checkpoint for download; match it with a runtime that supports that checkpoint before reusing an older deployment recipe. Community projects now publish checkpoint-specific 1017 runs on a single RTX 5090, a large-RAM CPU/GPU server and four DGX Spark systems. Their custom runtimes, weight formats and test workloads differ, so compare the complete deployment rather than treating their token rates as a hardware ranking.

1017 community deployments: memory, speed and correctness

Acrogenesis reports a custom GGUF expert-cache setup on an RTX 5090 32GB, Ryzen 9950X3D, 128GB RAM and Samsung 990 PRO SSD. With an 8,192-token context allocation, its short generation test uses 30–31 input tokens, a 128-token output cap and three-request medians. Fresh requests follow functional checks, so these are not cold-disk timings. Download and conversion are excluded.

The table shows that faster quantization can change usable results. The eight-check panel requires exact answers, with extra explanation counted as failure; it is not a general accuracy score. This custom runtime caps context at 16K and does not implement the advertised full 1M attention mask. Its SSD-backed Engram and RAM expert cache remain part of the hardware budget.

For a different memory tradeoff, 05yuki reports patched SGLang/KTransformers on two EPYC 7452 CPUs, 512GB DDR4 and two RTX 5070 Ti 16GB cards, using about 420GiB RAM. The author reports 45 tokens/s decoding Japanese prose. A one-million-token random-input prefill reaches 504 tokens/s and takes about 33 minutes; that measures input processing, not long-document answer quality. This route requires the project’s pinned patches and hardware conditions.

Tonyd2wild’s October 17 run uses four DGX Spark systems with customized vLLM, TP4, native FP8/FP4 weights, a 300K configuration and thinking disabled. Its serving result is 48.5 aggregate tokens/s at concurrency one, versus 53.8 per-stream after the first token; concurrency six reaches 165.7 aggregate tokens/s. These metrics count different parts of the workload. The run’s 69-scenario tool panel has 67 passes and two partials, matching the older model’s outcome rather than establishing a general quality gain.

5090 weight configurationFresh generation tok/sExact-answer checks
MXFP4 experts / Q8 dense + Engram7.088/8
IQ2_XXS experts / Q8 dense + Engram21.375/8
Public Q2_K mix10.927/8

TensorFold DeepSeek support is still under development

TensorFold’s released binaries do not currently serve DeepSeek checkpoints; its whole-model implementation remains open in pull request 827. For a local trial, use one of the checkpoint-specific working recipes above rather than the reported TP4 development build.

DeepSeek’s API documentation lists a 1M model context. Each local runtime must separately implement and validate its attention, cache and chat encoding. Record the tested context length and complete memory footprint rather than transferring the API’s 1M limit to an experimental runtime.

Match the runtime and chat encoding to the checkpoint

As checked October 19, the llama.cpp V4.1 support pull request remains open. Use the exact fork and revision required by a community recipe; a generic Hugging Face library button does not establish support in a mainline release. Validate thinking, tool arguments and a complete tool-response round trip before connecting an agent.

A discussion on the 1017 model repository proposes chat-template changes for thinking and reasoning effort, JSON-string tool arguments and missing or None message content. Treat that proposal as a compatibility issue to check in your chosen runtime, rather than an already released fix. Community recipes make different encoding and kernel changes, so replacing a checkpoint alone is not a complete upgrade procedure.

DeepInfer: the official cluster inference core

DeepSeek’s Apache-2.0 DeepInfer core runs V4.1-Flash offline on NVIDIA SM100 GPUs and Huawei Ascend 950 NPUs. A complete service needs additional cache, disaggregation and load-balancing components. Use the dedicated guide below to plan installation, interconnect and the full cluster budget before comparing self-hosting with the API.

Before you use it

  • Flash accepts image input and generates text; use an image-generation model when you need a new image as the result.
  • An agent can only take the actions its client exposes. Check file access, command permissions and the change preview in the application you choose.
  • The older API names deepseek-v4-flash and deepseek-v4-flash-vision-exp now route to V4.1-Flash. When comparing results across versions, record the served model as well as the name in your configuration.

How to get started

Choose one task and an existing client for a first trial, or use the API quick start if you are building an application. Use the pricing example to set an initial budget, then measure token use across the complete workflow. For fiction and dialogue, include Pro in that trial and compare the writing over several turns.

Sources

Sources (22)

Calculators

Using this calculator for this model

Estimate a text model’s ongoing cost by choosing where it runs and how many hours it is active each month. Usage levels are 120, 360 or 720 hours per month; choose the closest to your planned schedule.

For open weights, select the precision and deployment that match the artifact and runtime you plan to use. The hardware result is a capacity estimate; context length, runtime and model-specific components can change actual memory use.

How to fill in the calculator
Precision
Select the weight format you will actually run. GGUF Q4 is a broad capacity estimate for a 4-bit GGUF variant; exact file size depends on the quantization and included components.
Deployment
Local estimates use hardware ownership, electricity and operations; cloud estimates use hourly rental pricing. Compare the path you are considering.
Usage level
Choose 120, 360 or 720 active hours per month, based on your planned schedule. For bursty work, use the nearest level as a comparison.
Electricity rate
Use your billed price per kWh. This changes local electricity cost only.
Wall power
Leave blank to use the GPU TDP reference. For multiple GPUs or a full system, enter measured whole-machine watts.
Salary and FTE
Enter a monthly salary range and the share of one full-time role spent operating the service; use zero if you allocate no labor.
PUE and system cost
Keep defaults if unknown. PUE scales local electricity; the system cost multiplier scales upfront hardware cost.

Use the calculator for a deployment budget; enter your expected usage and measured wall power.