Dify: what this platform is and how to connect your own models
Dify builds chatbots, workflows and agents in a visual editor. We cover app types, the knowledge base, publishing and connecting models through an OpenAI-compatible API.
6 min · · автоматизация · development
If you searched for "what is Dify", the short answer is: an open platform for building AI applications. In a visual editor you connect blocks (a model request, document search, conditions, an external API call), and publish the finished application as a web page, a widget or an API. Below we cover what Dify consists of, how to use it, how to connect models to it and what running it costs, with a calculation on Zukko's numbers.
Dify: what it is and what it consists of
Dify is described in its documentation as an open-source platform for building AI applications: agents, agentic workflows and chatbots that work with your data. The source code lives in the repository github.com/langgenius/dify. The platform bundles:
- A visual editor (Studio): an application is assembled from nodes on a canvas.
- Model management: connecting providers, among which you can use any OpenAI-compatible API.
- A knowledge base (RAG): uploading documents, splitting them into chunks, indexing and search.
- Agents: a model that decides on its own which tools to call.
- Publishing: a web app, an embeddable widget, an API and an MCP server.
- Observability: a dashboard with metrics, request logs, integrations with tracing tools (the documentation names Langfuse, LangSmith, Opik and others).
You can work in two ways: in Dify's cloud (the documentation mentions a free Sandbox plan; see Dify's site for the terms) or on your own server from the Community edition. Installing on your own server is described in Dify's documentation: the simplest path, per the project README, is Docker Compose.
App types
When creating an application Dify asks you to choose a type. For complex scenarios the documentation singles out two main ones:
| Type | What it is | When to use |
|---|---|---|
| Workflow | A one-off task: data in, result out; convenient for batch processing | Classification, field extraction, template-based generation |
| Chatflow | A workflow triggered on every dialogue message; can keep conversation variables and memory | Chatbots, support assistants |
Besides them there are three simple types on the same engine: Chatbot (a dialogue driven by a prompt), Agent (a model with tools) and Text Generator (one request, one text). Any application can be exported to a YAML file (the DSL format) and imported into another Dify instance.
Typical workflow nodes: LLM (a model request), Knowledge Retrieval (knowledge base search), Question Classifier (routing by topic), If-Else, Iteration and Loop, Code (Python or JavaScript), Template (Jinja2), HTTP Request, Parameter Extractor, Document Extractor, Agent, Human Input. A workflow starts either with a User Input node (on a user or API request) or with a trigger (on a schedule, a webhook or an external event).
Dify: how to use it, on a support bot example
A simple scenario in five steps:
- Create a knowledge base and upload documents (local files, website pages, Notion). Configure chunking and the indexing method. Indexing needs an embedding model: Zukko has no embedding models (chat models only), so connect another provider for that.
- Create a Chatflow and add a Knowledge Retrieval node, which pulls the relevant chunks for a question.
- Add an LLM node: pass it the question and the retrieved chunks, and in the system prompt ask it to answer only from this data and admit when there is no answer.
- Test in the debug window: Dify shows the variables and output of each node, and the run history is saved.
- Publish: as a web app with its own address, a widget for a website, or through the API.
Such a process can be assembled without code, and the limits depend on the task: if you need complex business logic or unusual integrations, you will have to write Code nodes or call the Dify API from your own application.
How to connect your own models to Dify
Dify can work with providers from its catalog, but for any service with an OpenAI-compatible API it uses the OpenAI-API-compatible plugin. This is exactly how the Zukko gateway is connected: one fetch_... key gives Claude, GPT, Gemini, DeepSeek, Qwen and GLM models. In brief:
- Create a key on the API keys page.
- In Dify open Integrations → Model Provider, install the OpenAI-API-compatible plugin and click Add Model.
- Set the type LLM, a model name from
GET https://api.zukko.pro/v1/models, the key, and API Base URLhttps://api.zukko.pro/v1. - Set the real context size and save; Dify validates the data.
In Dify a model is chosen for each node separately, which helps save money. A full walkthrough of the form fields, errors and Claude's parameter restrictions is in the article connecting Zukko to Dify. Dify calls the model through /v1/chat/completions, that is, in the OpenAI format.
What a bot costs on different models
Suppose a support bot answers 10,000 messages a month. Each message uses on average 2,500 input tokens (system prompt, retrieved chunks, history) and 400 output. That totals 25M input and 4M output. Prices per 1M tokens as of October 18, 2026 (input / output):
| Model | Price | Calculation | Total |
|---|---|---|---|
claude-sonnet-5-5 | 0.4 / 2 | 0.4 × 25 + 2 × 4 | $18.00 |
gpt-6.1-sol | 0.27 / 1.32 | 0.27 × 25 + 1.32 × 4 | $12.03 |
glm-5.3-flash | 0.04 / 0.04 | 0.04 × 25 + 0.04 × 4 | $1.16 |
deepseek-v4.1-flash | 0.013 / 0.038 | 0.013 × 25 + 0.038 × 4 | $0.477 |
For comparison, claude-sonnet-5-5 at official prices (2 / 10) gives 2 × 25 + 10 × 4 = $90.00. Dify calls the model in the OpenAI format, so for Claude the cache gives no discount: all input is billed at the input price.
The calculation is illustrative; you will see real volumes in the dashboard's "Usage" section. If part of the questions are simple, you can split them across nodes: say 70% of messages go to deepseek-v4.1-flash and the 30% that are complex go to claude-sonnet-5-5. Then 7,000 messages on DeepSeek cost 17.5 × 0.013 + 2.8 × 0.038 = $0.2275 + $0.1064 = $0.334, and 3,000 on Sonnet cost 7.5 × 0.4 + 1.2 × 2 = $3.00 + $2.40 = $5.40; about $5.73 in total. Whether a cheap model is enough for the simple questions, test on 20 to 30 real examples: strength indexes (39 for DeepSeek V4.1 Flash and 48 for Claude Sonnet 5.5, per the Intelligence Index from Artificial Analysis) are no substitute for such a check.
To keep spending under control, create a separate key for Dify with a daily and monthly limit (see key limits). You can top up from $1. With SBP the payment page adds 8.5% on top and the balance receives exactly the dollar amount you requested; MasterCard cards carry a fee of about 13% with a $2 to $594 range; cryptocurrency is accepted too.
When Dify fits and when it does not
It fits if you need to quickly assemble and show a working prototype, if people other than programmers will work on the application, and if you want a knowledge base, publishing and logs out of the box.
It does not fit if the whole process comes to about a hundred lines of code and you do not want to maintain a separate platform, or if you need custom control over every model request. A plain SDK is simpler for that: how to connect a neural network to an application. Tools with similar tasks are Flowise and n8n.
FAQ
Is Dify a neural network?
No. Dify has no model of its own: it is a platform that calls models through providers, including through an OpenAI-compatible API.
Is Dify free?
The source code is open and you can deploy the Community edition yourself, but you pay for the server, storage and model calls. Dify's cloud has its own plans; see Dify's site for their terms.
Can I connect different models to different nodes?
Yes. Connect several models in one provider and pick the one you need in each LLM node.
Where can I see model spending?
In the Zukko dashboard's "Usage" section you see spending per key. Dify itself has a dashboard with application metrics.
To try Dify with Zukko models, create a key in the dashboard and add the provider following the steps above.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- Translating subtitles with a neural network: SRT without broken timecodesThe main risk when translating SRT with a neural network is a broken file structure. A scheme where timecodes never reach the model, and a Python script with validation.
- Editing texts with a neural network: proofreading, style and cuttingDifferent kinds of editing need different prompts. Wording for proofreading, style and cutting, how to get edits with explanations and how not to lose the author's voice.
- A neural network for writing scripts: Bash, PowerShell and PythonA model writes scripts for routine fast, but running them blindly is risky. How to state the task, demand a safe dry-run mode and check the result before launch.
- Dify in Docker: installation, first-run setup and connecting modelsInstall Dify with Docker Compose, create the admin account and connect Claude, GPT and DeepSeek models on one key. Plus what to do when containers will not start.