Overview
Dify works well with LemonData through its OpenAI-compatible model provider flow. This is a chat-completions-oriented integration path. It should not be read as a guarantee that Dify exposes the same Responses or WebSocket behavior as dedicated Codex integrations. For current Dify versions, the safest path is usually:- choose the built-in OpenAI provider
- set your LemonData API key
- set a custom base URL of
https://api.lemondata.cc/v1
Some older Dify builds expose this as
OpenAI-API-compatible instead of the built-in OpenAI provider with a custom base URL field. If your Dify UI looks different, use the closest OpenAI-compatible custom provider flow available in that version.Type: Framework or PlatformPrimary Path: OpenAI-compatible chat pathSupport Confidence: Supported with scope limits
Prerequisites
- LemonData account with API access
- Dify Cloud or self-hosted Dify
Configuration Steps
Step 1: Get Your API Key
- Log into LemonData Dashboard
- Open API Keys
- Create or copy an API key that starts with
sk-
Step 2: Configure the Provider
Select OpenAI
Open the OpenAI provider settings. If your Dify version does not offer a custom base URL here, use the OpenAI-compatible custom provider option exposed by that version instead.
Enter LemonData Settings
Use these values:
| Field | Value |
|---|---|
| API Key | sk-your-lemondata-key |
| API Base URL / Custom Base URL | https://api.lemondata.cc/v1 |
Step 3: Test Connection
- Pick one model such as
gpt-5-miniorgpt-4o - Send a test prompt
- Confirm Dify receives a valid response
Embeddings for Knowledge Bases
For RAG and knowledge base indexing, add an embedding model such as:text-embedding-3-smalltext-embedding-3-large
Recommended Model Roles
| Use Case | Suggested Models |
|---|---|
| Default chat | gpt-5.4, gpt-5-mini, gpt-4o |
| Deep reasoning | gpt-5.4, claude-opus-4-6, deepseek-r1 |
| Fast/cheap | gpt-5-mini, gemini-2.5-flash |
| Embeddings | text-embedding-3-small, text-embedding-3-large |
Best Practices
Start with the built-in OpenAI provider
Start with the built-in OpenAI provider
In newer Dify versions, the built-in OpenAI provider with a custom base URL is usually the cleanest setup for LemonData.
Use cheaper models for iteration
Use cheaper models for iteration
Use
gpt-5-mini or gemini-2.5-flash while iterating, then switch heavier workflows to stronger models only where needed.Remember Dify is usually chat-completions oriented
Remember Dify is usually chat-completions oriented
Most Dify flows use OpenAI-compatible chat behavior. If you need Codex-specific Responses or WebSocket behavior, use the dedicated Codex integrations instead of Dify.
Troubleshooting
Connection Error
Connection Error
- Verify the base URL is exactly
https://api.lemondata.cc/v1 - Remove trailing slashes if Dify duplicates them
- Confirm the Dify server can reach LemonData over the public internet
401 Unauthorized
401 Unauthorized
Model Not Found
Model Not Found
- Verify the model name exactly
- Re-add the model entry if the provider UI cached an older value
- Check current model availability in LemonData docs or dashboard