DeepSeek Harness setup with the DeepSeek API or Ollama
Updated Nov 30, 2026
DeepSeek Harness is a coding agent in developer preview. The web interface runs on your machine and sends model requests to the provider you select. You can start with DeepSeek’s API, choose Ollama, or connect a compatible gateway. The choice determines which model receives your code and how usage is billed.
Install and open the Web UI
- Install Node.js with npm. Open a terminal in a small project you can use for a first test and run
npx @deepseek-ai/dsh web. - Open the address printed in the terminal. A local launch uses
http://127.0.0.1:3080by default. Add your project folder in Choose workspace and select it so the session input becomes available. - Open Settings → Models, save your DeepSeek API key, and select
deepseek-flashordeepseek-v4-proin the model picker. Open a new session when switching models so the earlier session keeps its existing route.
For a first check, ask the agent to name the test command from the project files without editing them. Then verify a tool call on the chosen endpoint before giving it a larger task.
Run through Ollama
With Ollama and Node.js installed, run ollama launch dsh. Choose a model with tool support. The integration can install the Harness package when needed. To configure the integration without launching the UI, run ollama launch dsh --config.
For Ollama’s cloud Flash model, sign in with ollama signin if needed and launch ollama launch dsh --model deepseek-v4.1-flash:cloud. This combines Ollama’s documented --model option with the current tag in its registry. Ollama’s guide still shows deepseek-v4-flash:cloud, but the registry marks that older model as retired. For local inference, choose an installed model with tool support and enough memory for the context you need.
Which model and API provider to choose
On DeepSeek’s own API, the current deepseek-flash identifier resolves to V4.1 Flash (1017), and deepseek-v4-pro to V4 Pro (0813). Both support tool calls on the official API. Start with Flash for routine code changes and test Pro on a harder example from your own repository.
For another provider, go to Settings → Models → Add model provider, choose Custom model API, and enter the provider ID, base URL, protocol, key, and exact model ID from that provider. Select OpenAI Chat Completions for an endpoint that implements that protocol. A matching model name alone gives no assurance that streaming, tool calls, or context limits match the direct API.
DeepSeek’s direct API uses peak and off-peak tiers. Compare the tier that applies during your working hours and read the exact revision and billing notes on each offer card.
DeepSeek V4.1 Flash
| Provider | Model | Input, $ | Output, $ |
|---|---|---|---|
| kenari | DeepSeek V4.1 Flash | $0.04413 | $0.08147 |
| kilo | DeepSeek: DeepSeek V4.1 Flash | $0.051 | $0.48 |
| openrouter | DeepSeek: DeepSeek V4.1 Flash | $0.051 | $0.48 |
| aiml | DeepSeek V4.1 Flash | $0.0675 | $0.27 |
| requesty Relace | DeepSeek V4.1 Flash | $0.07 | $0.50 |
| huggingface | DeepSeek V4.1 Flash | $0.12 | $0.48 |
| deepinfra | DeepSeek V4.1 Flash | $0.14 | $0.42 |
| edenai APAC,EU,GLOBAL,US | DeepSeek V4.1 Flash | $0.14 | $0.42 |
| fastrouter | DeepSeek: DeepSeek V4.1 Flash | $0.14 | $0.42 |
| iteracompute | DeepSeek V4.1 Flash | $0.14 | $0.55 |
| standardcompute | DeepSeek V4.1 Flash | $0.14 | $0.42 |
| 302ai | DeepSeek V4.1 Flash | $0.15 | $0.60 |
| inferx | DeepSeek V4.1 Flash | $0.15 | $0.60 |
| neuralwatt | DeepSeek V4.1 Flash | $0.15 | $0.60 |
| orcarouter | DeepSeek V4.1 Flash | $0.15 | $0.60 |
Live data: this table is built from today's prices.
DeepSeek V4 Pro
| Provider | Model | Input, $ | Output, $ |
|---|---|---|---|
| trustedrouter | DeepSeek: DeepSeek V4 Pro 0423 | $0.16 | $0.63 |
| wafer.ai | DeepSeek V4 Pro | $0.28 | $3.96 |
| tokengo | DeepSeek V4 Pro | $0.43 | $0.87 |
| requesty Relace | DeepSeek V4 Pro | $0.50 | $2.00 |
| aiml | DeepSeek V4 Pro | $0.66 | $1.98 |
| edenai APAC,EU,GLOBAL,US | DeepSeek V4 Pro | $0.66 | $1.98 |
| orcarouter | DeepSeek V4 Pro | $0.66 | $1.98 |
| zenmux | DeepSeek V4 Pro | $0.66 | $1.98 |
| kenari | DeepSeek V4 Pro | $0.68 | $2.04 |
| above | DeepSeek V4 Pro | $0.73 | $2.18 |
| zenifra | DeepSeek V4 Pro | $0.77 | $1.52 |
| huggingface | DeepSeek V4 Pro | $0.89 | $1.51 |
| kilo | DeepSeek: DeepSeek V4 Pro 0423 | $0.89 | $1.51 |
| openrouter | DeepSeek: DeepSeek V4 Pro 0423 | $0.89 | $1.51 |
| standardcompute | DeepSeek V4 Pro | $1.04 | $2.09 |
Live data: this table is built from today's prices.
Monthly cost for a coding agent
The catalog’s coding-agent preset uses 500 million input tokens and 30 million output tokens per month, with a minimum context of 128,000 tokens and tool support. The real-time comparison is in US dollars and uses no cache discount. Budget from a complete task, including tool results and repeated context.
Catalog snapshot taken on 30 November 2026. The selected offers were checked on 29 November.
| Model | Provider and tier | Input / output per 1M tokens | USD per month |
|---|---|---|---|
| DeepSeek V4.1 Flash (1017) | DeepSeek direct, off-peak | $0.15 / $0.6 | $93.00 |
| DeepSeek V4.1 Flash (1017) | OpenRelay, listed under 1017 | $0.035 / $0.33 | $27.40 |
| DeepSeek V4.1 Flash | Ollama Cloud, peak | $0.3 / $1.2 | $186.00 |
| DeepSeek V4.1 Flash (1017) | Ollama Cloud, off-peak | — | — |
| DeepSeek V4 Pro (0813) | DeepSeek direct, off-peak | $0.66 / $1.98 | $389.40 |
| DeepSeek V4 Pro (0813) | Eden AI | $0.429 / $1.29 | $253.11 |
| DeepSeek V4 Pro (0423) | TrustedRouter (older 0423 revision) | $0.158 / $0.633 | $98.11 (coding-agent preset) |
For the monthly estimate, multiply the unrounded catalog input and output rates by 500 and 30 respectively, then add them. The table rounds rates for display. TrustedRouter’s monthly amount comes from the coding-agent preset. Cache discounts, tool fees and taxes are excluded.
The Ollama Cloud calculation shows token usage before applying subscription credits. The off-peak estimate is unavailable here because the catalog has no verified offer for that tier.
The catalog flags conflicting cache-read rates for both direct DeepSeek offers. The direct rows use the verified uncached input and output rates, which match DeepSeek’s off-peak tier.
The coding-agent preset returned Eden AI for V4 Pro 0813 and TrustedRouter for the older 0423 revision. It returned no offer for V4.1 Flash or V4.1 Flash 1017. The Flash amounts in the table are price estimates. DeepSeek’s documentation independently lists tool calls for its own API.
For a separate workload, the agent cost calculator estimates $16.34 per month for V4.1 Flash at Eden AI, based on 10 tasks per day, 30 calls per task, 270 million input tokens and 20.7 million output tokens over 30 days. This scenario assumes a 70% cache hit rate.
How cache and batch change the bill
DeepSeek’s direct API enables context caching automatically. For repetitive coding tasks, measure prompt_cache_hit_tokens and prompt_cache_miss_tokens in the API usage report. A high hit rate is an assumption until you measure it. Compare the same provider and rate tier before and after applying a cache estimate.
Batch or flex rates apply to the provider’s separate deferred service when it is offered. A coding session that waits for tool output needs a real-time quote. Confirm the batch terms for independent jobs that can wait, and use the catalog’s cache and batch calculator to compare them.
For the same 500 million input and 30 million output tokens, the catalog lists OpenRouter Batch at $29.50 before cache discounts. The catalog returned no batch or flex offer from DeepSeek itself for the two models in this comparison.
Agent cost calculator · Cache and batch calculator · All DeepSeek API prices
Official setup and API sources
Documentation checked on 29 November 2026.
- DeepSeek Harness and desktop downloads
- DeepSeek Web UI setup
- DeepSeek project README and npm launch
- DeepSeek model configuration
- Current DeepSeek API models and conditions
- DeepSeek context caching
- Ollama Harness integration
- Ollama Cloud setup
- Official Ollama model pricing and usage credits
- Retired Ollama Flash model
- Current Ollama V4.1 Flash tags