Home / Guides / Apps and workflows

Connect DeepSeek and GLM to Dify

Updated 2026-10-18 · Use the OpenAI-API-compatible model provider to bring DeepSeek, GLM and other models into Dify apps and workflows.

Connection details

Base URL (OpenAI compatible)
https://api.aifans.fan/v1
API key
Create one in the console; it starts with sk- (no account yet? sign up)
Recommended models
deepseek-v4.1-flash, deepseek-v4-pro (all models and prices)

Dify is a popular open-source platform for building LLM apps: knowledge-base Q&A, agents and workflows. Its “OpenAI-API-compatible” model provider connects every chat model on AIFans API.

Setup

  1. Avatar (top right) → Settings → Model Provider, and install OpenAI-API-compatible from the plugin marketplace (recent Dify versions ship model providers as plugins).
  2. Under that provider click “Add Model”: model type LLM, model name deepseek-v4.1-flash.
  3. API key your key; API endpoint URL https://api.aifans.fan/v1.
  4. Context size can be 128000; set max tokens as you need (e.g. 8192); Function calling “supported”; Vision “supported” for models that accept images.
  5. Save, then choose the model in your app's model settings. For harder reasoning, add deepseek-v4-pro the same way.

Notes

  • A self-hosted Dify must be able to reach our public HTTPS address.
  • We do not offer embedding or rerank models; pick those from another provider in Dify.
  • Workflows that call the model in bulk count against each key's per-minute request limit (100 by default); give a busy workflow its own key.

Related guides