Connect Dify to CaMeL Hub: GPT, Claude, Gemini & DeepSeek in One Workspace
Dify is an open-source LLM application platform for building chatbots, agents, and RAG-based workflows through a visual builder, and it can connect to multiple model providers inside one workspace. Point Dify's OpenAI-API-compatible provider at CaMeL Hub and every app in your workspace can call GPT, Claude, Gemini, and DeepSeek — both chat models and embeddings — through a single API key, without setting up a separate account for each provider.
-
Create a CaMeL Hub API key
Sign in to the CaMeL Hub console and open the Tokens page, then create a new API key. Copy it — you'll paste it into Dify in a later step. -
Open Dify's model provider settings
In your Dify workspace, go to Settings (the gear icon, or your avatar menu on Dify Cloud) → Model Provider. Find the 'OpenAI-API-compatible' provider card — this is the generic connector Dify uses for any OpenAI-format endpoint, which is exactly what CaMeL Hub exposes — and click Add Model. -
Add a chat model
In the add-model form, set Model Type to LLM, then fill in the fields below. The field usually labeled 'API endpoint URL' or 'Base URL' expects the full path including the version segment — the same way you'd point an OpenAI SDK — so use https://api.camel-hub.com/v1, not the bare host.Model Type: LLM Model Name: claude-sonnet-5 API Key: <your CaMeL Hub key> API endpoint URL: https://api.camel-hub.com/v1 -
Type the exact model name
Dify does not auto-discover models for OpenAI-API-compatible providers — the Model Name field is free text, and it must exactly match a model slug from CaMeL Hub. Check the model list in the console (or this site's pricing pages), then copy the slug verbatim: claude-sonnet-5, gpt-5.5, gemini-3.1-pro, deepseek-v4-flash, glm-5.2, and so on. -
Save and repeat for more models
Save the entry, then repeat the previous step for every additional model you want available in Dify — add gpt-5.5 and gemini-3.1-pro as separate entries so you can switch between them per app, or route different steps of a workflow to different models. -
Add an embedding model for Knowledge Base / RAG
If you use Dify's Knowledge Base feature, add one more entry with Model Type set to Text Embedding, Model Name text-embedding-3-small, and the same API key and endpoint URL. Dify keeps LLM and embedding entries separate even under the same provider. -
Select the model in your app
Open (or create) a Chatbot, Agent, or Workflow app, and in the model selector choose the CaMeL Hub entry you added. Send a test message to confirm the connection works end to end. -
Track usage in the console
Requests made from Dify are billed and logged like any other CaMeL Hub call — check the console's usage/log page to monitor spend per model, and top up or manage your plan there.
Frequently asked questions
Dify shows the provider but the model list is empty or won't load — is something broken?
No — that's expected for any 'OpenAI-API-compatible' provider, not just CaMeL Hub. Dify has no way to query a generic endpoint for its model catalog, so the Model Name field is always free text. Type the exact model slug instead of looking for a dropdown.
Dify says the API key is invalid, but I copied it correctly.
Check that the API endpoint URL has no trailing slash and includes /v1, that the key wasn't regenerated or revoked in the console after you copied it, and that you picked the matching Model Type (LLM vs Text Embedding) for whatever you're testing — a key that works fine for chat models will fail if tested against the wrong model-type entry.
Which models should I use for a Dify RAG workflow?
Use text-embedding-3-small as the Knowledge Base's embedding model, then pick chat models per step: fast, low-cost models like deepseek-v4-flash or gpt-5.4-mini for retrieval-heavy or high-volume steps, and claude-sonnet-5 or gpt-5.5 for the final answer-generation step where reasoning quality matters most.
Can I mix a CaMeL Hub model with another provider in the same Dify app?
Yes. Dify lets each app — and each node in a Workflow — pick its own model independently, so you can combine a CaMeL Hub model with any other configured provider in the same workspace or even the same app.