Content updated: 2026-06-09Dify is suitable for workflows, agents, knowledge base, and internal AI application platforms. When integrating with Crazyrouter, it is recommended to first follow Dify’s OpenAI-compatible model vendor path, get the chat model working first, then gradually add Embedding or other functions.
Overview
With Dify’s model vendor setup, you can use Crazyrouter as an OpenAI-compatible upstream connection:- Recommended protocol:
OpenAI-compatible API - Recommended entry:
Settings / Settings→Model Provider / Model Provider - Base URL:
https://api.crazyrouter.com/v1 - Authentication method:
sk-...token - Recommended initial model for verification:
gpt-5.5
The official Dify documentation treats custom
API Base URL as an optional item for proxy or compatible upstream scenarios; when connecting Crazyrouter, treat Crazyrouter as the OpenAI-compatible upstream and fill in https://api.crazyrouter.com/v1 accordingly. Also, configuring the model vendor usually requires Workspace Admin or Owner rights; if you don’t see the entry, check your current account role.Who Is This For
- People who want to build workflow, agent, knowledge base applications
- Teams who want to unify chat and embedding models into Crazyrouter
- Those aiming to provide a visual AI orchestration platform for business units
- People who wish to manage test and production models in separate environments
Usage Protocol
Recommended protocol:OpenAI-compatible API
When connecting Crazyrouter in Dify, the typical OpenAI-compatible base address is:
https://api.crazyrouter.comhttps://api.crazyrouter.com/v1/chat/completions
Prerequisites
Recommended first whitelist:
gpt-5.5claude-opus-4-8text-embedding-3-largetext-embedding-3-small
5-Minute Quick Start
1
Create a dedicated Dify token
In the Crazyrouter backend, create a new token, and name it
dify as recommended. Initially, only open gpt-5.5 and one embedding model, for example text-embedding-3-large.2
Go to model provider settings
Log into Dify using an account with workspace admin rights, and go to
Settings / Settings → Model Provider / Model Provider.3
Add an OpenAI-compatible provider
Select the vendor entry of
OpenAI or OpenAI-compatible type, fill in:API Key: yoursk-...API Base URL:https://api.crazyrouter.com/v1
4
First, configure only one chat model
Add an LLM first, for example:
Model / Model:gpt-5.5Type / Type:LLM
5
Complete the initial verification
In the app, send the phrase:
Reply only OK. If a successful reply is returned and there are logs in Crazyrouter backend, the chat path works. Then add Embedding or other models next.Embedding and Knowledge Base Suggestions
If you want to use knowledge base, RAG, or document retrieval in Dify, add embedding models as the second step:
Recommended order:
- Verify chat model first
- Then verify embedding
- Finally import knowledge base and optimize recall
Recommended Model Configuration
Recommended procedure: get the chat model working first, then add embedding models.
Token Settings Best Practices
Verification Checklist
- Crazyrouter configuration saved in
Model Provider / Model Provider -
API Base URLset tohttps://api.crazyrouter.com/v1 - At least one LLM added successfully
- First Dify app request returns success
- Corresponding request seen in Crazyrouter backend logs
- If you need a knowledge base, at least one embedding model configured
- Token quota and model whitelist meet expectations
- Token segregation for development, test, production completed
Common Errors and Fixes
Performance and Cost Recommendations
- Test workflows first with
gpt-5.5; add other models after stabilizing - When launching a knowledge base for the first time, import documents in small batches to check recall quality before bulk import
- Account for chat and embedding models separately, making it easier to trace costs
- Set stricter quota limits for batch tasks, scheduled tasks, and internal test environments
- When facing high consumption, check Crazyrouter logs first to see if it’s caused by workflow retries, knowledge base imports, or multiple apps using the same token
FAQ
Which Base URL should Dify use?
Usehttps://api.crazyrouter.com/v1.
Why not just use the root domain?
Because Dify’s OpenAI-compatible model vendor usually requires an OpenAI-compatible base address, not the root domain.Should I configure chat or embedding models first?
Configure the chat model first; once apps can return results, add embedding next.Can Rerank models be configured directly?
Depends on your Dify version and available vendor plugins. Run chat and embedding first, then consider whether Rerank needs to be accessed separately.Why emphasize configuring only a single chat model first?
Because Dify issues can easily occur across the vendor, model type, app parameters, and knowledge base chain simultaneously. Focusing on a singlegpt-5.5 chat application first makes troubleshooting much clearer.
Should Dify use multiple tokens?
Yes. Separate development / production at minimum; in high-traffic scenarios, split chat and embedding tokens.Dify is best positioned as an “application platform” and “workflow platform”. Compared to chat frontends, it emphasizes process orchestration, knowledge base, and multi-environment management, making dedicated tokens, model whitelists, and quota strategies more essential.