Skip to main content
Clients & tools

Dify

Low-code LLM app platform

Dify is a low-code platform for building LLM applications with visual workflows. Connect it to Qwen Cloud's pay-as-you-go API to create chat assistants, agents, and knowledge bases powered by Qwen models.

Quick start

Get running in a few minutes:
# 1. Install plugin
Go to Dify marketplace → Models → Find "TONGYI" → Install

# 2. Configure (Settings → Model Providers → TONGYI → Settings)
API Key: sk-xxx
Use international endpoint: Yes

# 3. Test (Create blank app → Chat assistant)
Select model: qwen3.5-plus
Type message: "Write a Python hello world program"
You should see: The model responds with Python code

Configuration

Basic setup

Configure Dify to use Qwen Cloud:
  • Plugin: TONGYI (from Dify marketplace)
  • API endpoint: International (set to "Yes")
  • Authentication: API key required
  • Model selection: Choose from available models in plugin
Free quota and billing:
  • First-time users get a free quota (valid for 90 days)
  • Enable Free quota only to prevent unexpected charges

Step-by-step configuration

1

Install TONGYI plugin

Go to Dify marketplaceModelsTONGYI → Install
2

Configure API key

Click profile → SettingsModel ProvidersTONGYISettings
  • API Key: Your API key
  • Use international endpoint: Yes
3

Enable models

Click models on TONGYI card → Toggle on desired models
For newest models not in TONGYI plugin: Use OpenAI-API-compatible plugin with endpoint https://dashscope-intl.aliyuncs.com/compatible-mode/v1

Limitations

  • Plugin maintenance: TONGYI plugin is maintained by Dify, not Qwen Cloud
  • Model availability: Some newest models may require OpenAI-compatible plugin

Examples

  • Chat assistant
  • Workflow with LLM node
  • Knowledge base
  • Vision models
1

Create app

Workspace → Create blank appChat assistant
2

Configure model

Select qwen3.5-plus → Enable thinking mode if available
3

Test conversation

Type: "Explain how neural networks work"

Troubleshooting

"Invalid API-key provided" error
Solution:
  • Try earlier TONGYI plugin version
  • Use API key from default workspace (not sub-workspace)
  • Verify "Use international endpoint" is set to Yes
Models with -latest suffix not available
Solution: Use OpenAI-API-compatible plugin with:
  • Endpoint: https://dashscope-intl.aliyuncs.com/compatible-mode/v1
  • API key: Your DashScope key
  • Model: Enter model ID manually
High token consumption
Solution:
  • Use appropriate models for tasks
  • Configure reasonable context windows
  • Clear conversation history regularly
Vision toggle not appearing
Solution: Ensure you've selected a vision-capable model (qwen3.5-plus or qwen3-vl-plus)

Advanced features

Thinking mode

For models that support reasoning:
  1. Select model with thinking support
  2. Enable thinking mode toggle
  3. Set to "True" for step-by-step reasoning

Code execution nodes

Extract reasoning from responses:
  • Use regex in code execution nodes
  • Separate thinking process from final answer
  • Format output as needed

FAQ

Using Qwen-Omni and Qwen-OCR models

These models cannot be configured directly in Dify. Integrate them using an HTTP node in a Chatflow or workflow. For integration details, refer to the cURL command examples in each model's documentation.
Use streaming output for API calls in HTTP nodes to reduce the risk of timeouts.

Using Wan models for image and video generation

Dify does not offer a dedicated plugin for Wan models, but you can achieve text-to-image and text-to-video generation using nodes in a Dify Chatflow or workflow:
  1. Create a workflow: In the workspace, create a new Workflow. Add HTTP Request nodes for the Wan API's POST (create task) and GET (query result) endpoints.
  2. Configure environment variables: On the workflow page, find the environment variables icon and set DASHSCOPE_API_KEY to your API key.
  3. Test the output: Click Run to generate the output. Text-to-video generation typically takes five minutes or more.
  4. Publish as a tool (optional): To use these capabilities in other applications, click Publish and select Publish as tool.
Use models wan2.2-t2i-flash (text-to-image) and wan2.1-t2v-turbo (text-to-video). For API details, see the image generation and video generation guides.