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

# Dify

> Build a Deep Research agent in Dify with GMI Cloud as the model provider.

Wire GMI Cloud's models into Dify's **DeepResearch** template to spin up a multi-step research agent in about five minutes. You'll swap Dify's default LLM and reasoning nodes for GMI-served models (GLM-4.6 + Qwen3 235B Thinking), then run a real query end-to-end.

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/plugin-background.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=42d5c161f6fd75d5f0f9e20e9d1be318" alt="" width="1759" height="522" data-path="agents/plugin-background.png" />
</Frame>

The GMI Cloud plugin exposes the full model catalog through an OpenAI-compatible API, chat, streaming, tool calling, and custom endpoints all work the way Dify expects. The plugin page lists the current preset models: [marketplace.dify.ai/plugins/langgenius/gmicloud](https://marketplace.dify.ai/plugins/langgenius/gmicloud).

## Prerequisites

* A GMI Cloud account at [console.gmicloud.ai](https://console.gmicloud.ai)
* A Dify account at [dify.ai](https://dify.ai)
* About 5 minutes

***

## Step 1. Get your GMI Cloud API key

1. Sign in to the [API Key Management](https://console.gmicloud.ai/user-setting/organization/api-key-management) page.
2. Click **Create API Key**, name it, and set **Scope** to **Inference**.
3. Copy the key now, it won't be shown again.

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/create-api-key.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=081f7f4539d74866e1e296914a5c2760" alt="Create API key" width="1703" height="1104" data-path="agents/create-api-key.png" />
</Frame>

## Step 2. Install the GMI plugin in Dify

Open the [Dify plugin marketplace](https://cloud.dify.ai/plugins?category=discover), search **GMI Cloud**, and install.

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/dify-marketplace.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=6c65ae95b434f5370e2313f439cb35a1" alt="GMI Cloud plugin in the Dify marketplace" width="1903" height="1928" data-path="agents/dify-marketplace.png" />
</Frame>

## Step 3. Configure the plugin

1. In Dify, open **Settings → Model Provider**.
2. Find **GMI Cloud** and click **Setup**.
3. Paste your API key. Custom endpoint is optional; default is `https://api.gmi-serving.com/v1`.
4. **Save**. Dify hits `/v1/models` to validate.

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/configure-dify-model-provider.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=da1bb2aa60fe9b4b6e5a18d36a77c56b" alt="Configure the GMI Cloud provider" width="2556" height="1230" data-path="agents/configure-dify-model-provider.png" />
</Frame>

A green light means you're connected.

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/green-light.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=2f649d8539f12d094ac056513f0154a4" alt="Connection success" width="2010" height="847" data-path="agents/green-light.png" />
</Frame>

## Step 4. Build the workflow

From Dify's home, click **Create from Template** and pick **DeepResearch**.

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/create-from-template.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=ae8194b99c53ad8307f053af8609ca14" alt="Create from template" width="2441" height="1391" data-path="agents/create-from-template.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/deep-research-plugin.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=3403b01c429d126c9f41877460965ae2" alt="DeepResearch template" width="3828" height="1942" data-path="agents/deep-research-plugin.png" />
</Frame>

On the install screen, enable **Tavily** and **JSON Process**. Skip the other two model-provider plugins. GMI Cloud handles inference.

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/plugin-install.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=74d1ad4cb9837d37a1b2bb366d5a5cf7" alt="Plugin install screen" width="3828" height="1942" data-path="agents/plugin-install.png" />
</Frame>

The graph looks busy, but only two nodes matter: **LLM** and **Reasoning Model**. Both will point at GMI.

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/replace-model-node.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=73bee2b7aa8e8ab607679d15294397c4" alt="Nodes to replace" width="3828" height="1942" data-path="agents/replace-model-node.png" />
</Frame>

* **LLM node** → swap `gpt-4o` for **GLM-4.6** ([model card](https://huggingface.co/zai-org/GLM-4.6)).

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/replace-node-glm4.6.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=e35ef0493cd49bccc5b8b1261669c4d5" alt="Replace LLM with GLM-4.6" width="1563" height="1834" data-path="agents/replace-node-glm4.6.png" />
</Frame>

* **Reasoning Model node** → swap for **Qwen3 235B A22B Thinking 2507 FP8** ([model card](https://huggingface.co/Qwen/Qwen3-235B-A22B-Thinking-2507-FP8)).

<img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/replace-node-qwen3-thinking.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=ea355072bff04a5b91dbd5b9b498a829" alt="Replace reasoning node" width="3828" height="1942" data-path="agents/replace-node-qwen3-thinking.png" />

Hit **Publish**.

## Step 5. Run it

Open the workflow app. Set **Depth** to control how many search rounds the agent runs - `2` is a good default.

Sample prompt:

```
Which industries are showing the strongest early signals of disruption from generative AI?
```

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/run-workflow.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=750d98175db663e999ee7ca9abfe4e51" alt="Run the workflow" width="1712" height="1732" data-path="agents/run-workflow.png" />
</Frame>

Deep runs take a minute or two while the agent iterates. The output is a sourced report.

<Frame>
  <img src="https://mintcdn.com/gmicloud/giQR0zq0KlslkvVz/agents/run-result.png?fit=max&auto=format&n=giQR0zq0KlslkvVz&q=85&s=116b18629abbb116f968ed32fee57b0a" alt="Final research output" width="2917" height="1918" data-path="agents/run-result.png" />
</Frame>

***

## Next steps

* Try a different agent framework: [Hermes Agent](/agents/set-up-hermes-agent-with-gmi-cloud) or [OpenClaw](/agents/openclaw).
* Swap models from the [Text catalog](/model-quickstarts/text/overview).
* Stuck? Email [support@gmicloud.ai](mailto:support@gmicloud.ai).
