Overview
Dify is an open-source LLM application development platform. It provides visual prompt orchestration, RAG pipelines, agent frameworks, and LLMOps capabilities. LemonData can be configured as a custom model provider in Dify.Benefits
- Access 300+ AI models through one interface
- Switch between models without changing application logic
- Optimize costs by selecting the best model for each task
- Unified billing and usage tracking
Prerequisites
- LemonData account with API access
- Dify installation (cloud or self-hosted)
Configuration Steps
Step 1: Get Your API Key
- Log into LemonData Dashboard
- Navigate to API Keys
- Create and copy your API key (format:
sk-...)
Step 2: Add Custom Model Provider
Configure Provider
Enter the following settings:
| Field | Value |
|---|---|
| Provider Name | LemonData |
| API Key | sk-your-lemondata-key |
| API Base URL | https://api.lemondata.cc/v1 |
Step 3: Test Connection
- Select a model (e.g.,
gpt-4o-mini) - Send a test message
- Verify you receive a response
Using in Applications
Chatbot
- Create a new Chatbot application
- Select LemonData as the model provider
- Choose your preferred model
- Configure system prompt and parameters
Agent
- Create an Agent application
- Select a capable model (GPT-4o, Claude)
- Add tools and knowledge bases
- Configure agent behavior
Workflow
- Create a Workflow
- Add LLM nodes
- Select LemonData models for each node
- Connect nodes and configure data flow
Available Models
| Category | Models |
|---|---|
| Chat | GPT-4o, GPT-4o-mini, Claude Sonnet/Opus, Gemini, DeepSeek |
| Embeddings | text-embedding-3-small, text-embedding-3-large |
| Vision | GPT-4o (with images), Claude Sonnet (with images) |
RAG Configuration
For RAG applications, configure embeddings:- Go to Settings → Model Provider
- Add embedding model:
text-embedding-3-small - Set as default embedding model in knowledge base settings
Best Practices
Start with economical models
Start with economical models
Use GPT-4o-mini for testing and development, switch to more powerful models for production.
Use model routing
Use model routing
Configure different models for different tasks - fast models for simple queries, powerful models for complex reasoning.
Monitor usage
Monitor usage
Use Dify’s LLMOps features alongside LemonData dashboard to track costs and performance.
Troubleshooting
Connection Error
Connection Error
- Verify API Base URL is exactly
https://api.lemondata.cc/v1 - Check for trailing slashes
- Verify network connectivity
401 Unauthorized
401 Unauthorized
Model Not Found
Model Not Found
- Verify model name matches exactly
- Check model availability at lemondata.cc/en/models