> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dify Plugin

> Integrate Claude, GPT, Gemini and more in Dify via the Aihubmix plugin, covering chat, embeddings, rerank and speech, with prompt caching for Claude.

## One-Click Install for Aihubmix Plugin

Simply click the link below and hit the **Install** button on the Dify Marketplace page:

👉 [Go to Dify Plugin Page](https://marketplace.dify.ai/plugins/langgenius/aihubmix?language=en-US\&theme=system)

**Example image:** <img src="https://mintcdn.com/aihubmix/njYPCqTk0m3HBNaY/public/en/DifyInstallPlugin.png?fit=max&auto=format&n=njYPCqTk0m3HBNaY&q=85&s=1a228911f8d5686b66cafd55cad5a5fd" alt="Install the Aihubmix plugin from the Dify Marketplace" width="2110" height="1572" data-path="public/en/DifyInstallPlugin.png" />

## Configuration

1. Click the avatar on the top right of the page → Select 'Settings'
2. Click the 'Model Provider' Tab
3. Find Aihubmix in the right side → Expand Setup, and fill in your [API Key](https://console.aihubmix.com/token)

<img src="https://mintlify.s3.us-west-1.amazonaws.com/aihubmix/public/en/enDifySettings1.png" alt="Configure Aihubmix and the API Key in Model Provider settings" />

**Currently, the following 5 categories of models are pre-configured:**

* LLM: Large language model
* TEXT EMBEDDING: Vector embedding model
* RERANK: Re-ranking model
* SPEECH2TEXT: Speech-to-text model
* TTS: Text-to-speech model

<img src="https://mintcdn.com/aihubmix/njYPCqTk0m3HBNaY/public/en/DifyModelsSetting.png?fit=max&auto=format&n=njYPCqTk0m3HBNaY&q=85&s=b15186c4ac987f11e8bc8464a2453adf" alt="Model settings" width="3110" height="2086" data-path="public/en/DifyModelsSetting.png" />

**How to add more custom models?**

Click '+ Add model', and fill in the Model Name option:

* Fill in any [model ID](https://aihubmix.com/models) in the model gallery, such as `gpt-4o-2024-11-20`.
* Fill in your API Key, and click 'Save.

Note: due to the special design of the Dify plugin, it currently does not support image generation models, so models like `gpt-image-1` cannot be added.

<img src="https://mintcdn.com/aihubmix/njYPCqTk0m3HBNaY/public/en/DifyAddModel.png?fit=max&auto=format&n=njYPCqTk0m3HBNaY&q=85&s=766bee473a046e11ef50ce9502d41041" alt="Add custom model" width="2600" height="2002" data-path="public/en/DifyAddModel.png" />

## LLM selection

In the Workflow node, select 'LLM', and you can select the models provided by Aihubmix.

**Example image:** <img src="https://mintcdn.com/aihubmix/axGkcFk0FkcdXl5v/public/en/LLMs.png?fit=max&auto=format&n=axGkcFk0FkcdXl5v&q=85&s=ca4955f810d6d65837608de77d8f1d4f" alt="LLM configuration" width="3110" height="2086" data-path="public/en/LLMs.png" />

## Embeddings/Reranker model selection

Embeddings/Reranker models are mainly used for knowledge base question answering, you can quickly experience it in the top Knowledge Tab, and also select the corresponding model in the Workflow node.

**Example image:** <img src="https://mintcdn.com/aihubmix/njYPCqTk0m3HBNaY/public/en/DifyRAG.png?fit=max&auto=format&n=njYPCqTk0m3HBNaY&q=85&s=f3478ae8be084b47f768d3c522993f79" alt="RAG configuration" width="3096" height="2302" data-path="public/en/DifyRAG.png" />

## TTS/SST selection

TTS/SST models are mainly used for speech parsing and synthesis, when selecting tools, the corresponding is not the regular 'LLM', but the 'Audio' type in the 'Tools' Tab. Corresponding relationship:

1. TTS text-to-speech: select 'Text to Speech'
2. SST speech-to-text: select 'Speech to Text'

**Example image:** <img src="https://mintcdn.com/aihubmix/axGkcFk0FkcdXl5v/public/en/TTS-SST.png?fit=max&auto=format&n=axGkcFk0FkcdXl5v&q=85&s=1c25021aee0f6fef42261af8941b4322" alt="Audio configuration" width="3110" height="2086" data-path="public/en/TTS-SST.png" />

## Claude Prompt Caching

Enable prompt caching for Claude models in Dify through this plugin: wrap the prompt you want to cache in `<cache>…</cache>`, and set the "auto-cache threshold for large messages" in the model parameters to a positive integer. For full usage and cache-hit tips, see [Claude Prompt Caching](./Claude-Cache).

***

Last updated: 2026-06-01
