Skip to main content

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

  1. Log into LemonData Dashboard
  2. Navigate to API Keys
  3. Create and copy your API key (format: sk-...)

Step 2: Add Custom Model Provider

1

Open Settings

In Dify, go to SettingsModel Provider
2

Add OpenAI-Compatible Provider

Click Add Model Provider and select OpenAI-API-compatible
3

Configure Provider

Enter the following settings:
FieldValue
Provider NameLemonData
API Keysk-your-lemondata-key
API Base URLhttps://api.lemondata.cc/v1
4

Add Models

Add the models you want to use:
  • gpt-4o
  • gpt-4o-mini
  • claude-sonnet-4-5
  • claude-opus-4-5
  • gemini-2.5-flash
  • gemini-2.5-pro
  • deepseek-r1

Step 3: Test Connection

  1. Select a model (e.g., gpt-4o-mini)
  2. Send a test message
  3. Verify you receive a response

Using in Applications

Chatbot

  1. Create a new Chatbot application
  2. Select LemonData as the model provider
  3. Choose your preferred model
  4. Configure system prompt and parameters

Agent

  1. Create an Agent application
  2. Select a capable model (GPT-4o, Claude)
  3. Add tools and knowledge bases
  4. Configure agent behavior

Workflow

  1. Create a Workflow
  2. Add LLM nodes
  3. Select LemonData models for each node
  4. Connect nodes and configure data flow

Available Models

CategoryModels
ChatGPT-4o, GPT-4o-mini, Claude Sonnet/Opus, Gemini, DeepSeek
Embeddingstext-embedding-3-small, text-embedding-3-large
VisionGPT-4o (with images), Claude Sonnet (with images)

RAG Configuration

For RAG applications, configure embeddings:
  1. Go to SettingsModel Provider
  2. Add embedding model: text-embedding-3-small
  3. Set as default embedding model in knowledge base settings

Best Practices

Use GPT-4o-mini for testing and development, switch to more powerful models for production.
Configure different models for different tasks - fast models for simple queries, powerful models for complex reasoning.
Use Dify’s LLMOps features alongside LemonData dashboard to track costs and performance.

Troubleshooting

  • Verify API Base URL is exactly https://api.lemondata.cc/v1
  • Check for trailing slashes
  • Verify network connectivity
  • Double-check API key
  • Ensure the key is active in LemonData dashboard