Connecting DeepSeek to n8n: budget-friendly AI for your workflows (chat and reasoner)
Published 31 July 2026 · 5 min read
In just a few months DeepSeek has become the disruptor of the LLM market: open models on par with the best proprietary ones, an API that is among the cheapest around, and a reasoning model (R1) that proved advanced thinking capabilities could be obtained at a much lower training cost. For your n8n workflows this is a concrete opportunity: processing large volumes — classification, extraction, summarization — for a fraction of what GPT or Claude would cost. This guide shows how to connect DeepSeek to n8n through the native node or the OpenAI-compatible API, when to pick deepseek-chat versus deepseek-reasoner, and which precautions to take.
Why DeepSeek in an n8n workflow
Two reasons dominate: cost and reasoning.
- Cost. DeepSeek charges per-token rates that are among the lowest on the market for a model of this caliber. That's no accident: the DeepSeek-V3 Technical Report published by the DeepSeek-AI team in late 2024 describes a 671-billion-parameter Mixture-of-Experts architecture where only 37 billion parameters are activated per token — that structural frugality (full training in 2.788 million H800 GPU hours) is what enables aggressive inference pricing.
- Reasoning. The study "DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning" (DeepSeek-AI, 2025, published in Nature — see on Google Scholar) shows that advanced reasoning behaviors — self-verification, reflection, strategy adaptation — can emerge through pure reinforcement learning, without human-annotated demonstrations. The resulting
deepseek-reasonermodel rivals proprietary reasoning models on math, code and logic.
For a freelancer or a small business automating with n8n, the translation is simple: high-volume AI tasks that become economically viable.
Creating the API key
- Create an account at platform.deepseek.com.
- Top up the account (billing is prepaid, by card).
- In the API Keys section, generate a key and copy it immediately — it won't be shown again.
Treat that key like any secret: store it only in n8n's credential manager, never in a Code node, and apply the reflexes from our guide to securing API credentials.
Method 1: the native DeepSeek Chat Model node
n8n ships a DeepSeek Chat Model node. Like the other chat models, it's a LangChain sub-node: it doesn't run on its own, it plugs into a parent node — an AI Agent, an LLM Chain, a Text Classifier or an Information Extractor. If those building blocks are new to you, our guide to getting started with n8n's AI nodes lays the groundwork.
- Add the parent node (an AI Agent, say), then attach a DeepSeek Chat Model as its language model.
- Create the credential with your DeepSeek API key.
- Pick the model:
deepseek-chat(general-purpose, based on V3) ordeepseek-reasoner(reasoning, based on R1).
This is the method to prefer for any new workflow: a dedicated credential, cleanly exposed parameters, no URL tinkering.
Method 2: the OpenAI-compatible API (base URL or HTTP Request)
DeepSeek's API is compatible with the OpenAI format. Two practical consequences:
- Repurposed OpenAI credential: create an OpenAI credential in n8n with your DeepSeek key and replace the base URL with
https://api.deepseek.com. Existing OpenAI nodes then work with DeepSeek by typing the model name manually — handy for trying DeepSeek on a workflow already wired for GPT or Claude without rewiring anything. - HTTP Request node: for full control (unusual parameters, reading the raw reasoning), call the endpoint directly:
POST https://api.deepseek.com/chat/completions
Authorization: Bearer {{ $credentials.apiKey }}
{
"model": "deepseek-chat",
"messages": [
{ "role": "system", "content": "Classify emails as: invoice, support, spam, other. Answer with a single word." },
{ "role": "user", "content": "{{ $json.emailBody }}" }
],
"temperature": 0
}
A third route: go through OpenRouter, which exposes the DeepSeek models (deepseek/deepseek-chat, deepseek/deepseek-r1) behind a single key. You give up a little pricing margin, but you gain the choice of host — including US or European hosts of the same models, since the weights are open — and an easy switch to another provider.
The quirks of deepseek-reasoner
The reasoning model doesn't behave like a regular chat model, and you should know that before wiring it in:
- Reasoning content. Before its final answer, the model produces a chain of thought, returned by the API in a separate field (
reasoning_content). Through the HTTP Request node you can log it for auditing or debugging; through the LangChain nodes, only the final answer feeds the rest of the workflow. - Different structured outputs. Structured-output mechanisms and tool calling don't behave the same as with
deepseek-chat— some parameters are ignored or unsupported depending on the API version. If your workflow requires strict JSON validated by a Structured Output Parser, usedeepseek-chat, or follow the reasoner with a second extraction step using a regular model. - Latency and verbosity. Reasoning is paid for in tokens and seconds. Save the reasoner for steps where it genuinely adds something: planning, multi-criteria analysis, logic problems.
Where DeepSeek shines in n8n
DeepSeek's natural positioning is volume on a small budget:
- Bulk classification: sorting hundreds of emails, tickets or customer reviews per day with
deepseek-chatcosts next to nothing. - Data extraction: invoice fields, contact details in free-form submissions, entities in documents.
- Batch summaries and rewrites: monitoring feeds, ticket digests, cleaning up scraped content.
- The budget tier of a cascade: DeepSeek on the front line, a frontier model as backup for ambiguous cases — the pattern detailed in our multi-provider fallback guide works in that direction too.
Even at low rates, measure: our method for tracking AI call costs per workflow will spare you surprises when volumes grow.
Limits and caution
Stay clear-eyed on two points.
Data sovereignty. The official API is operated by a Chinese company, with data processed on its servers. For personal or confidential data, that raises GDPR and compliance questions you'll need to assess — at minimum, minimize and anonymize what you send. If it's a blocker, two ways out: use a Western host of the models via OpenRouter, or run the distilled variants of DeepSeek-R1 locally with Ollama — our guide to n8n + Ollama without an API key covers that setup, where no data ever leaves your machine.
Availability. The DeepSeek API has gone through periods of saturation during popularity spikes. For a production flow, plan an application-level fallback (retries, failover to Mistral or another provider) rather than depending on a single endpoint.
Key takeaways
- Create your key on platform.deepseek.com and store it in n8n's credential manager.
- Use the DeepSeek Chat Model node for new workflows, the
https://api.deepseek.combase URL on an OpenAI credential to recycle existing ones, or OpenRouter to keep the choice of host. deepseek-chatfor volume (classification, extraction, summarization),deepseek-reasonerfor steps that need real thinking — accepting its constraints on structured outputs.- For sensitive data, prefer a Western host or a local run via Ollama.
FAQ
Frequently asked questions
What is the difference between deepseek-chat and deepseek-reasoner?
deepseek-chat is the general-purpose model (based on DeepSeek-V3): fast, cheap, well suited to classification, extraction and everyday writing. deepseek-reasoner (based on DeepSeek-R1) produces an internal chain of thought before answering: slower and more verbose, but noticeably better on logic, math and planning problems. In n8n, start with deepseek-chat and only move to the reasoner when quality falls short.
Does n8n's OpenAI node work with DeepSeek?
Yes, because DeepSeek's API is compatible with the OpenAI format. Create an OpenAI credential with your DeepSeek key and replace the base URL with https://api.deepseek.com, then type the model name (deepseek-chat or deepseek-reasoner). It's handy for reusing existing workflows, but the native DeepSeek Chat Model node is simpler for new builds.
Can I use DeepSeek without sending my data to China?
Yes, in two ways. Through OpenRouter or another aggregator you can pick a host of the model located in the US or Europe, since DeepSeek's weights are open. Or locally: the distilled variants of DeepSeek-R1 run on your own machine with Ollama, so no data ever leaves your infrastructure.
Does deepseek-reasoner support n8n's structured outputs?
Not in the same way deepseek-chat does. The reasoning model has specific constraints on parameters and output formats; structured-output and tool-calling mechanisms behave differently, or may be unavailable depending on the API version. For a workflow that requires strict JSON, prefer deepseek-chat with a Structured Output Parser, or follow the reasoner with a dedicated extraction step.
Bundle FlowKit Complet
€269